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/dom/xml_common.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'ext/dom/xml_common.h') diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 4193416218..2b01930145 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -35,14 +35,19 @@ typedef struct _dom_object { } dom_object; #ifdef PHP_WIN32 -#ifdef PHPAPI -#undef PHPAPI -#endif -#ifdef DOM_EXPORTS -#define PHPAPI __declspec(dllexport) -#else -#define PHPAPI __declspec(dllimport) -#endif /* DOM_EXPORTS */ +# ifdef PHPAPI +# undef PHPAPI +# endif +# ifdef DOM_EXPORTS +# define PHPAPI __declspec(dllexport) +# else +# define PHPAPI __declspec(dllimport) +# endif /* DOM_EXPORTS */ +#elif defined(__GNUC__) && __GNUC__ >= 4 +# ifdef PHPAPI +# undef PHPAPI +# endif +# define PHPAPI __attribute__ ((visibility("default"))) #endif /* PHP_WIN32 */ #define PHP_DOM_EXPORT PHPAPI -- cgit v1.2.1