]> granicus.if.org Git - python/commitdiff
#2890: support os.O_ASYNC and fcntl.FASYNC.
authorGeorg Brandl <georg@python.org>
Fri, 16 May 2008 13:10:15 +0000 (13:10 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 16 May 2008 13:10:15 +0000 (13:10 +0000)
Misc/NEWS
Modules/fcntlmodule.c
Modules/posixmodule.c

index 116e4b9465c319d763fa50fbb5a73cde12b2d025..fa6f5e9014e27ba070e559b68c8f6f23bdca3e95 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,8 @@ Core and Builtins
 Extension Modules
 -----------------
 
+- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the platform.
+
 - Support for Windows 9x has been removed from the winsound module.
 
 - bsddb module updated to version 4.6.4.
index 96a6cc884bc9e9aa7b8d4fab9a75064d140e2a12..0c85f477e9140f3701ae03242fcc3e65ff0c9ead 100644 (file)
@@ -510,6 +510,9 @@ all_ins(PyObject* d)
         if (ins(d, "F_SETLKW64", (long)F_SETLKW64)) return -1;
 #endif
 /* GNU extensions, as of glibc 2.2.4. */
+#ifdef FASYNC
+        if (ins(d, "FASYNC", (long)FASYNC)) return -1;
+#endif
 #ifdef F_SETLEASE
         if (ins(d, "F_SETLEASE", (long)F_SETLEASE)) return -1;
 #endif
index 6a72166f5ecab5e5266b8b5e0ab8e14df9189b62..a4bbac556a7d38aad56e744b0550971242a4cb10 100644 (file)
@@ -8756,6 +8756,11 @@ all_ins(PyObject *d)
 #endif
 
 /* GNU extensions. */
+#ifdef O_ASYNC
+        /* Send a SIGIO signal whenever input or output 
+           becomes available on file descriptor */
+        if (ins(d, "O_ASYNC", (long)O_ASYNC)) return -1;
+#endif
 #ifdef O_DIRECT
         /* Direct disk access. */
         if (ins(d, "O_DIRECT", (long)O_DIRECT)) return -1;