From 42a683d688b0e05392eb169252232a8bf4b5a02a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 30 Jan 2008 09:56:22 +0000 Subject: Imporoved PHP binary size and startup speed with GCC4 visibility control (Nuno) --- ext/spl/php_spl.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ext/spl/php_spl.h') diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index 1c202747ec..a6ec050c27 100755 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -32,15 +32,17 @@ extern zend_module_entry spl_module_entry; #define phpext_spl_ptr &spl_module_entry #ifdef PHP_WIN32 -# ifdef SPL_EXPORTS -# define SPL_API __declspec(dllexport) -# elif defined(COMPILE_DL_SPL) -# define SPL_API __declspec(dllimport) -# else -# define SPL_API /* nothing */ -# endif +# ifdef SPL_EXPORTS +# define SPL_API __declspec(dllexport) +# elif defined(COMPILE_DL_SPL) +# define SPL_API __declspec(dllimport) +# else +# define SPL_API /* nothing */ +# endif +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define SPL_API __attribute__ ((visibility("default"))) #else -# define SPL_API +# define SPL_API #endif #if defined(PHP_WIN32) && !defined(COMPILE_DL_SPL) -- cgit v1.2.1