data/method/gdb/gdb-13.2/sim/testsuite/cris/c/stat7.c

27 lines
420 B
C

/*
#progos: linux
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
int main (void)
{
struct stat buf;
/* From Linux, we get EFAULT. The simulator sends us EINVAL. */
if (lstat (NULL, &buf) != -1
|| (errno != EINVAL && errno != EFAULT))
{
perror ("lstat 1");
abort ();
}
printf ("pass\n");
exit (0);
}