summaryrefslogtreecommitdiff
path: root/ext/dom/xml_common.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 /ext/dom/xml_common.h
parent71efa394a6e17fa2552ccbbf454bb0f33429a8b2 (diff)
downloadphp-git-240fa244c345141b13485713f16525c169ffa49a.tar.gz
Improved PHP binary size and startup speed with GCC4 visibility control (Nuno)
Diffstat (limited to 'ext/dom/xml_common.h')
-rw-r--r--ext/dom/xml_common.h21
1 files changed, 13 insertions, 8 deletions
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