summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/simplexml/config.w321
-rw-r--r--ext/simplexml/php_simplexml.h10
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/simplexml/config.w32 b/ext/simplexml/config.w32
index cbf8b58c40..a370770446 100644
--- a/ext/simplexml/config.w32
+++ b/ext/simplexml/config.w32
@@ -15,6 +15,7 @@ if (PHP_SIMPLEXML == "yes") {
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {
MESSAGE("\tSPL support in simplexml disabled");
}
+ ADD_FLAG("CFLAGS_SIMPLEXML", "/D PHP_SIMPLEXML_EXPORTS ");
} else {
PHP_SIMPLEXML == "no";
WARNING("simplexml not enabled; libraries and headers not found");
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index e8e8083215..0454eaed59 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -77,7 +77,15 @@ typedef struct {
#define SIMPLEXML_G(v) (simplexml_globals.v)
#endif
-#define PHP_SXE_API ZEND_DLEXPORT
+#ifdef PHP_WIN32
+# ifdef PHP_SIMPLEXML_EXPORTS
+# define PHP_SXE_API __declspec(dllexport)
+# else
+# define PHP_SXE_API __declspec(dllimport)
+# endif
+#else
+# define PHP_SXE_API ZEND_API
+#endif
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();