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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [stat5.c] - Blame information for rev 840

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
/* Check that lstat:ing an nonexistent file works as expected.
2
#notarget: cris*-*-elf
3
*/
4
 
5
#include <sys/types.h>
6
#include <sys/stat.h>
7
#include <unistd.h>
8
#include <errno.h>
9
#include <stdio.h>
10
#include <stdlib.h>
11
 
12
int main (void)
13
{
14
  struct stat buf;
15
 
16
  if (lstat ("nonexistent", &buf) == 0 || errno != ENOENT)
17
    abort ();
18
  printf ("pass\n");
19
  exit (0);
20
}

powered by: WebSVN 2.1.0

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