mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 19:09:58 +08:00
7c8bd7a075
* libc/syscalls/sysclose.c: Always call reentrant version of the underlying syscall since one is guaranteed to exist in libc/reent. * libc/syscalls/sysexecve.c: Ditto. * libc/syscalls/sysfcntl.c: Ditto. * libc/syscalls/sysfork.c: Ditto. * libc/syscalls/sysfstat.c: Ditto. * libc/syscalls/sysgetpid.c: Ditto. * libc/syscalls/sysgettod.c: Ditto. * libc/syscalls/syskill.c: Ditto. * libc/syscalls/syslink.c: Ditto. * libc/syscalls/syslseek.c: Ditto. * libc/syscalls/sysopen.c: Ditto. * libc/syscalls/sysread.c: Ditto. * libc/syscalls/syssbrk.c: Ditto. * libc/syscalls/sysstat.c: Ditto. * libc/syscalls/systimes.c: Ditto. * libc/syscalls/sysunlink.c: Ditto. * libc/syscalls/syswait.c: Ditto. * libc/syscalls/syswrite.c: Ditto.
38 lines
594 B
C
38 lines
594 B
C
/* connector for open */
|
|
|
|
#include <reent.h>
|
|
#include <fcntl.h>
|
|
|
|
#ifdef _HAVE_STDC
|
|
|
|
/* The prototype in <fcntl.h> uses ..., so we must correspond. */
|
|
|
|
#include <stdarg.h>
|
|
|
|
int
|
|
_DEFUN (open, (file, flags, ...),
|
|
const char *file _AND
|
|
int flags _DOTS)
|
|
{
|
|
va_list ap;
|
|
int ret;
|
|
|
|
va_start (ap, flags);
|
|
ret = _open_r (_REENT, file, flags, va_arg (ap, int));
|
|
va_end (ap);
|
|
return ret;
|
|
}
|
|
|
|
#else /* ! _HAVE_STDC */
|
|
|
|
int
|
|
open (file, flags, mode)
|
|
const char *file;
|
|
int flags;
|
|
int mode;
|
|
{
|
|
return _open_r (_REENT, file, flags, mode);
|
|
}
|
|
|
|
#endif /* ! _HAVE_STDC */
|