diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/Python.h | 5 | ||||
-rw-r--r-- | Include/pyport.h | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Include/Python.h b/Include/Python.h index e3addc7..593c8f6 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -22,12 +22,13 @@ #include "patchlevel.h" #include "pyconfig.h" +#include "pyport.h" #ifdef HAVE_LIMITS_H #include <limits.h> #endif -/* pyconfig.h may or may not define DL_IMPORT */ +/* 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 @@ -59,8 +60,6 @@ */ #include <assert.h> -#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 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 */ |