X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Ffcntl.c;h=1fd324e399f1a2b684b81ab99425096f9f3b181c;hb=ef7a4c06206976de7ef2e974267407347ddb75a4;hp=013d9cd416793007bae98ab55c4011339ffa7af7;hpb=f4774442eaf92333012ae8b0a431739b4efe22bf;p=mono.git diff --git a/support/fcntl.c b/support/fcntl.c index 013d9cd4167..1fd324e399f 100644 --- a/support/fcntl.c +++ b/support/fcntl.c @@ -13,15 +13,21 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include +#ifdef HOST_WIN32 +#include +#endif +#include "mph.h" /* Don't remove or move after map.h! Works around issues with Android SDK unified headers */ #include "map.h" -#include "mph.h" G_BEGIN_DECLS +#ifndef HOST_WIN32 gint32 Mono_Posix_Syscall_fcntl (gint32 fd, gint32 cmd) { @@ -30,6 +36,22 @@ Mono_Posix_Syscall_fcntl (gint32 fd, gint32 cmd) return fcntl (fd, cmd); } +gint32 +Mono_Posix_Syscall_fcntl_arg_int (gint32 fd, gint32 cmd, int arg) +{ + if (Mono_Posix_FromFcntlCommand (cmd, &cmd) == -1) + return -1; + return fcntl (fd, cmd, arg); +} + +gint32 +Mono_Posix_Syscall_fcntl_arg_ptr (gint32 fd, gint32 cmd, void *arg) +{ + if (Mono_Posix_FromFcntlCommand (cmd, &cmd) == -1) + return -1; + return fcntl (fd, cmd, arg); +} + gint32 Mono_Posix_Syscall_fcntl_arg (gint32 fd, gint32 cmd, gint64 arg) { @@ -79,6 +101,7 @@ Mono_Posix_Syscall_fcntl_lock (gint32 fd, gint32 cmd, struct Mono_Posix_Flock *l return r; } +#endif gint32 Mono_Posix_Syscall_open (const char *pathname, gint32 flags) @@ -100,6 +123,16 @@ Mono_Posix_Syscall_open_mode (const char *pathname, gint32 flags, guint32 mode) return open (pathname, flags, mode); } +gint32 +Mono_Posix_Syscall_get_at_fdcwd () +{ +#ifdef AT_FDCWD + return AT_FDCWD; +#else + return -1; +#endif +} + gint32 Mono_Posix_Syscall_creat (const char *pathname, guint32 mode) {