1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
15 #define __NR___syscall_open __NR_open
16 static __always_inline _syscall3(int, __syscall_open, const char *, file,
17 int, flags, __kernel_mode_t, mode)
18 strong_alias_untyped(__syscall_open,__NC(open))
20 #define __NR___open2_nocancel __NR_open
21 _syscall2(int, __NC(open2), const char *, file, int, flags)
23 int open(const char *file, int oflag, ...)
27 if (oflag & O_CREAT) {
30 mode = va_arg(arg, mode_t);
35 return __NC(open)(file, oflag, mode);
37 int oldtype = LIBC_CANCEL_ASYNC ();
38 int result = __NC(open)(file, oflag, mode);
39 LIBC_CANCEL_RESET (oldtype);