]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Include <unistd.h> in Python.h. Fixes #500924.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 12 Jan 2002 11:13:24 +0000 (11:13 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 12 Jan 2002 11:13:24 +0000 (11:13 +0000)
30 files changed:
Include/Python.h
Modules/_hotshot.c
Modules/bsddbmodule.c
Modules/fcntlmodule.c
Modules/getpath.c
Modules/linuxaudiodev.c
Modules/main.c
Modules/mmapmodule.c
Modules/posixmodule.c
Modules/readline.c
Modules/resource.c
Modules/rgbimgmodule.c
Modules/selectmodule.c
Modules/sgimodule.c
Modules/signalmodule.c
Modules/socketmodule.c
Modules/sunaudiodev.c
Modules/termios.c
Modules/timemodule.c
Objects/fileobject.c
PC/getpathp.c
Parser/intrcheck.c
Python/bltinmodule.c
Python/dynload_beos.c
Python/frozenmain.c
Python/import.c
Python/pythonrun.c
Python/sysmodule.c
Python/thread.c
Python/thread_solaris.h

index 0f07e367f64eeb76ca28615be4ca00b975dd9536..9724fb7965afd3905eaea470f3260ee1bae49c50 100644 (file)
@@ -49,6 +49,9 @@
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /* CAUTION:  Build setups should ensure that NDEBUG is defined on the
  * compiler command line when building Python in release mode; else
index 03eafb19a03cb543bc3a779e561708f7ab39407b..ebaf37c3578eac885a2a6af9691e8eaa67eef6c1 100644 (file)
@@ -8,10 +8,6 @@
 #include "frameobject.h"
 #include "structmember.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 /*
  * Which timer to use should be made more configurable, but that should not
  * be difficult.  This will do for now.
index 05d2bf1dedc4d1f76deebcf6e2ff14ad56f687f8..d51f3b4991d5e127fe1235a619a15df0844ea50e 100644 (file)
 #include "pythread.h"
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 65c9d2b130229f96345ce88a0de254266b030536..9f84a2c1432140d06d01dc8f053d58b277b21b8e 100644 (file)
@@ -3,10 +3,6 @@
 
 #include "Python.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
 #endif
index 2c0b6f2176cc1bd1f2c74d5c5d6e5be337ae6476..3ecdb9d7d8830d5a98c6ab6b0a70e427008a3ebf 100644 (file)
@@ -6,10 +6,6 @@
 #include <sys/types.h>
 #include <string.h>
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
 #ifdef WITH_NEXT_FRAMEWORK
 #include <mach-o/dyld.h>
 #endif
index dd462efbf12370ae3f2e8b2e617deee005cf7f5f..fa2e441f6812e335c823e6e403bbb10aad14be19 100644 (file)
 #include "Python.h"
 #include "structmember.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #else
index 5f71ee2c0aaddba11abc424d7bbaefd16f3c047a..41c229f87a8477389b6463388bf25536fa3b269e 100644 (file)
@@ -4,10 +4,6 @@
 #include "osdefs.h"
 #include "compile.h" /* For CO_FUTURE_DIVISION */
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef MS_WINDOWS
 #include <fcntl.h>
 #endif
index 933e9722a3dba2bbfa09f92c21b537e0c52c8500..6e03b4b59dc616a0a1751ba1a41ddda33c4625bc 100644 (file)
@@ -36,7 +36,6 @@ my_getpagesize(void)
 #endif
 
 #ifdef UNIX
-#include <unistd.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 
index 1290977350701397200ea7767860d9ce6e5d32ba..31b0dde98a670af0c28379b24910d0d875c27aef 100644 (file)
@@ -46,11 +46,6 @@ corresponding Unix manual entries for more information on calls.";
 #include <grp.h>
 #endif
 
-/* pick up declaration of confstr on some systems? */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
 /* Various compilers have only certain posix functions */
 /* XXX Gosh I wish these were all moved into pyconfig.h */
 #if defined(PYCC_VACPP) && defined(PYOS_OS2)
@@ -112,10 +107,6 @@ corresponding Unix manual entries for more information on calls.";
 
 #ifndef _MSC_VER
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #if defined(sun) && !defined(__SVR4)
 /* SunOS 4.1.4 doesn't have prototypes for these: */
 extern int rename(const char *, const char *);
index fe653b821b2dcbe2b65c9cadb6ed1e360463b79e..fa4fc06863dc83d20c6f174ad6e795cd17e0b3f2 100644 (file)
 #include <signal.h>
 #include <errno.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* For isatty() */
-#endif
-
 /* GNU readline definitions */
 #undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
 #include <readline/readline.h>
index 43ed1dea923008366a993b528ff7faffa4f47ecc..45474be267596faf466b371ea99561c76181fad6 100644 (file)
@@ -2,7 +2,6 @@
 #include "Python.h"
 #include <sys/resource.h>
 #include <sys/time.h>
-#include <unistd.h>
 #include <string.h>
 #include <errno.h>
 
index c8c42c2ac05a5226447daf144d3193329cc38f53..304dbd6489fb1eed86ee8a675a3e29386a934437 100644 (file)
@@ -28,9 +28,6 @@ typedef unsigned long Py_UInt32;
 #endif
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #include <string.h>
 
 /*
index e5aa6eb8fcd5ffa05b5394950bfcd302c4d14afa..ceaf3fa92d20c286907088f7059dd496eb610a7b 100644 (file)
@@ -18,9 +18,6 @@
 #define FD_SETSIZE 512
 #endif 
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #if defined(HAVE_POLL_H)
 #include <poll.h>
 #elif defined(HAVE_SYS_POLL_H)
index b19efe6f79c04d1f926c823261d0eaf12a691da0..7ec43d3fb6b573c2fcfb9f227e7ad492e5e8baee 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <fcntl.h>
 
 static PyObject *
index 850221ea326c733bc94037f8f2b2a13465a65319..1053cf1cf29df3efe552ec184430b8a6a36f861b 100644 (file)
 #include <process.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <signal.h>
 
 #ifndef SIG_ERR
index 124353ef913497f45f54c306a01b229c2c3d9fd9..25912a4e6bdbf6e6e46566efa29d8c351a91415c 100644 (file)
@@ -115,10 +115,6 @@ Socket methods:
 #include "pythread.h"
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #if defined(PYCC_VACPP)
 #include <types.h>
 #include <io.h>
index e9ffd1f31dbfc94c05e65422badfe646beb46480..78be8427d54337d8575dd5204940e0d32cb6d5e6 100644 (file)
@@ -8,10 +8,6 @@
 #define SOLARIS
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index c77dff36ad79e715380922ab3ce7177bec50815a..3362e8158c2abaea17b141562b8fae38c9f5065b 100644 (file)
 #endif
 #include <sys/ioctl.h>
 
-#ifdef __BEOS__
-#include <unistd.h>
-#endif
-
 /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
  * MDTR, MRI, and MRTS (appearantly used internally by some things
  * defined as macros; these are not used here directly).
index bcc53e0ec156bc178c548326fbad6a091c4d047e..a5d81fe91ef8973758b482e07d026fce19336237 100644 (file)
 #include <io.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FTIME
 #include <sys/timeb.h>
 #if !defined(MS_WINDOWS) && !defined(PYOS_OS2)
index 27612f491edc78efbcd992939729885d2573c450..1430eef7419580913eb785845dbc15621d37a779 100644 (file)
@@ -8,10 +8,6 @@
 #include <sys/types.h>
 #endif /* DONT_HAVE_SYS_TYPES_H */
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef MS_WIN32
 #define fileno _fileno
 /* can (almost fully) duplicate with _chsize, see file_truncate */
index f736899af2ca19b7f558ad89fe2b7c5a56513765..6695a70c219c3b47ebc10dfc9093752a7a003af5 100644 (file)
 #include <sys/stat.h>
 #include <string.h>
 
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
 /* Search in some common locations for the associated Python libraries.
  *
  * Py_GetPath() tries to return a sensible Python module search path.
index 686e030e601d00b87a8d8d0bd524cb3b37371c53..e2ca5b46a88973c32e5e064838ae0b16dec25db9 100644 (file)
@@ -107,9 +107,6 @@ PyOS_InterruptOccurred(void)
 #include <stdio.h>
 #include <string.h>
 #include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
 static int interrupted;
 
index f5ce74975c10f2119c0ac0063b8e1b1fbf059066..c997ecf5509217f1983ad7db8095b6455da9cc83 100644 (file)
@@ -9,10 +9,6 @@
 
 #include <ctype.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef RISCOS
 #include "unixstuff.h"
 #endif
index 5de96c97d08566d29f894df1c8db7c04bbe33523..eec8592820a75ee4d83b0410285ab79b42bf93e9 100644 (file)
@@ -4,7 +4,6 @@
 #include <kernel/image.h>
 #include <kernel/OS.h>
 #include <stdlib.h>
-#include <unistd.h>
 
 #include "Python.h"
 #include "importdl.h"
index efc87d72a3884944dd4cd5c75702c2fe4cf0b506..21724ef324a27f39a304eefbd44fe9dc1738374f 100644 (file)
@@ -9,15 +9,6 @@ extern void PyWinFreeze_ExeTerm(void);
 extern int PyInitFrozenExtensions(void);
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* For isatty() */
-#endif
-
-/* For isatty()'s proto. - [cjh] */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 /* Main program */
 
 int
index 0b4cd0f7cce147d50553b49253e45c5cecd3557a..ba7d5d50408a1a67b5332cd98dc1fd3fd2adf36d 100644 (file)
 #include "macglue.h"
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 4294c9748ef3f400abe925e0d32f35adcd79974a..6b70739d0a2b67c2a69a64c3ac1faac366e4630f 100644 (file)
 #include "eval.h"
 #include "marshal.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index ff49adcece05f5cc86082b70a3b70fe9be853cf7..cdc728c402f9efbbbb3b9a011cc2926037022a33 100644 (file)
@@ -20,10 +20,6 @@ Data members:
 
 #include "osdefs.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef MS_COREDLL
 extern void *PyWin_DLLhModule;
 /* A string loaded from the DLL at startup: */
index df42f316be0529569283c046f7958492d5df31b7..f9a4de9cb26f151f4f245c7e7c6a26c99cb9aff3 100644 (file)
@@ -5,7 +5,7 @@
    which is included by this file dependent on config settings.
    Stuff shared by all thread_*.h files is collected here. */
 
-#include "pyconfig.h"
+#include "Python.h"
 
 /* pyconfig.h may or may not define DL_IMPORT */
 #ifndef DL_IMPORT      /* declarations for DLL import/export */
@@ -24,10 +24,6 @@ extern char *getenv(const char *);
 #endif
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef __DGUX
 #define _USING_POSIX4A_DRAFT6
 #endif
index 4c958b915e2aa5565bd3fa42bade19f2de53c491..8e24126600c8b3fc70ac5136dcf1dd4989b8c74a 100644 (file)
@@ -1,7 +1,6 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <errno.h>
 #include </usr/include/thread.h>
 #undef _POSIX_THREADS