Skip to content

Commit

Permalink
MFH: proper exports/imports for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Richards committed Dec 27, 2008
1 parent 8fc5e99 commit b3f4191
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ext/simplexml/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
10 changes: 9 additions & 1 deletion ext/simplexml/php_simplexml.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit b3f4191

Please sign in to comment.