]> granicus.if.org Git - postgresql/commitdiff
PGDLLEXPORT is __declspec (dllexport) only on MSVC,
authorItagaki Takahiro <itagaki.takahiro@gmail.com>
Fri, 28 May 2010 16:34:15 +0000 (16:34 +0000)
committerItagaki Takahiro <itagaki.takahiro@gmail.com>
Fri, 28 May 2010 16:34:15 +0000 (16:34 +0000)
but is __declspec (dllimport) on other compilers
because cygwin and mingw don't like dllexport.

src/include/port/cygwin.h
src/include/port/win32.h

index cb88bc08901dfa57f6612ba78eb5bed06d3b1269..f07c07eeff676e20a463d5752ea4a3206d8c5839 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.8 2010/05/27 07:59:48 itagaki Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.9 2010/05/28 16:34:15 itagaki Exp $ */
 
 #include <cygwin/version.h>
 
@@ -19,4 +19,4 @@
 #define PGDLLIMPORT __declspec (dllimport)
 #endif
 
-#define PGDLLEXPORT __declspec (dllexport)
+#define PGDLLEXPORT __declspec (dllimport)
index d5d309bc13e29a478d8e9fbb84e9d017f6b2ed91..5e611d4234921eae1a39159c11d0ccab696b14dd 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.94 2010/05/27 07:59:48 itagaki Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.95 2010/05/28 16:34:15 itagaki Exp $ */
 
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 #define WIN32_ONLY_COMPILER
 #define PGDLLIMPORT __declspec (dllimport)
 #endif
 
+#ifdef _MSC_VER
 #define PGDLLEXPORT __declspec (dllexport)
+#else
+#define PGDLLEXPORT __declspec (dllimport)
+#endif
 
 #else                                                  /* not CYGWIN, not MSVC, not MingW */
 #define PGDLLIMPORT