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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [syscalls/] [sysopen.c] - Blame information for rev 171

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/* connector for open */
2
 
3
#include <reent.h>
4
#include <fcntl.h>
5
 
6
#ifdef _HAVE_STDC
7
 
8
/* The prototype in <fcntl.h> uses ..., so we must correspond.  */
9
 
10
#include <stdarg.h>
11
 
12
int
13
_DEFUN (open, (file, flags, ...),
14
        const char *file _AND
15
        int flags _DOTS)
16
{
17
  va_list ap;
18
  int ret;
19
 
20
  va_start (ap, flags);
21
  ret = _open_r (_REENT, file, flags, va_arg (ap, int));
22
  va_end (ap);
23
  return ret;
24
}
25
 
26
#else /* ! _HAVE_STDC */
27
 
28
int
29
open (file, flags, mode)
30
     const char *file;
31
     int flags;
32
     int mode;
33
{
34
  return _open_r (_REENT, file, flags, mode);
35
}
36
 
37
#endif /* ! _HAVE_STDC */

powered by: WebSVN 2.1.0

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