mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL. * Switched to using the DLL runtime library under Win32. PHP will NOT work if compiled against the static library! * Removed yesterday's php4libts project (with php4dllts, it's obsolete). This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also dependant on the thread-unsafe DLL.
49 lines
986 B
C
49 lines
986 B
C
#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;
|
|
|
|
extern sapi_functions_struct sapi_functions; /* true global */
|
|
|
|
|
|
typedef struct {
|
|
void *server_context;
|
|
} sapi_globals_struct;
|
|
|
|
|
|
void sapi_startup(sapi_functions_struct *sf);
|
|
|
|
#ifdef ZTS
|
|
# define SLS_D sapi_globals_struct *sapi_globals
|
|
# define SLS_DC , SLS_D
|
|
# define SLS_C sapi_globals
|
|
# define SLS_CC , SLS_C
|
|
# define SG(v) (sapi_globals->v)
|
|
# define SLS_FETCH() sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id)
|
|
SAPI_API extern int sapi_globals_id;
|
|
#else
|
|
# define SLS_D
|
|
# define SLS_DC
|
|
# define SLS_C
|
|
# define SLS_CC
|
|
# define SG(v) (sapi_globals.v)
|
|
# define SLS_FETCH()
|
|
extern SAPI_API sapi_globals_struct sapi_globals;
|
|
#endif
|
|
|
|
|
|
#endif /* _NEW_SAPI_H */ |