]> granicus.if.org Git - python/commitdiff
Patch #555929: Cygwin AH_BOTTOM cleanup patch
authorJason Tishler <jason@tishler.net>
Wed, 15 May 2002 11:51:33 +0000 (11:51 +0000)
committerJason Tishler <jason@tishler.net>
Wed, 15 May 2002 11:51:33 +0000 (11:51 +0000)
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.

Include/Python.h
Include/pyport.h
configure
configure.in
pyconfig.h.in

index e3addc704a036513c840c60d2584650d086006e4..593c8f654135eca3124c357df8bb7b49f81f2cbf 100644 (file)
 
 #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.
  */
index 790c7afa59c5a1276b4fa21288ff7ca51ad7a3aa..5c3e0a947f1f2d9df7f2cb0db05ff55adee2023b 100644 (file)
@@ -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 */
index ddd86dbf8bed23bcad0c8ed6a9924a76977afbe2..4e13cedad482a71569d6279ab271c4cdbdca4f93 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.314 .
+# From configure.in Revision: 1.315 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53.
 #
index dcae3d8eef4b1816398780283848ce86844fd9ab..c90f60c85ab074ca6069fcd8056c1ad1952f5a87 100644 (file)
@@ -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 */
index 8e96db2c08b20703e4ce64ef60a4381fddc1b0b5..86bd6c8ddbc31afe65e426a3de692a2c94af2fd8 100644 (file)
 #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 */