summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
diff options
context:
space:
mode:
authorJason Tishler <jason@tishler.net>2003-01-06 12:41:26 (GMT)
committerJason Tishler <jason@tishler.net>2003-01-06 12:41:26 (GMT)
commitfb8595df4f9583ab9e83826cd782e0c18ba9cffa (patch)
treefb178c5308b141f5285fd5b0bb560da02ee8c64c /Include/pyport.h
parentf2128b004c5cac7ae8766329b061867de6fb6093 (diff)
downloadcpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.zip
cpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.tar.gz
cpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.tar.bz2
Patch #661760: Cygwin auto-import module patch
The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
Diffstat (limited to 'Include/pyport.h')
-rw-r--r--Include/pyport.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 6a9b7e6..09fc693 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -429,7 +429,11 @@ and both these use __declspec()
# else /* Py_BUILD_CORE */
/* Building an extension module, or an embedded situation */
/* public Python functions and data are imported */
-# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
+ /* Under Cygwin, auto-import functions to prevent compilation */
+ /* failures similar to http://python.org/doc/FAQ.html#3.24 */
+# if !defined(__CYGWIN__)
+# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
+# endif /* !__CYGWIN__ */
# define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE
/* module init functions outside the core must be exported */
# if defined(__cplusplus)