From 4defef2736462a0761ea1a5329d6aa0535164a8d Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Sat, 27 Dec 2008 12:21:36 +0000 Subject: [PATCH] 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 1166052b7a..979f52281a 100644 --- a/ext/simplexml/config.w32 +++ b/ext/simplexml/config.w32 @@ -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"); diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index 13ec6e62d6..f4dffdea2c 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(TSRMLS_D); -- 2.40.0