From 8ba251425310f621a36329731c61439b9bd52a05 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 18 Mar 2002 11:46:00 +0000 Subject: [PATCH] Fix build. Warning about TSRM testing still applies. --- ext/recode/php_recode.h | 17 +++++++++-------- ext/recode/recode.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h index 641e7d1000..dcdf4fd024 100644 --- a/ext/recode/php_recode.h +++ b/ext/recode/php_recode.h @@ -61,19 +61,20 @@ PHP_MINFO_FUNCTION(recode); PHP_FUNCTION(recode_string); PHP_FUNCTION(recode_file); -typedef struct { +#ifdef ZTS +#include "TSRM.h" +#endif + +ZEND_BEGIN_MODULE_GLOBALS(recode) RECODE_OUTER outer; -} php_recode_globals; +ZEND_END_MODULE_GLOBALS(recode) #ifdef ZTS -# define ReSG(v) TSRMG(recode_globals_id, php_recode_globals *, v) +#define ReSG(v) TSRMG(recode_globals_id, zend_recode_globals *, v) #else -# define ReSG(v) (recode_globals.v) -extern PHP_MYSQL_API php_recode_globals recode_globals; +#define ReSG(v) (recode_globals.v) #endif -#else -#define phpext_recode_ptr NULL #endif - + #endif /* PHP_RECODE_H */ diff --git a/ext/recode/recode.c b/ext/recode/recode.c index d552d765be..f502827ef6 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -43,7 +43,7 @@ char *program_name = "php"; #define SAFE_STRING(s) ((s)?(s):"") -php_recode_globals recode_globals; +ZEND_DECLARE_MODULE_GLOBALS(recode); extern int le_fp,le_pp; /* {{{ module stuff */ -- 2.40.0