# Changes to php_embed.c/.h break Windows build (revision 286468/bug 48911)

- Thread: https://externals.io/message/45148
- Original archive: https://news-web.php.net/php.internals/45148
- Started by Garrett Serack on 2009-07-30T16:15:26+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #45148 — Garrett Serack — 2009-07-30T16:15:26+00:00

URL: https://externals.io/message/45148#45148

Howdy,

In response to Bug #48911(http://bugs.php.net/bug.php?id=48911), revision 286468 adds SAPI_API to

   int php_embed_init(int argc, char **argv PTSRMLS_DC);
   void php_embed_shutdown(TSRMLS_D);
   extern sapi_module_struct php_embed_module;

Which breaks building the php5embed on Windows.

On Windows, php5embed is built as a static library, and doesn't need these functions to be marked as SAPI_API.

Can I suggest we instead use "EMBED_SAPI_API" and insert :

   #ifndef PHP_WIN32
       #define EMBED_SAPI_API SAPI_API
   #else
       #define EMBED_SAPI_API
   #endif

Garrett
