From: Garrett Serack Date: Thu, 30 Jul 2009 20:20:56 +0000 (+0000) Subject: - Updated fix for bug #48911 (embed sapi misses SAPI_API) X-Git-Tag: php-5.2.11RC1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdcc7e14603bd42151729a0f5fbfa10f4e49c446;p=php - Updated fix for bug #48911 (embed sapi misses SAPI_API) #- Windows didn't need SAPI_API --- diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index d5997b67bc..564efcd4ab 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -107,7 +107,7 @@ static int php_embed_startup(sapi_module_struct *sapi_module) return SUCCESS; } -extern SAPI_API sapi_module_struct php_embed_module = { +extern EMBED_SAPI_API sapi_module_struct php_embed_module = { "embed", /* name */ "PHP Embedded Library", /* pretty name */ @@ -139,7 +139,7 @@ extern SAPI_API sapi_module_struct php_embed_module = { }; /* }}} */ -SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC) +EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC) { zend_llist global_vars; #ifdef ZTS @@ -202,7 +202,7 @@ SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC) return SUCCESS; } -SAPI_API void php_embed_shutdown(TSRMLS_D) +EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D) { php_request_shutdown((void *) 0); php_module_shutdown(TSRMLS_C); diff --git a/sapi/embed/php_embed.h b/sapi/embed/php_embed.h index 7abf1c2029..9c5bdd0851 100644 --- a/sapi/embed/php_embed.h +++ b/sapi/embed/php_embed.h @@ -57,10 +57,16 @@ php_embed_shutdown(TSRMLS_C); \ } +#ifndef PHP_WIN32 + #define EMBED_SAPI_API SAPI_API +#else + #define EMBED_SAPI_API +#endif + BEGIN_EXTERN_C() -SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC); -SAPI_API void php_embed_shutdown(TSRMLS_D); -extern SAPI_API sapi_module_struct php_embed_module; +EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC); +EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D); +extern EMBED_SAPI_API sapi_module_struct php_embed_module; END_EXTERN_C()