Index: configure =================================================================== --- configure (revision 46461) +++ configure (working copy) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 46046 . +# From configure.in Revision: 46295 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for python 2.5. # @@ -4599,14 +4599,35 @@ -for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \ -shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \ -stropts.h termios.h thread.h \ + + + + + + + + + + + + + + + + + + + +for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +shadow.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +signal.h stropts.h termios.h thread.h \ unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \ sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \ -sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ bluetooth/bluetooth.h do @@ -14116,6 +14137,17 @@ + + + + + + + + + + + for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \ execv fork fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ Index: Python/mystrtoul.c =================================================================== --- Python/mystrtoul.c (revision 46461) +++ Python/mystrtoul.c (working copy) @@ -17,7 +17,7 @@ #include -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif Index: Python/ceval.c =================================================================== --- Python/ceval.c (revision 46461) +++ Python/ceval.c (working copy) @@ -205,7 +205,7 @@ #ifdef WITH_THREAD -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif #include "pythread.h" Index: Python/pythonrun.c =================================================================== --- Python/pythonrun.c (revision 46461) +++ Python/pythonrun.c (working copy) @@ -17,7 +17,9 @@ #include "eval.h" #include "marshal.h" +#ifdef HAVE_SIGNAL_H #include +#endif #ifdef HAVE_LANGINFO_H #include Index: Python/dynload_win.c =================================================================== --- Python/dynload_win.c (revision 46461) +++ Python/dynload_win.c (working copy) @@ -2,7 +2,9 @@ /* Support for dynamic loading of extension modules */ #include +#ifdef HAVE_DIRECT_H #include +#endif #include #include "Python.h" Index: Python/thread_nt.h =================================================================== --- Python/thread_nt.h (revision 46461) +++ Python/thread_nt.h (working copy) @@ -5,7 +5,9 @@ #include #include +#ifdef HAVE_PROCESS_H #include +#endif typedef struct NRMUTEX { LONG owned ; Index: Python/strtod.c =================================================================== --- Python/strtod.c (revision 46461) +++ Python/strtod.c (working copy) @@ -54,7 +54,7 @@ extern double atof(const char *); /* Only called when result known to be ok */ -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif extern int errno; Index: Include/pyport.h =================================================================== --- Include/pyport.h (revision 46461) +++ Include/pyport.h (working copy) @@ -219,10 +219,10 @@ * to your pyconfig.h. Python code beyond this should check HAVE_STAT and * HAVE_FSTAT instead. * Also - * #define DONT_HAVE_SYS_STAT_H - * if doesn't exist on your platform, and + * #define HAVE_SYS_STAT_H + * if exists on your platform, and * #define HAVE_STAT_H - * if does (don't look at me -- ths mess is inherited). + * if does. */ #ifndef DONT_HAVE_STAT #define HAVE_STAT @@ -237,7 +237,7 @@ #include "unixstuff.h" #endif -#ifndef DONT_HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H #if defined(PYOS_OS2) && defined(PYCC_GCC) #include #endif Index: Include/Python.h =================================================================== --- Include/Python.h (revision 46461) +++ Include/Python.h (working copy) @@ -35,7 +35,7 @@ #endif #include -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif #include Index: configure.in =================================================================== --- configure.in (revision 46461) +++ configure.in (working copy) @@ -1042,14 +1042,16 @@ # checks for header files AC_HEADER_STDC -AC_CHECK_HEADERS(asm/types.h curses.h dlfcn.h fcntl.h grp.h \ -shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \ -stropts.h termios.h thread.h \ +AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +shadow.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +signal.h stropts.h termios.h thread.h \ unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \ sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \ -sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ bluetooth/bluetooth.h) AC_HEADER_DIRENT Index: Objects/fileobject.c =================================================================== --- Objects/fileobject.c (revision 46461) +++ Objects/fileobject.c (working copy) @@ -4,9 +4,9 @@ #include "Python.h" #include "structmember.h" -#ifndef DONT_HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include -#endif /* DONT_HAVE_SYS_TYPES_H */ +#endif /* HAVE_SYS_TYPES_H */ #ifdef MS_WINDOWS #define fileno _fileno Index: RISCOS/pyconfig.h =================================================================== --- RISCOS/pyconfig.h (revision 46461) +++ RISCOS/pyconfig.h (working copy) @@ -553,6 +553,9 @@ /* Define if you have the waitpid function. */ #undef HAVE_WAITPID +/* Define if you have the header file. */ +#undef HAVE_CONIO_H + /* Define if you have the header file. */ #undef HAVE_DB_H @@ -562,18 +565,27 @@ /* Define if you have the header file. */ #undef HAVE_DB_185_H +/* Define if you have the header file. */ +#undef HAVE_DIRECT_H + /* Define if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the header file. */ #undef HAVE_DLFCN_H +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_GDBM_NDBM_H +/* Define if you have the header file. */ +#undef HAVE_IO_H + /* Define if you have the header file. */ #undef HAVE_LANGINFO_H @@ -595,12 +607,18 @@ /* Define if you have the header file. */ #undef HAVE_POLL_H +/* Define if you have the header file. */ +#undef HAVE_PROCESS_H + /* Define if you have the header file. */ #undef HAVE_PTHREAD_H /* Define if you have the header file. */ #undef HAVE_PTY_H +/* Define if you have the header file. */ +#define HAVE_SIGNAL_H + /* Define if you have the header file. */ #undef HAVE_SYS_AUDIOIO_H @@ -634,12 +652,18 @@ /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TIMES_H +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + /* Define if you have the header file. */ #undef HAVE_SYS_UN_H @@ -688,7 +712,6 @@ #define DONT_HAVE_FSTAT 1 #define DONT_HAVE_STAT 1 -#undef DONT_HAVE_SYS_STAT_H #define PLATFORM "riscos" Index: PC/winsound.c =================================================================== --- PC/winsound.c (revision 46461) +++ PC/winsound.c (working copy) @@ -37,7 +37,9 @@ #include #include +#ifdef HAVE_CONIO_H #include /* port functions on Win9x */ +#endif #include PyDoc_STRVAR(sound_playsound_doc, Index: PC/os2emx/pyconfig.h =================================================================== --- PC/os2emx/pyconfig.h (revision 46461) +++ PC/os2emx/pyconfig.h (working copy) @@ -254,15 +254,33 @@ /* Define if you have the waitpid function. */ #define HAVE_WAITPID 1 +/* Define if you have the header file. */ +#undef HAVE_CONIO_H + +/* Define if you have the header file. */ +#undef HAVE_DIRECT_H + /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define if you have the header file. */ +#undef HAVE_IO_H + /* Define if you have the header file. */ #define HAVE_NCURSES_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_PROCESS_H 1 + +/* Define if you have the header file. */ +#define HAVE_SIGNAL_H 1 + /* Define if you have the header file. */ #define HAVE_SYS_FILE_H 1 @@ -272,12 +290,18 @@ /* Define if you have the header file. */ #define HAVE_SYS_SELECT_H 1 +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + /* Define if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TIMES_H 1 +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + /* Define if you have the header file. */ #define HAVE_SYS_UN_H 1 Index: PC/getpathp.c =================================================================== --- PC/getpathp.c (revision 46461) +++ PC/getpathp.c (working copy) @@ -62,8 +62,14 @@ #include #endif +#ifdef HAVE_SYS_TYPES_H #include +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_SYS_STAT_H #include +#endif /* HAVE_SYS_STAT_H */ + #include /* Search in some common locations for the associated Python libraries. Index: PC/os2vacpp/pyconfig.h =================================================================== --- PC/os2vacpp/pyconfig.h (revision 46461) +++ PC/os2vacpp/pyconfig.h (working copy) @@ -112,6 +112,10 @@ #define HAVE_HYPOT 1 /* hypot() */ #define HAVE_PUTENV 1 /* putenv() */ /* #define VA_LIST_IS_ARRAY 1 */ /* if va_list is an array of some kind */ +/* #define HAVE_CONIO_H 1 */ /* #include */ +#define HAVE_ERRNO_H 1 /* #include */ +#define HAVE_SYS_STAT_H 1 /* #include */ +#define HAVE_SYS_TYPES_H 1 /* #include */ /* Variable-Arguments/Prototypes */ #define HAVE_PROTOTYPES 1 /* VAC++ supports C Function Prototypes */ @@ -124,6 +128,7 @@ #define MALLOC_ZERO_RETURNS_NULL 1 /* Our malloc(0) returns a NULL ptr */ /* Signal Handling */ +#define HAVE_SIGNAL_H 1 /* signal.h */ #define RETSIGTYPE void /* Return type of handlers (int or void) */ /* #undef WANT_SIGFPE_HANDLER */ /* Handle SIGFPE (see Include/pyfpe.h) */ /* #define HAVE_ALARM 1 */ /* alarm() */ @@ -163,7 +168,9 @@ #define HAVE_SETVBUF 1 /* setvbuf() */ #define HAVE_GETCWD 1 /* getcwd() */ #define HAVE_PIPE 1 /* pipe() [OS/2-specific code added] */ +#define HAVE_IO_H 1 /* #include */ #define HAVE_FCNTL_H 1 /* #include */ +#define HAVE_DIRECT_H 1 /* #include */ /* #define HAVE_FLOCK 1 */ /* flock() */ /* #define HAVE_TRUNCATE 1 */ /* truncate() */ /* #define HAVE_FTRUNCATE 1 */ /* ftruncate() */ @@ -172,6 +179,7 @@ /* #define HAVE_OPENDIR 1 */ /* opendir() */ /* Process Operations */ +#define HAVE_PROCESS_H 1 /* #include */ #define HAVE_GETPID 1 /* getpid() */ #define HAVE_SYSTEM 1 /* system() */ #define HAVE_WAIT 1 /* wait() */ Index: PC/pyconfig.h =================================================================== --- PC/pyconfig.h (revision 46461) +++ PC/pyconfig.h (working copy) @@ -78,8 +78,18 @@ #endif #ifdef MS_WINCE +/* The DONT_* macros should no longer be used, but just in case */ #define DONT_HAVE_SYS_STAT_H #define DONT_HAVE_ERRNO_H +/* Python uses GetVersion() to distinguish between + * Windows NT and 9x/ME where OS Unicode support is concerned. + * Windows CE supports Unicode in the same way as NT so we + * define the missing GetVersion() accordingly. + */ +#define GetVersion() (4) +/* Windows CE does not support environment variables */ +#define getenv(v) (NULL) +#define environ (NULL) #endif /* Compiler specific defines */ @@ -350,6 +360,16 @@ /* Define to empty if the keyword does not work. */ /* #define const */ +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_CONIO_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_DIRECT_H 1 +#endif + /* Define if you have dirent.h. */ /* #define DIRENT 1 */ @@ -555,11 +575,31 @@ /* Define if you have the header file. */ /* #undef HAVE_DLFCN_H */ +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_ERRNO_H 1 +#endif + /* Define if you have the header file. */ #ifndef MS_WINCE #define HAVE_FCNTL_H 1 #endif +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_IO_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_PROCESS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_SIGNAL_H 1 +#endif + /* Define if you have the prototypes. */ #define HAVE_STDARG_PROTOTYPES @@ -575,12 +615,22 @@ /* Define if you have the header file. */ /* #define HAVE_SYS_SELECT_H 1 */ +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_SYS_STAT_H 1 +#endif + /* Define if you have the header file. */ /* #define HAVE_SYS_TIME_H 1 */ /* Define if you have the header file. */ /* #define HAVE_SYS_TIMES_H 1 */ +/* Define to 1 if you have the header file. */ +#ifndef MS_WINCE +#define HAVE_SYS_TYPES_H 1 +#endif + /* Define if you have the header file. */ /* #define HAVE_SYS_UN_H 1 */ Index: Modules/socketmodule.c =================================================================== --- Modules/socketmodule.c (revision 46461) +++ Modules/socketmodule.c (working copy) @@ -234,7 +234,9 @@ #endif /* Generic includes */ +#ifdef HAVE_SYS_TYPES_H #include +#endif /* Generic socket object definitions and includes */ #define PySocket_BUILDING_SOCKET @@ -270,7 +272,9 @@ #else /* MS_WINDOWS includes */ -# include +# ifdef HAVE_FCNTL_H +# include +# endif #endif @@ -290,7 +294,7 @@ * _SS_ALIGNSIZE is defined in sys/socket.h by 6.5.21, * for example, but not by 6.5.10. */ -#elif defined(_MSC_VER) && _MSC_VER>1200 +#elif defined(_MSC_VER) && _MSC_VER>1201 /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and * EAI_* constants are defined in (the already included) ws2tcpip.h. */ Index: Modules/mmapmodule.c =================================================================== --- Modules/mmapmodule.c (revision 46461) +++ Modules/mmapmodule.c (working copy) @@ -50,7 +50,10 @@ #endif /* UNIX */ #include + +#ifdef HAVE_SYS_TYPES_H #include +#endif /* HAVE_SYS_TYPES_H */ /* Prefer MAP_ANONYMOUS since MAP_ANON is deprecated according to man page. */ #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) Index: Modules/_localemodule.c =================================================================== --- Modules/_localemodule.c (revision 46461) +++ Modules/_localemodule.c (working copy) @@ -16,7 +16,7 @@ #include #include -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif Index: Modules/arraymodule.c =================================================================== --- Modules/arraymodule.c (revision 46461) +++ Modules/arraymodule.c (working copy) @@ -10,9 +10,9 @@ #ifdef STDC_HEADERS #include #else /* !STDC_HEADERS */ -#ifndef DONT_HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include /* For size_t */ -#endif /* DONT_HAVE_SYS_TYPES_H */ +#endif /* HAVE_SYS_TYPES_H */ #endif /* !STDC_HEADERS */ struct arrayobject; /* Forward */ Index: Modules/selectmodule.c =================================================================== --- Modules/selectmodule.c (revision 46461) +++ Modules/selectmodule.c (working copy) @@ -36,7 +36,7 @@ extern void bzero(void *, int); #endif -#ifndef DONT_HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif Index: Modules/_hotshot.c =================================================================== --- Modules/_hotshot.c (revision 46461) +++ Modules/_hotshot.c (working copy) @@ -14,7 +14,11 @@ */ #ifdef MS_WINDOWS #include + +#ifdef HAVE_DIRECT_H #include /* for getcwd() */ +#endif + typedef __int64 hs_time; #define GETTIMEOFDAY(P_HS_TIME) \ { LARGE_INTEGER _temp; \ Index: Modules/timemodule.c =================================================================== --- Modules/timemodule.c (revision 46461) +++ Modules/timemodule.c (working copy) @@ -19,7 +19,9 @@ #include +#ifdef HAVE_SYS_TYPES_H #include +#endif /* HAVE_SYS_TYPES_H */ #ifdef QUICKWIN #include Index: Modules/posixmodule.c =================================================================== --- Modules/posixmodule.c (revision 46461) +++ Modules/posixmodule.c (working copy) @@ -64,14 +64,21 @@ #include "osdefs.h" #endif +#ifdef HAVE_SYS_TYPES_H #include +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_SYS_STAT_H #include +#endif /* HAVE_SYS_STAT_H */ #ifdef HAVE_SYS_WAIT_H #include /* For WNOHANG */ #endif +#ifdef HAVE_SIGNAL_H #include +#endif #ifdef HAVE_FCNTL_H #include @@ -246,9 +253,15 @@ #endif #ifdef _MSC_VER +#ifdef HAVE_DIRECT_H #include +#endif +#ifdef HAVE_IO_H #include +#endif +#ifdef HAVE_PROCESS_H #include +#endif #include "osdefs.h" #define _WIN32_WINNT 0x0400 /* Needed for CryptoAPI on some systems */ #include Index: pyconfig.h.in =================================================================== --- pyconfig.h.in (revision 46461) +++ pyconfig.h.in (working copy) @@ -73,6 +73,9 @@ /* Define to 1 if you have the `confstr' function. */ #undef HAVE_CONFSTR +/* Define to 1 if you have the header file. */ +#undef HAVE_CONIO_H + /* Define to 1 if you have the `ctermid' function. */ #undef HAVE_CTERMID @@ -91,6 +94,9 @@ /* Define if we have /dev/ptmx. */ #undef HAVE_DEV_PTMX +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRECT_H + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -107,6 +113,9 @@ /* Defined when any dynamic module loading is enabled. */ #undef HAVE_DYNAMIC_LOADING +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + /* Define to 1 if you have the `execv' function. */ #undef HAVE_EXECV @@ -248,6 +257,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_IO_H + /* Define to 1 if you have the `kill' function. */ #undef HAVE_KILL @@ -353,6 +365,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_PROCESS_H + /* Define if your compiler supports function prototype */ #undef HAVE_PROTOTYPES @@ -446,6 +461,9 @@ /* Define to 1 if you have the `siginterrupt' function. */ #undef HAVE_SIGINTERRUPT +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + /* Define to 1 if you have the `sigrelse' function. */ #undef HAVE_SIGRELSE