URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 33 |
/* 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);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.