Include <unistd.h> in Python.h. Fixes #500924.

This commit is contained in:
Martin v. Löwis 2002-01-12 11:05:12 +00:00
parent edb60a7ba9
commit cdc4451222
30 changed files with 4 additions and 109 deletions

View 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

View 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.

View File

@ -18,10 +18,6 @@
#include "pythread.h"
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View 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

View 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

View File

@ -16,10 +16,6 @@
#include "Python.h"
#include "structmember.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#else

View 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

View File

@ -36,7 +36,6 @@ my_getpagesize(void)
#endif
#ifdef UNIX
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>

View 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 *);

View File

@ -12,10 +12,6 @@
#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>

View 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>

View File

@ -28,9 +28,6 @@ typedef unsigned long Py_UInt32;
#endif
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
/*

View 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)

View File

@ -5,7 +5,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
static PyObject *

View File

@ -10,10 +10,6 @@
#include <process.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <signal.h>
#ifndef SIG_ERR

View 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>

View File

@ -8,10 +8,6 @@
#define SOLARIS
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

View File

@ -12,10 +12,6 @@
#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).

View File

@ -24,10 +24,6 @@
#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)

View 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 */

View File

@ -66,10 +66,6 @@
#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.

View 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;

View File

@ -9,10 +9,6 @@
#include <ctype.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef RISCOS
#include "unixstuff.h"
#endif

View 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"

View 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

View File

@ -15,10 +15,6 @@
#include "macglue.h"
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

View File

@ -13,10 +13,6 @@
#include "eval.h"
#include "marshal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif

View 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: */

View 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

View 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