OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [sim/] [testsuite/] [sim/] [cris/] [c/] [stat3.c] - Diff between revs 157 and 223

Only display areas with differences | Details | Blame | View Log

Rev 157 Rev 223
/* Simulator options:
/* Simulator options:
#sim: --sysroot=@exedir@
#sim: --sysroot=@exedir@
*/
*/
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <unistd.h>
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
 
 
int main (int argc, char *argv[])
int main (int argc, char *argv[])
{
{
  char path[1024] = "/";
  char path[1024] = "/";
  struct stat buf;
  struct stat buf;
 
 
  strcat (path, argv[0]);
  strcat (path, argv[0]);
  if (stat (".", &buf) != 0
  if (stat (".", &buf) != 0
      || !S_ISDIR (buf.st_mode))
      || !S_ISDIR (buf.st_mode))
    abort ();
    abort ();
  if (stat (path, &buf) != 0
  if (stat (path, &buf) != 0
      || !S_ISREG (buf.st_mode))
      || !S_ISREG (buf.st_mode))
    abort ();
    abort ();
  printf ("pass\n");
  printf ("pass\n");
  exit (0);
  exit (0);
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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