From b3f4191d354bd2736785c09775a12e8e74fe11b5 Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Sat, 27 Dec 2008 12:22:38 +0000 Subject: [PATCH] MFH: proper exports/imports for win32 --- ext/simplexml/config.w32 | 1 + ext/simplexml/php_simplexml.h | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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(); -- 2.50.1