diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-06-10 12:23:46 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-06-10 12:23:46 (GMT) |
commit | 0e8bd7e1ccf7f47bc0bb920af899c77669016d3d (patch) | |
tree | a2724cb3463072f259b31175662d9a03ed02b4c3 /Modules | |
parent | acd0d6d4160c6b7f12d80807a4312f6f57338b4d (diff) | |
download | cpython-0e8bd7e1ccf7f47bc0bb920af899c77669016d3d.zip cpython-0e8bd7e1ccf7f47bc0bb920af899c77669016d3d.tar.gz cpython-0e8bd7e1ccf7f47bc0bb920af899c77669016d3d.tar.bz2 |
Patch #1495999: Part two of Windows CE changes.
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_hotshot.c | 4 | ||||
-rw-r--r-- | Modules/_localemodule.c | 2 | ||||
-rw-r--r-- | Modules/arraymodule.c | 4 | ||||
-rw-r--r-- | Modules/mmapmodule.c | 3 | ||||
-rw-r--r-- | Modules/posixmodule.c | 13 | ||||
-rw-r--r-- | Modules/selectmodule.c | 2 | ||||
-rw-r--r-- | Modules/socketmodule.c | 8 | ||||
-rw-r--r-- | Modules/timemodule.c | 2 |
8 files changed, 32 insertions, 6 deletions
diff --git a/Modules/_hotshot.c b/Modules/_hotshot.c index 5a81bfb..6d9776f 100644 --- a/Modules/_hotshot.c +++ b/Modules/_hotshot.c @@ -14,7 +14,11 @@ */ #ifdef MS_WINDOWS #include <windows.h> + +#ifdef HAVE_DIRECT_H #include <direct.h> /* for getcwd() */ +#endif + typedef __int64 hs_time; #define GETTIMEOFDAY(P_HS_TIME) \ { LARGE_INTEGER _temp; \ diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index c016cd7..abfca4e 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -16,7 +16,7 @@ This software comes with no warranty. Use at your own risk. #include <string.h> #include <ctype.h> -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include <errno.h> #endif diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index eb6ceef..ba154ca 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -10,9 +10,9 @@ #ifdef STDC_HEADERS #include <stddef.h> #else /* !STDC_HEADERS */ -#ifndef DONT_HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> /* For size_t */ -#endif /* DONT_HAVE_SYS_TYPES_H */ +#endif /* HAVE_SYS_TYPES_H */ #endif /* !STDC_HEADERS */ struct arrayobject; /* Forward */ diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 19970c9..b2dd675 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -50,7 +50,10 @@ my_getpagesize(void) #endif /* UNIX */ #include <string.h> + +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ /* Prefer MAP_ANONYMOUS since MAP_ANON is deprecated according to man page. */ #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 12e1c83..6dcf1b0 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -64,14 +64,21 @@ corresponding Unix manual entries for more information on calls."); #include "osdefs.h" #endif +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_SYS_STAT_H #include <sys/stat.h> +#endif /* HAVE_SYS_STAT_H */ #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> /* For WNOHANG */ #endif +#ifdef HAVE_SIGNAL_H #include <signal.h> +#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> @@ -246,9 +253,15 @@ extern int lstat(const char *, struct stat *); #endif #ifdef _MSC_VER +#ifdef HAVE_DIRECT_H #include <direct.h> +#endif +#ifdef HAVE_IO_H #include <io.h> +#endif +#ifdef HAVE_PROCESS_H #include <process.h> +#endif #include "osdefs.h" #define _WIN32_WINNT 0x0400 /* Needed for CryptoAPI on some systems */ #include <windows.h> diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index dfa4e85..ef67888 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -36,7 +36,7 @@ extern void bzero(void *, int); #endif -#ifndef DONT_HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 262abe8..2d3fc56 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -234,7 +234,9 @@ shutdown(how) -- shut down traffic in one or both directions\n\ #endif /* Generic includes */ +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif /* Generic socket object definitions and includes */ #define PySocket_BUILDING_SOCKET @@ -270,7 +272,9 @@ int h_errno; /* not used */ #else /* MS_WINDOWS includes */ -# include <fcntl.h> +# ifdef HAVE_FCNTL_H +# include <fcntl.h> +# endif #endif @@ -290,7 +294,7 @@ int h_errno; /* not used */ * _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. */ diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 87e543f..23de173 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -19,7 +19,9 @@ #include <ctype.h> +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ #ifdef QUICKWIN #include <io.h> |