summaryrefslogtreecommitdiff
path: root/main/php.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-01-30 09:41:12 +0000
committerDmitry Stogov <dmitry@php.net>2008-01-30 09:41:12 +0000
commit240fa244c345141b13485713f16525c169ffa49a (patch)
tree0addb4de1f48312bcac53d8f8d7863ff0fdf325f /main/php.h
parent71efa394a6e17fa2552ccbbf454bb0f33429a8b2 (diff)
downloadphp-git-240fa244c345141b13485713f16525c169ffa49a.tar.gz
Improved PHP binary size and startup speed with GCC4 visibility control (Nuno)
Diffstat (limited to 'main/php.h')
-rw-r--r--main/php.h19
1 files changed, 12 insertions, 7 deletions
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__)