From: Rob Richards Date: Sat, 27 Dec 2008 12:22:38 +0000 (+0000) Subject: MFH: proper exports/imports for win32 X-Git-Tag: php-5.3.0beta1~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3f4191d354bd2736785c09775a12e8e74fe11b5;p=php MFH: proper exports/imports for win32 --- 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();