[Mono.Posix] Add support for OSX F_NOCACHE
authorMiguel de Icaza <miguel@gnome.org>
Tue, 13 Jan 2015 04:13:50 +0000 (23:13 -0500)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 13 Jan 2015 04:13:58 +0000 (23:13 -0500)
mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
support/Makefile.am
support/map.c
support/map.h

index 0b8f1e6fa028cea47e904a1fbb9ce1a061dbc9c7..0fdb0de11cf3abbaf72987e2f220345a142abec6 100644 (file)
@@ -223,6 +223,7 @@ namespace Mono.Unix.Native {
                F_GETOWN   =    9, // Get owner of socket (receiver of SIGIO).
                F_SETSIG   =   10, // Set number of signal to be sent.
                F_GETSIG   =   11, // Get number of signal to be sent.
+               F_NOCACHE  =   48, // OSX: turn data caching off/on for this fd.
                F_SETLEASE = 1024, // Set a lease.
                F_GETLEASE = 1025, // Enquire what lease is active.
                F_NOTIFY   = 1026, // Required notifications on a directory
index c339ebced737526b4eed078345d66c4f46d9ae61..802b606670b4930e3880e0fb7d04ac3e710130f8 100644 (file)
@@ -159,7 +159,7 @@ refresh:
        --rename-member=st_mtime=st_mtime_                    \
        --rename-namespace=Mono.Unix.Native=Mono.Posix        \
        --library=MonoPosixHelper                             \
-       $(mcs_topdir)/class/lib/net_2_0/Mono.Posix.dll map
+       $(mcs_topdir)/class/lib/net_4_5/Mono.Posix.dll map
 
 # Useful if mono is compiled with --enable-shared=no
 patch-libtool:
index 9049e3cc931aeb1082c95c99e3793b1c69582cf9..737c217727585521e981daf3f93ed8c7b5eb1f7b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file was automatically generated by create-native-map from ../../mcs/class/lib/net_2_0/Mono.Posix.dll.
+ * This file was automatically generated by create-native-map from /cvs/mono/mcs/class/lib/net_4_5/Mono.Posix.dll.
  *
  * DO NOT MODIFY.
  */
@@ -2626,6 +2626,12 @@ int Mono_Posix_FromFcntlCommand (int x, int *r)
 #else /* def F_GETSIG */
                {errno = EINVAL; return -1;}
 #endif /* ndef F_GETSIG */
+       if (x == Mono_Posix_FcntlCommand_F_NOCACHE)
+#ifdef F_NOCACHE
+               {*r = F_NOCACHE; return 0;}
+#else /* def F_NOCACHE */
+               {errno = EINVAL; return -1;}
+#endif /* ndef F_NOCACHE */
        if (x == Mono_Posix_FcntlCommand_F_NOTIFY)
 #ifdef F_NOTIFY
                {*r = F_NOTIFY; return 0;}
@@ -2712,6 +2718,10 @@ int Mono_Posix_ToFcntlCommand (int x, int *r)
        if (x == F_GETSIG)
                {*r = Mono_Posix_FcntlCommand_F_GETSIG; return 0;}
 #endif /* ndef F_GETSIG */
+#ifdef F_NOCACHE
+       if (x == F_NOCACHE)
+               {*r = Mono_Posix_FcntlCommand_F_NOCACHE; return 0;}
+#endif /* ndef F_NOCACHE */
 #ifdef F_NOTIFY
        if (x == F_NOTIFY)
                {*r = Mono_Posix_FcntlCommand_F_NOTIFY; return 0;}
index fa6786f0a771059db47f1979445223dc63db8f1d..9c170eac0dc5faf2d525c4e40aa2121080901830 100644 (file)
@@ -518,6 +518,8 @@ enum Mono_Posix_FcntlCommand {
        #define Mono_Posix_FcntlCommand_F_GETOWN   Mono_Posix_FcntlCommand_F_GETOWN
        Mono_Posix_FcntlCommand_F_GETSIG         = 0x0000000b,
        #define Mono_Posix_FcntlCommand_F_GETSIG   Mono_Posix_FcntlCommand_F_GETSIG
+       Mono_Posix_FcntlCommand_F_NOCACHE        = 0x00000030,
+       #define Mono_Posix_FcntlCommand_F_NOCACHE  Mono_Posix_FcntlCommand_F_NOCACHE
        Mono_Posix_FcntlCommand_F_NOTIFY         = 0x00000402,
        #define Mono_Posix_FcntlCommand_F_NOTIFY   Mono_Posix_FcntlCommand_F_NOTIFY
        Mono_Posix_FcntlCommand_F_SETFD          = 0x00000002,