Add missing Windows O_ constants.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 15 Mar 2000 22:00:57 +0000 (22:00 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 15 Mar 2000 22:00:57 +0000 (22:00 +0000)
p4raw-id: //depot/cfgperl@5755

ext/Fcntl/Fcntl.pm
ext/Fcntl/Fcntl.xs

index 171538e58318147d53be077a0ae7164dcce990d7..92103a1eaf545caa30b21e43bab4f4fae13db500 100644 (file)
@@ -118,11 +118,15 @@ $VERSION = "1.03";
        O_NDELAY
        O_NOCTTY
        O_NOFOLLOW
+       O_NOINHERIT
        O_NONBLOCK
+       O_RANDOM
+       O_RAW
        O_RDONLY
        O_RDWR
        O_RSRC
        O_RSYNC
+       O_SEQUENTIAL
        O_SHLOCK
        O_SYNC
        O_TEMPORARY
index 8d4a073658a0f2c5b607f79483681ced35e4a47f..b597e03c1a1b634d8b8c8d84eea9a4bae821b06f 100644 (file)
@@ -46,7 +46,7 @@ constant(char *name, int arg)
     errno = 0;
     switch (*name) {
     case '_':
-       if (strEQ(name, "_S_IFMT")) /* Yes, _S_IFMT. */
+       if (strEQ(name, "_S_IFMT")) /* Yes, on name _S_IFMT return S_IFMT. */
 #ifdef S_IFMT
          return S_IFMT;
 #else
@@ -475,12 +475,30 @@ constant(char *name, int arg)
                return O_NOFOLLOW;
 #else
                goto not_there;
+#endif
+           if (strEQ(name, "O_NOINHERIT"))
+#ifdef O_NOINHERIT
+               return O_NOINHERIT;
+#else
+               goto not_there;
 #endif
            if (strEQ(name, "O_NONBLOCK"))
 #ifdef O_NONBLOCK
                return O_NONBLOCK;
 #else
                goto not_there;
+#endif
+           if (strEQ(name, "O_RANDOM"))
+#ifdef O_RANDOM
+               return O_RANDOM;
+#else
+               goto not_there;
+#endif
+           if (strEQ(name, "O_RAW"))
+#ifdef O_RAW
+               return O_RAW;
+#else
+               goto not_there;
 #endif
            if (strEQ(name, "O_RDONLY"))
 #ifdef O_RDONLY
@@ -499,6 +517,12 @@ constant(char *name, int arg)
                return O_RSYNC;
 #else
                goto not_there;
+#endif
+           if (strEQ(name, "O_SEQUENTIAL"))
+#ifdef O_SEQUENTIAL
+               return O_SEQUENTIAL;
+#else
+               goto not_there;
 #endif
            if (strEQ(name, "O_SHLOCK"))
 #ifdef O_SHLOCK