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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* Simulator options:
2
#notarget: cris*-*-elf
3
#sim: --sysroot=@exedir@
4
*/
5
 
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>
12
 
13
int main (int argc, char *argv[])
14
{
15
  char path[1024] = "/";
16
  struct stat buf;
17
 
18
  strcat (path, argv[0]);
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);
27
}
28
 

powered by: WebSVN 2.1.0

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