diff options
author | Uwe Steinmann <steinm@php.net> | 1999-08-06 10:42:00 +0000 |
---|---|---|
committer | Uwe Steinmann <steinm@php.net> | 1999-08-06 10:42:00 +0000 |
commit | 7ef3076a56015fd62e0fa320c53928d66c25fc64 (patch) | |
tree | f7f5bdcd28b019d02c81cf597393e74b7a352fd6 /ext/hyperwave/php3_hyperwave.h | |
parent | 4b8a100ec97dde79c5dc9e3ba0b50c3ce8939e85 (diff) | |
download | php-git-7ef3076a56015fd62e0fa320c53928d66c25fc64.tar.gz |
Made Hypwerwave module threat safe
Diffstat (limited to 'ext/hyperwave/php3_hyperwave.h')
-rw-r--r-- | ext/hyperwave/php3_hyperwave.h | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/ext/hyperwave/php3_hyperwave.h b/ext/hyperwave/php3_hyperwave.h index 087a329c3c..f911c56fbb 100644 --- a/ext/hyperwave/php3_hyperwave.h +++ b/ext/hyperwave/php3_hyperwave.h @@ -28,21 +28,58 @@ #ifndef _HW_H #define _HW_H +#if COMPILE_DL +#undef HYPERWAVE +#define HYPERWAVE 1 +#endif + +#if WIN32||WINNT +#define PHP_HW_API __declspec(dllexport) +#else +#define PHP_HW_API +#endif + #if HYPERWAVE +#ifndef DLEXPORT +#define DLEXPORT +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + #include "hg_comm.h" extern php3_module_entry hw_module_entry; #define hw_module_ptr &hw_module_entry typedef struct { - long default_link; - long num_links,num_persistent; - long max_links,max_persistent; - long allow_persistent; - int le_socketp, le_psocketp, le_document; -} hw_module; + long default_link; + long default_port; + long num_links,num_persistent; + long max_links,max_persistent; + long allow_persistent; + int le_socketp, le_psocketp, le_document; +} php_hw_globals; + +#ifdef ZTS +# define HwSLS_D php_hw_globals *hw_globals +# define HwSLS_DC , HwSLS_D +# define HwSLS_C hw_globals +# define HwSLS_CC , HwSLS_C +# define HwSG(v) (hw_globals->v) +# define HwSLS_FETCH() php_hw_globals *hw_globals = ts_resource(hw_globals_id) +#else +# define HwSLS_D +# define HwSLS_DC +# define HwSLS_C +# define HwSLS_CC +# define HwSG(v) (hw_globals.v) +# define HwSLS_FETCH() +extern PHP_HW_API php_hw_globals hw_globals; +#endif -extern hw_module php3_hw_module; +//extern hw_module php3_hw_module; typedef struct { int size; @@ -54,6 +91,7 @@ typedef struct { extern hw_connection php3_hw_connection; extern PHP_MINIT_FUNCTION(hw); +extern PHP_MSHUTDOWN_FUNCTION(hw); PHP_MINFO_FUNCTION(hw); PHP_FUNCTION(hw_connect); |