]> granicus.if.org Git - php/commitdiff
MFH: proper exports/imports for win32
authorRob Richards <rrichards@php.net>
Sat, 27 Dec 2008 12:22:38 +0000 (12:22 +0000)
committerRob Richards <rrichards@php.net>
Sat, 27 Dec 2008 12:22:38 +0000 (12:22 +0000)
ext/simplexml/config.w32
ext/simplexml/php_simplexml.h

index cbf8b58c403a384cd032e1cbc743955539157526..a370770446ccfdb034eee976eb427e690b096c19 100644 (file)
@@ -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");
index e8e80832154b18e2177c10fba3c980f7af6cce0b..0454eaed59317637b54fecd9c81b04c9d242de52 100644 (file)
@@ -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();