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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [stat3.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
/* Simulator options:
2
#sim: --sysroot=@exedir@
3
*/
4
#include <sys/types.h>
5
#include <sys/stat.h>
6
#include <unistd.h>
7
#include <stdio.h>
8
#include <string.h>
9
#include <stdlib.h>
10
 
11
int main (int argc, char *argv[])
12
{
13
  char path[1024] = "/";
14
  struct stat buf;
15
 
16
  strcat (path, argv[0]);
17
  if (stat (".", &buf) != 0
18
      || !S_ISDIR (buf.st_mode))
19
    abort ();
20
  if (stat (path, &buf) != 0
21
      || !S_ISREG (buf.st_mode))
22
    abort ();
23
  printf ("pass\n");
24
  exit (0);
25
}
26
 

powered by: WebSVN 2.1.0

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