aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/syscalls/sysopen.c
blob: bc8d9d59f866eb9e4765d6cd669a2f3e08060c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* connector for open */

#include <reent.h>
#include <fcntl.h>


/* The prototype in <fcntl.h> uses ..., so we must correspond.  */

#include <stdarg.h>

int
open (const char *file,
        int flags, ...)
{
  va_list ap;
  int ret;

  va_start (ap, flags);
  ret = _open_r (_REENT, file, flags, va_arg (ap, int));
  va_end (ap);
  return ret;
}