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

index 1166052b7ad5e2d808ccdc8264cb2053f3a29bbc..979f52281af26b7b6174b1939787a32a8c7b3173 100644 (file)
@@ -13,6 +13,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 13ec6e62d601ab7c7289f93ef7d2fe71db9a263f..f4dffdea2c7cc09c2a871b3bfa12f40d1c8407b3 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(TSRMLS_D);