OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [access1.c] - Blame information for rev 842

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* Check access(2) trivially.  Newlib doesn't have it.
2
#notarget: cris*-*-elf
3
*/
4
#include <unistd.h>
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <errno.h>
8
int main (int argc, char **argv)
9
{
10
  if (access (argv[0], R_OK|W_OK|X_OK) == 0
11
      && access ("/dev/null", R_OK|W_OK) == 0
12
      && access ("/dev/null", X_OK) == -1
13
      && errno == EACCES)
14
    printf ("pass\n");
15
  exit (0);
16
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.