]> granicus.if.org Git - php/commitdiff
- Updated fix for bug #48911 (embed sapi misses SAPI_API)
authorGarrett Serack <garretts@php.net>
Thu, 30 Jul 2009 20:20:56 +0000 (20:20 +0000)
committerGarrett Serack <garretts@php.net>
Thu, 30 Jul 2009 20:20:56 +0000 (20:20 +0000)
#- Windows didn't need SAPI_API

sapi/embed/php_embed.c
sapi/embed/php_embed.h

index 9ac44fe29a1288aad2a2103776a38a08079ac0aa..f4ae857cf8b9fc856bf98f4a1a1c6d54fda7067f 100644 (file)
@@ -108,7 +108,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 */
        
@@ -152,7 +152,7 @@ static const zend_function_entry additional_functions[] = {
        {NULL, NULL, NULL}
 };
 
-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
@@ -217,7 +217,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);
index fe3c5a41f2ec3f99c898ca2ac036be73823eafaf..c42ac0edf406d890c6256aac5168cd70e1ecb5f7 100644 (file)
   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()