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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* For this test, we need to do the lstat syscall directly, or else
2
   glibc gets a SEGV.
3
#notarget: cris*-*-elf
4
*/
5
 
6
#include <unistd.h>
7
#include <sys/syscall.h>
8
#include <stdio.h>
9
#include <errno.h>
10
#include <stdlib.h>
11
 
12
int main (void)
13
{
14
  int ret;
15
 
16
  /* From Linux, we get EFAULT.  The simulator sends us EINVAL.  */
17
  ret = syscall (SYS_lstat64, ".", NULL);
18
  if (ret != -1 || (errno != EINVAL && errno != EFAULT))
19
    {
20
      perror ("lstat");
21
      abort ();
22
    }
23
 
24
  printf ("pass\n");
25
  exit (0);
26
}

powered by: WebSVN 2.1.0

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