[Python-checkins] CVS: python/dist/src/Modules fcntlmodule.c,2.31,2.32

Martin v. L?wis loewis@users.sourceforge.net
Fri, 28 Dec 2001 13:08:14 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv20380

Modified Files:
	fcntlmodule.c 
Log Message:
Add fcntl.h constants from glibc 2.2.4. Fixes #496171.


Index: fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.31
retrieving revision 2.32
diff -C2 -d -r2.31 -r2.32
*** fcntlmodule.c	2001/05/14 21:02:36	2.31
--- fcntlmodule.c	2001/12/28 21:08:12	2.32
***************
*** 345,348 ****
--- 345,362 ----
          if (ins(d, "LOCK_NB", (long)LOCK_NB)) return -1;
          if (ins(d, "LOCK_UN", (long)LOCK_UN)) return -1;
+ /* GNU extensions, as of glibc 2.2.4 */
+ #ifdef LOCK_MAND
+         if (ins(d, "LOCK_MAND", (long)LOCK_MAND)) return -1;
+ #endif
+ #ifdef LOCK_READ
+         if (ins(d, "LOCK_READ", (long)LOCK_READ)) return -1;
+ #endif
+ #ifdef LOCK_WRITE
+         if (ins(d, "LOCK_WRITE", (long)LOCK_WRITE)) return -1;
+ #endif
+ #ifdef LOCK_RW
+         if (ins(d, "LOCK_RW", (long)LOCK_RW)) return -1;
+ #endif
+ 
  #ifdef F_DUPFD
          if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1;
***************
*** 390,393 ****
--- 404,463 ----
          if (ins(d, "F_UNLCK", (long)F_UNLCK)) return -1;
  #endif
+ /* LFS constants */
+ #ifdef F_GETLK64
+         if (ins(d, "F_GETLK64", (long)F_GETLK64)) return -1;
+ #endif
+ #ifdef F_SETLK64
+         if (ins(d, "F_SETLK64", (long)F_SETLK64)) return -1;
+ #endif
+ #ifdef F_SETLKW64
+         if (ins(d, "F_SETLKW64", (long)F_SETLKW64)) return -1;
+ #endif
+ /* GNU extensions, as of glibc 2.2.4. */
+ #ifdef F_SETLEASE
+         if (ins(d, "F_SETLEASE", (long)F_SETLEASE)) return -1;
+ #endif
+ #ifdef F_GETLEASE
+         if (ins(d, "F_GETLEASE", (long)F_GETLEASE)) return -1;
+ #endif
+ #ifdef F_NOTIFY
+         if (ins(d, "F_NOTIFY", (long)F_NOTIFY)) return -1;
+ #endif
+ /* Old BSD flock(). */
+ #ifdef F_EXLCK
+         if (ins(d, "F_EXLCK", (long)F_EXLCK)) return -1;
+ #endif
+ #ifdef F_SHLCK
+         if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1;
+ #endif
+ 
+ /* For F_{GET|SET}FL */
+ #ifdef FD_CLOEXEC
+         if (ins(d, "FD_CLOEXEC", (long)FD_CLOEXEC)) return -1;
+ #endif
+ 
+ /* For F_NOTIFY */
+ #ifdef DN_ACCESS
+         if (ins(d, "DN_ACCESS", (long)DN_ACCESS)) return -1;
+ #endif
+ #ifdef DN_MODIFY
+         if (ins(d, "DN_MODIFY", (long)DN_MODIFY)) return -1;
+ #endif
+ #ifdef DN_CREATE
+         if (ins(d, "DN_CREATE", (long)DN_CREATE)) return -1;
+ #endif
+ #ifdef DN_DELETE
+         if (ins(d, "DN_DELETE", (long)DN_DELETE)) return -1;
+ #endif
+ #ifdef DN_RENAME
+         if (ins(d, "DN_RENAME", (long)DN_RENAME)) return -1;
+ #endif
+ #ifdef DN_ATTRIB
+         if (ins(d, "DN_ATTRIB", (long)DN_ATTRIB)) return -1;
+ #endif
+ #ifdef DN_MULTISHOT
+         if (ins(d, "DN_MULTISHOT", (long)DN_MULTISHOT)) return -1;
+ #endif
+ 
  	return 0;
  }