Skip to content

Commit e54b0cb

Browse files
committed
PGDLLEXPORT is __declspec (dllexport) only on MSVC,
but is __declspec (dllimport) on other compilers because cygwin and mingw don't like dllexport.
1 parent fe76f93 commit e54b0cb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/include/port/cygwin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.8 2010/05/27 07:59:48 itagaki Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.9 2010/05/28 16:34:15 itagaki Exp $ */
22

33
#include <cygwin/version.h>
44

@@ -19,4 +19,4 @@
1919
#define PGDLLIMPORT __declspec (dllimport)
2020
#endif
2121

22-
#define PGDLLEXPORT __declspec (dllexport)
22+
#define PGDLLEXPORT __declspec (dllimport)

src/include/port/win32.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.94 2010/05/27 07:59:48 itagaki Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.95 2010/05/28 16:34:15 itagaki Exp $ */
22

33
#if defined(_MSC_VER) || defined(__BORLANDC__)
44
#define WIN32_ONLY_COMPILER
@@ -58,7 +58,11 @@
5858
#define PGDLLIMPORT __declspec (dllimport)
5959
#endif
6060

61+
#ifdef _MSC_VER
6162
#define PGDLLEXPORT __declspec (dllexport)
63+
#else
64+
#define PGDLLEXPORT __declspec (dllimport)
65+
#endif
6266

6367
#else /* not CYGWIN, not MSVC, not MingW */
6468
#define PGDLLIMPORT

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy