mirror of https://github.com/python/cpython
Include <unistd.h> in Python.h. Fixes #500924.
This commit is contained in:
parent
edb60a7ba9
commit
cdc4451222
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -36,7 +36,6 @@ my_getpagesize(void)
|
|||
#endif
|
||||
|
||||
#ifdef UNIX
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include "Python.h"
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@ typedef unsigned long Py_UInt32;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
static PyObject *
|
||||
|
|
|
@ -10,10 +10,6 @@
|
|||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef SIG_ERR
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
#define SOLARIS
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef RISCOS
|
||||
#include "unixstuff.h"
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <kernel/image.h>
|
||||
#include <kernel/OS.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "Python.h"
|
||||
#include "importdl.h"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
#include "macglue.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include </usr/include/thread.h>
|
||||
#undef _POSIX_THREADS
|
||||
|
|
Loading…
Reference in New Issue