X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Ffcntl.c;h=1fd324e399f1a2b684b81ab99425096f9f3b181c;hb=ef7a4c06206976de7ef2e974267407347ddb75a4;hp=12947991c00fa9387a9d1b2896e2c008e5313256;hpb=f3b1d7e5eba21eca5b6a2f857f3405ab2182015a;p=mono.git diff --git a/support/fcntl.c b/support/fcntl.c index 12947991c00..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)