diff options
author | Jason Tishler <jason@tishler.net> | 2002-06-04 15:07:08 (GMT) |
---|---|---|
committer | Jason Tishler <jason@tishler.net> | 2002-06-04 15:07:08 (GMT) |
commit | bc48826dc2fdcf53a837dbf6c35eff4ab69d08bf (patch) | |
tree | 42f9a5e4dbbc7c4ad4a57e641ef49f978c7667fa | |
parent | 1bdd9b033a9b740ba2b42347494e965b462a8af2 (diff) | |
download | cpython-bc48826dc2fdcf53a837dbf6c35eff4ab69d08bf.zip cpython-bc48826dc2fdcf53a837dbf6c35eff4ab69d08bf.tar.gz cpython-bc48826dc2fdcf53a837dbf6c35eff4ab69d08bf.tar.bz2 |
Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
This patch complies with the following request found
near the top of configure.in:
# This is for stuff that absolutely must end up in pyconfig.h.
# Please use pyport.h instead, if possible.
I tested this patch under Cygwin, Win32, and Red
Hat Linux. Python built and ran successfully on
each of these platforms.
-rw-r--r-- | Include/Python.h | 16 | ||||
-rw-r--r-- | Include/pyport.h | 10 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.in | 10 | ||||
-rw-r--r-- | pyconfig.h.in | 10 |
5 files changed, 19 insertions, 29 deletions
diff --git a/Include/Python.h b/Include/Python.h index b978de2..3f0fd9b 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -27,14 +27,6 @@ #include <limits.h> #endif -/* pyconfig.h may or may not define DL_IMPORT */ -#ifndef DL_IMPORT /* declarations for DLL import/export */ -#define DL_IMPORT(RTYPE) RTYPE -#endif -#ifndef DL_EXPORT /* declarations for DLL import/export */ -#define DL_EXPORT(RTYPE) RTYPE -#endif - #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) #define _SGI_MP_SOURCE #endif @@ -61,6 +53,14 @@ #include "pyport.h" +/* pyconfig.h or pyport.h may or may not define DL_IMPORT */ +#ifndef DL_IMPORT /* declarations for DLL import/export */ +#define DL_IMPORT(RTYPE) RTYPE +#endif +#ifndef DL_EXPORT /* declarations for DLL import/export */ +#define DL_EXPORT(RTYPE) RTYPE +#endif + /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG. * PYMALLOC_DEBUG is in error if pymalloc is not in use. */ diff --git a/Include/pyport.h b/Include/pyport.h index 790c7af..5c3e0a9 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -384,9 +384,19 @@ extern int fsync(int fd); extern double hypot(double, double); #endif +#ifndef __CYGWIN__ #ifndef DL_IMPORT /* declarations for DLL import */ #define DL_IMPORT(RTYPE) RTYPE #endif +#else /* __CYGWIN__ */ +#ifdef USE_DL_IMPORT +#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE +#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE +#else /* !USE_DL_IMPORT */ +#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE +#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE +#endif /* USE_DL_IMPORT */ +#endif /* __CYGWIN__ */ /* If the fd manipulation macros aren't defined, here is a set that should do the job */ @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.318 . +# From configure.in Revision: 1.319 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # diff --git a/configure.in b/configure.in index 1003761..ffdc279 100644 --- a/configure.in +++ b/configure.in @@ -7,16 +7,6 @@ AC_CONFIG_HEADER(pyconfig.h) # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. AH_BOTTOM([ -#ifdef __CYGWIN__ -#ifdef USE_DL_IMPORT -#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE -#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE -#else -#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE -#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE -#endif -#endif - /* Define the macros needed if on a UnixWare 7.x system. */ #if defined(__USLC__) && defined(__SCO_VERSION__) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ diff --git a/pyconfig.h.in b/pyconfig.h.in index c8fa5af..bf616d4 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -828,16 +828,6 @@ #undef volatile -#ifdef __CYGWIN__ -#ifdef USE_DL_IMPORT -#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE -#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE -#else -#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE -#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE -#endif -#endif - /* Define the macros needed if on a UnixWare 7.x system. */ #if defined(__USLC__) && defined(__SCO_VERSION__) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ |