[Python-checkins] r78346 - in python/trunk/Modules: _io/fileio.c signalmodule.c

andrew.kuchling python-checkins at python.org
Tue Feb 23 00:12:00 CET 2010


Author: andrew.kuchling
Date: Tue Feb 23 00:12:00 2010
New Revision: 78346

Log:
#7706: add include guards where they're missing; required for Windows CE

Modified:
   python/trunk/Modules/_io/fileio.c
   python/trunk/Modules/signalmodule.c

Modified: python/trunk/Modules/_io/fileio.c
==============================================================================
--- python/trunk/Modules/_io/fileio.c	(original)
+++ python/trunk/Modules/_io/fileio.c	Tue Feb 23 00:12:00 2010
@@ -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"
 

Modified: python/trunk/Modules/signalmodule.c
==============================================================================
--- python/trunk/Modules/signalmodule.c	(original)
+++ python/trunk/Modules/signalmodule.c	Tue Feb 23 00:12:00 2010
@@ -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


More information about the Python-checkins mailing list