]> granicus.if.org Git - python/commitdiff
#7706: add include guards where they're missing; required for Windows CE
authorAndrew M. Kuchling <amk@amk.ca>
Mon, 22 Feb 2010 23:12:00 +0000 (23:12 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Mon, 22 Feb 2010 23:12:00 +0000 (23:12 +0000)
Modules/_io/fileio.c
Modules/signalmodule.c

index 59cd3f7ecf565cdbf030d61d6af1d7c4a35ea707..ec320f79b977715c04a964fc70e29d8e8cb55d7f 100644 (file)
@@ -2,9 +2,15 @@
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
 #include <stddef.h> /* For offsetof */
 #include "_iomodule.h"
 
index 905ad2045d2b3ff95f2650bfa2ee8986e4d91d32..cecb2bef975a8732060b156f3e0fd2bf282ad5d1 100644 (file)
@@ -7,12 +7,17 @@
 #include "intrcheck.h"
 
 #ifdef MS_WINDOWS
+#ifdef HAVE_PROCESS_H
 #include <process.h>
 #endif
+#endif
 
+#ifdef HAVE_SIGNAL_H
 #include <signal.h>
-
+#endif
+#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif