From 1e1fcef756dbec60c9062462b46777ffc2a0594e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 15 May 2002 18:24:06 +0000 Subject: [PATCH] Back out #555929 --- Include/Python.h | 5 +++-- Include/pyport.h | 10 ---------- configure | 2 +- configure.in | 10 ++++++++++ pyconfig.h.in | 10 ++++++++++ 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Include/Python.h b/Include/Python.h index 593c8f65413..e3addc704a0 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -22,13 +22,12 @@ #include "patchlevel.h" #include "pyconfig.h" -#include "pyport.h" #ifdef HAVE_LIMITS_H #include #endif -/* pyconfig.h or pyport.h may or may not define DL_IMPORT */ +/* pyconfig.h may or may not define DL_IMPORT */ #ifndef DL_IMPORT /* declarations for DLL import/export */ #define DL_IMPORT(RTYPE) RTYPE #endif @@ -60,6 +59,8 @@ */ #include +#include "pyport.h" + /* 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 5c3e0a947f1..790c7afa59c 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -384,19 +384,9 @@ 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 */ diff --git a/configure b/configure index 4e13cedad48..21ca48b7885 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.315 . +# From configure.in Revision: 1.316 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # diff --git a/configure.in b/configure.in index c90f60c85ab..dcae3d8eef4 100644 --- a/configure.in +++ b/configure.in @@ -7,6 +7,16 @@ 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 86bd6c8ddbc..8e96db2c08b 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -825,6 +825,16 @@ #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 */