Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/syscalls/sysopen.c')
-rw-r--r--newlib/libc/syscalls/sysopen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/syscalls/sysopen.c b/newlib/libc/syscalls/sysopen.c
index ed0cb604a..7e7df995f 100644
--- a/newlib/libc/syscalls/sysopen.c
+++ b/newlib/libc/syscalls/sysopen.c
@@ -18,7 +18,11 @@ _DEFUN (open, (file, flags, ...),
int ret;
va_start (ap, flags);
+#ifdef REENTRANT_SYSCALLS_PROVIDED
ret = _open_r (_REENT, file, flags, va_arg (ap, int));
+#else
+ ret = _open (file, flags, va_arg (ap, int));
+#endif
va_end (ap);
return ret;
}
@@ -31,7 +35,11 @@ open (file, flags, mode)
int flags;
int mode;
{
+#ifdef REENTRANT_SYSCALLS_PROVIDED
return _open_r (_REENT, file, flags, mode);
+#else
+ return _open (file, flags, mode);
+#endif
}
#endif /* ! _HAVE_STDC */