summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcreposix.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/pcreposix.h')
-rw-r--r--ext/pcre/pcrelib/pcreposix.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/pcre/pcrelib/pcreposix.h b/ext/pcre/pcrelib/pcreposix.h
index cca559b3b2..875e1ff18b 100644
--- a/ext/pcre/pcrelib/pcreposix.h
+++ b/ext/pcre/pcrelib/pcreposix.h
@@ -107,13 +107,12 @@ typedef struct {
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
-export settings are needed. */
+export settings are needed, and are set in pcreposix.c before including this
+file. */
-#ifdef _WIN32
-# ifndef PCREPOSIX_STATIC
-# define PCREPOSIX_EXP_DECL extern __declspec(dllimport)
-# define PCREPOSIX_EXP_DEFN __declspec(dllimport)
-# endif
+#if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL)
+# define PCREPOSIX_EXP_DECL extern __declspec(dllimport)
+# define PCREPOSIX_EXP_DEFN __declspec(dllimport)
#endif
/* By default, we use the standard "extern" declarations. */