URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 157 |
/*
|
/*
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
*/
|
*/
|
|
|
#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 <errno.h>
|
#include <errno.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
struct stat buf;
|
struct stat buf;
|
|
|
/* From Linux, we get EFAULT. The simulator sends us EINVAL. */
|
/* From Linux, we get EFAULT. The simulator sends us EINVAL. */
|
if (lstat (NULL, &buf) != -1
|
if (lstat (NULL, &buf) != -1
|
|| (errno != EINVAL && errno != EFAULT))
|
|| (errno != EINVAL && errno != EFAULT))
|
{
|
{
|
perror ("lstat 1");
|
perror ("lstat 1");
|
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.