From 240fa244c345141b13485713f16525c169ffa49a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 30 Jan 2008 09:41:12 +0000 Subject: Improved PHP binary size and startup speed with GCC4 visibility control (Nuno) --- ext/mbstring/mbstring.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'ext/mbstring/mbstring.h') diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 63afaf5094..1393559f8e 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -52,17 +52,20 @@ #endif #ifdef PHP_WIN32 -# undef MBSTRING_API -# ifdef MBSTRING_EXPORTS -# define MBSTRING_API __declspec(dllexport) -# elif defined(COMPILE_DL_MBSTRING) -# define MBSTRING_API __declspec(dllimport) -# else -# define MBSTRING_API /* nothing special */ -# endif +# undef MBSTRING_API +# ifdef MBSTRING_EXPORTS +# define MBSTRING_API __declspec(dllexport) +# elif defined(COMPILE_DL_MBSTRING) +# define MBSTRING_API __declspec(dllimport) +# else +# define MBSTRING_API /* nothing special */ +# endif +#elif defined(__GNUC__) && __GNUC__ >= 4 +# undef MBSTRING_API +# define MBSTRING_API __attribute__ ((visibility("default"))) #else -# undef MBSTRING_API -# define MBSTRING_API /* nothing special */ +# undef MBSTRING_API +# define MBSTRING_API /* nothing special */ #endif -- cgit v1.2.1