summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
diff options
context:
space:
mode:
authorJason Tishler <jason@tishler.net>2002-05-15 11:51:33 (GMT)
committerJason Tishler <jason@tishler.net>2002-05-15 11:51:33 (GMT)
commiteadb6bb3c5203ff8024b37cddf2787defd02df4c (patch)
tree5a1ddd23cd15f8e9348fc68e39baecf221edfad1 /Include/pyport.h
parent5cc21aee0ba54300bbb3b68531e1f2ca124a1d20 (diff)
downloadcpython-eadb6bb3c5203ff8024b37cddf2787defd02df4c.zip
cpython-eadb6bb3c5203ff8024b37cddf2787defd02df4c.tar.gz
cpython-eadb6bb3c5203ff8024b37cddf2787defd02df4c.tar.bz2
Patch #555929: Cygwin AH_BOTTOM cleanup patch
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.
Diffstat (limited to 'Include/pyport.h')
-rw-r--r--Include/pyport.h10
1 files changed, 10 insertions, 0 deletions
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 */