]> granicus.if.org Git - php/commitdiff
export the pcre API when compiling with gcc 4. this fixes e.g. the linkage of APC...
authorNuno Lopes <nlopess@php.net>
Wed, 10 Dec 2008 10:16:14 +0000 (10:16 +0000)
committerNuno Lopes <nlopess@php.net>
Wed, 10 Dec 2008 10:16:14 +0000 (10:16 +0000)
ext/pcre/pcrelib/config.h
ext/pcre/upgrade-pcre.php

index dc6f26753b17c3ea4522d967306236faa53b61ad..98e827f1ca26a6ef05a88b0ae4af15b6c10f8d27 100644 (file)
@@ -8,6 +8,16 @@
 #define SUPPORT_UCP
 #define SUPPORT_UTF8
 
+#if defined(__GNUC__) && __GNUC__ >= 4
+# ifdef __cplusplus
+#  define PCRE_EXP_DECL                extern "C" __attribute__ ((visibility("default")))
+# else
+#  define PCRE_EXP_DECL                extern __attribute__ ((visibility("default")))
+# endif
+# define PCRE_EXP_DEFN         __attribute__ ((visibility("default")))
+# define PCRE_EXP_DATA_DEFN    __attribute__ ((visibility("default")))
+#endif
+
 
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
index 43a98c94be7ebec58bc8da183d0685ea259cb551..8c2061d44c2dad14f882fecc546532ddc939b130 100644 (file)
@@ -106,6 +106,16 @@ $prepend_config_h = '
 #define SUPPORT_UCP
 #define SUPPORT_UTF8
 
+#if defined(__GNUC__) && __GNUC__ >= 4
+# ifdef __cplusplus
+#  define PCRE_EXP_DECL                extern "C" __attribute__ ((visibility("default")))
+# else
+#  define PCRE_EXP_DECL                extern __attribute__ ((visibility("default")))
+# endif
+# define PCRE_EXP_DEFN         __attribute__ ((visibility("default")))
+# define PCRE_EXP_DATA_DEFN    __attribute__ ((visibility("default")))
+#endif
+
 
 ';