diff options
Diffstat (limited to 'main/SAPI.h')
| -rw-r--r-- | main/SAPI.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/main/SAPI.h b/main/SAPI.h index de6af839d1..bd62eaed76 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -1,6 +1,18 @@ #ifndef _NEW_SAPI_H #define _NEW_SAPI_H + +#if WIN32||WINNT +# ifdef SAPI_EXPORTS +# define SAPI_API __declspec(dllexport) +# else +# define SAPI_API __declspec(dllimport) +# endif +#else +#define SAPI_API +#endif + + typedef struct { int (*ub_write)(const char *str, unsigned int str_length); } sapi_functions_struct; @@ -13,7 +25,7 @@ typedef struct { } sapi_globals_struct; -void sapi_startup(); +void sapi_startup(sapi_functions_struct *sf); #ifdef ZTS # define SLS_D sapi_globals_struct *sapi_globals @@ -22,7 +34,7 @@ void sapi_startup(); # define SLS_CC , SLS_C # define SG(v) (sapi_globals->v) # define SLS_FETCH() sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id) -extern int sapi_globals_id; +SAPI_API extern int sapi_globals_id; #else # define SLS_D # define SLS_DC @@ -30,7 +42,7 @@ extern int sapi_globals_id; # define SLS_CC # define SG(v) (sapi_globals.v) # define SLS_FETCH() -extern ZEND_API sapi_globals_struct sapi_globals; +extern SAPI_API sapi_globals_struct sapi_globals; #endif |
