summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorGarrett Serack <garretts@php.net>2009-07-30 20:20:56 (GMT)
committerGarrett Serack <garretts@php.net>2009-07-30 20:20:56 (GMT)
commitf56d6b67b54f20b04a3382a7885ece8fb0705af1 (patch)
tree64dd4c4d8233d6c611976c3ca19f2e8529d1ffc1 /sapi
parentf8ee7db001a18e5640ed4e523c90b1b75ad3e0bb (diff)
downloadphp-f56d6b67b54f20b04a3382a7885ece8fb0705af1.tar.gz
- Updated fix for bug #48911 (embed sapi misses SAPI_API)
#- Windows didn't need SAPI_API
Diffstat (limited to 'sapi')
-rw-r--r--sapi/embed/php_embed.c6
-rw-r--r--sapi/embed/php_embed.h12
2 files changed, 12 insertions, 6 deletions
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 62dc2ad..e639df6 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -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);
diff --git a/sapi/embed/php_embed.h b/sapi/embed/php_embed.h
index 7abf1c2..9c5bdd0 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()