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