perl 5.003_03: hints/sunos_4_1.sh
[p5sagit/p5-mst-13.2.git] / ext / Fcntl / Fcntl.xs
index 308e9dd..90f3af5 100644 (file)
@@ -2,7 +2,25 @@
 #include "perl.h"
 #include "XSUB.h"
 
-#include <fcntl.h>
+#ifdef VMS
+#  include <file.h>
+#else
+#  include <fcntl.h>
+#endif
+
+/* This comment is a kludge to get metaconfig to see the symbols
+    VAL_O_NONBLOCK
+    VAL_EAGAIN
+    RD_NODATA
+    EOF_NONBLOCK
+   and include the appropriate metaconfig unit
+   so that Configure will test how to turn on non-blocking I/O
+   for a file descriptor.  See config.h for how to use these
+   in your extension. 
+   
+   While I'm at it, I'll have metaconfig look for HAS_POLL too.
+   --AD  October 16, 1995
+*/
 
 static int
 not_here(s)
@@ -159,6 +177,12 @@ int arg;
 #else
                goto not_there;
 #endif
+           if (strEQ(name, "O_BINARY"))
+#ifdef O_BINARY
+               return O_BINARY;
+#else
+               goto not_there;
+#endif
        } else
          goto not_there;
        break;