tmp105: Split out I2C message constants from header
[qemu/opensuse.git] / tests / tcg / cris / check_stat4.c
blob04f21fe7c4f53e042b9cf230d576495aaf009180
1 /* Simulator options:
2 #notarget: cris*-*-elf
3 #sim: --sysroot=@exedir@
4 */
6 #include <sys/types.h>
7 #include <sys/stat.h>
8 #include <unistd.h>
9 #include <stdio.h>
10 #include <string.h>
11 #include <stdlib.h>
13 int main (int argc, char *argv[])
15 char path[1024] = "/";
16 struct stat buf;
18 strncat(path, argv[0], sizeof(path) - 2);
19 if (lstat (".", &buf) != 0
20 || !S_ISDIR (buf.st_mode))
21 abort ();
22 if (lstat (path, &buf) != 0
23 || !S_ISREG (buf.st_mode))
24 abort ();
25 printf ("pass\n");
26 exit (0);