summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/SAPI.h8
-rw-r--r--main/php.h19
2 files changed, 17 insertions, 10 deletions
diff --git a/main/SAPI.h b/main/SAPI.h
index e3d7279785..39a9a85b26 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -35,12 +35,14 @@
#ifdef PHP_WIN32
# ifdef SAPI_EXPORTS
-# define SAPI_API __declspec(dllexport)
+# define SAPI_API __declspec(dllexport)
# else
-# define SAPI_API __declspec(dllimport)
+# define SAPI_API __declspec(dllimport)
# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define SAPI_API __attribute__ ((visibility("default")))
#else
-#define SAPI_API
+# define SAPI_API
#endif
#undef shutdown
diff --git a/main/php.h b/main/php.h
index 77d499f3db..65dd2419fe 100644
--- a/main/php.h
+++ b/main/php.h
@@ -45,17 +45,22 @@
#define PHP_DEBUG ZEND_DEBUG
#ifdef PHP_WIN32
-#include "tsrm_win32.h"
-#include "win95nt.h"
+# include "tsrm_win32.h"
+# include "win95nt.h"
# ifdef PHP_EXPORTS
-# define PHPAPI __declspec(dllexport)
+# define PHPAPI __declspec(dllexport)
# else
-# define PHPAPI __declspec(dllimport)
+# define PHPAPI __declspec(dllimport)
# endif
-#define PHP_DIR_SEPARATOR '\\'
-#define PHP_EOL "\r\n"
+# define PHP_DIR_SEPARATOR '\\'
+# define PHP_EOL "\r\n"
#else
-#define PHPAPI
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define PHPAPI __attribute__ ((visibility("default")))
+# else
+# define PHPAPI
+# endif
+
#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#if defined(__MacOSX__)