]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix build under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 24 May 2009 12:15:04 +0000 (12:15 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 24 May 2009 12:15:04 +0000 (12:15 +0000)
Modules/posixmodule.c

index 3d476b0c4f1a6aeb814a5378421e277649e04a7f..2787164f394f977b36b92c84a3ccf24db43ec154 100644 (file)
@@ -312,8 +312,7 @@ extern int lstat(const char *, struct stat *);
 #endif /* UNION_WAIT */
 
 /* Issue #1983: pid_t can be longer than a C long on some systems */
-#ifdef SIZEOF_PID_T
-#if SIZEOF_PID_T == SIZEOF_INT
+#if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
 #define PARSE_PID "i"
 #define PyLong_FromPid PyInt_FromLong
 #define PyLong_AsPid PyInt_AsLong
@@ -327,7 +326,6 @@ extern int lstat(const char *, struct stat *);
 #define PyLong_AsPid PyInt_AsLongLong
 #else
 #error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
-#endif
 #endif /* SIZEOF_PID_T */
 
 /* Don't use the "_r" form if we don't need it (also, won't have a