PGDLLEXPORT is __declspec (dllexport) only on MSVC,

but is __declspec (dllimport) on other compilers
because cygwin and mingw don't like dllexport.
This commit is contained in:
Itagaki Takahiro 2010-05-28 16:34:15 +00:00
parent fe76f93d11
commit e54b0cba96
2 changed files with 7 additions and 3 deletions

View 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)

View 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
@ -58,7 +58,11 @@
#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