summaryrefslogtreecommitdiff
path: root/ext/dom/xml_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/xml_common.h')
-rw-r--r--ext/dom/xml_common.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index a52ced773f..eb7b7e8909 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -40,22 +40,20 @@ static inline dom_object *php_dom_obj_from_obj(zend_object *obj) {
#define Z_DOMOBJ_P(zv) php_dom_obj_from_obj(Z_OBJ_P((zv)))
#ifdef PHP_WIN32
-# ifdef PHPAPI
-# undef PHPAPI
-# endif
# ifdef DOM_EXPORTS
-# define PHPAPI __declspec(dllexport)
-# else
-# define PHPAPI __declspec(dllimport)
+# define PHP_DOM_EXPORT __declspec(dllexport)
+# elif !defined(DOM_LOCAL_DEFINES) /* Allow to counteract LNK4049 warning. */
+# define PHP_DOM_EXPORT __declspec(dllimport)
+# else
+# define PHP_DOM_EXPORT
# 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
+# define PHP_DOM_EXPORT __attribute__ ((visibility("default")))
+#elif defined(PHPAPI)
+# define PHP_DOM_EXPORT PHPAPI
+#else
+# define PHP_DOM_EXPORT
+#endif
PHP_DOM_EXPORT extern zend_class_entry *dom_node_class_entry;
PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj);