yet more cleanups of the PERL_OBJECT, MULTIPLICITY and USE_THREADS
[p5sagit/p5-mst-13.2.git] / ext / Fcntl / Fcntl.xs
index 18a175f..bc16cc9 100644 (file)
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
@@ -5,7 +6,13 @@
 #ifdef VMS
 #  include <file.h>
 #else
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#define _NO_OLDNAMES
+#endif 
 #  include <fcntl.h>
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#undef _NO_OLDNAMES
+#endif 
 #endif
 
 /* This comment is a kludge to get metaconfig to see the symbols
@@ -66,6 +73,12 @@ constant(char *name, int arg)
 #else
                goto not_there;
 #endif
+           if (strEQ(name, "F_GETLK64"))
+#ifdef F_GETLK64
+               return F_GETLK64;
+#else
+               goto not_there;
+#endif
            if (strEQ(name, "F_GETOWN"))
 #ifdef F_GETOWN
                return F_GETOWN;
@@ -102,12 +115,24 @@ constant(char *name, int arg)
 #else
                goto not_there;
 #endif
+           if (strEQ(name, "F_SETLK64"))
+#ifdef F_SETLK64
+               return F_SETLK64;
+#else
+               goto not_there;
+#endif
            if (strEQ(name, "F_SETLKW"))
 #ifdef F_SETLKW
                return F_SETLKW;
 #else
                goto not_there;
 #endif
+           if (strEQ(name, "F_SETLKW64"))
+#ifdef F_SETLKW64
+               return F_SETLKW64;
+#else
+               goto not_there;
+#endif
            if (strEQ(name, "F_SETOWN"))
 #ifdef F_SETOWN
                return F_SETOWN;
@@ -283,6 +308,12 @@ constant(char *name, int arg)
 #else
                goto not_there;
 #endif
+           if (strEQ(name, "O_LARGEFILE"))
+#ifdef O_LARGEFILE
+               return O_LARGEFILE;
+#else
+               goto not_there;
+#endif
            if (strEQ(name, "O_NDELAY"))
 #ifdef O_NDELAY
                return O_NDELAY;