|
@@ -187,3 +187,21 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
|
|
|
#define __SC_accept4 18
|
|
|
#define __SC_recvmmsg 19
|
|
|
#define __SC_sendmmsg 20
|
|
|
+
|
|
|
+#ifdef SYS_open
|
|
|
+#define __sys_open2(x,pn,fl) __syscall2(SYS_open, pn, (fl)|O_LARGEFILE)
|
|
|
+#define __sys_open3(x,pn,fl,mo) __syscall3(SYS_open, pn, (fl)|O_LARGEFILE, mo)
|
|
|
+#define __sys_open_cp2(x,pn,fl) __syscall_cp2(SYS_open, pn, (fl)|O_LARGEFILE)
|
|
|
+#define __sys_open_cp3(x,pn,fl,mo) __syscall_cp3(SYS_open, pn, (fl)|O_LARGEFILE, mo)
|
|
|
+#else
|
|
|
+#define __sys_open2(x,pn,fl) __syscall2(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE)
|
|
|
+#define __sys_open3(x,pn,fl,mo) __syscall3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo)
|
|
|
+#define __sys_open_cp2(x,pn,fl) __syscall_cp2(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE)
|
|
|
+#define __sys_open_cp3(x,pn,fl,mo) __syscall_cp3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo)
|
|
|
+#endif
|
|
|
+
|
|
|
+#define __sys_open(...) __SYSCALL_DISP(__sys_open,,__VA_ARGS__)
|
|
|
+#define sys_open(...) __syscall_ret(__sys_open(__VA_ARGS__))
|
|
|
+
|
|
|
+#define __sys_open_cp(...) __SYSCALL_DISP(__sys_open_cp,,__VA_ARGS__)
|
|
|
+#define sys_open_cp(...) __syscall_ret(__sys_open_cp(__VA_ARGS__))
|