cvs: php4 /ext/ircg ircg.c ircg_common.c php_ircg.h
| From: | Sascha Schumann | Date: | Mon, 28 Apr 2003 19:02:52 +0000 |
| Subject: | cvs: php4 /ext/ircg ircg.c ircg_common.c php_ircg.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20552@lists.php.net to get a copy of this message | ||
sas Mon Apr 28 15:02:52 2003 EDT
Modified files:
/php4/ext/ircg ircg.c ircg_common.c php_ircg.h
Log:
zts build fixes
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.178 php4/ext/ircg/ircg.c:1.179
--- php4/ext/ircg/ircg.c:1.178 Mon Apr 28 14:16:39 2003
+++ php4/ext/ircg/ircg.c Mon Apr 28 15:02:52 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.178 2003/04/28 18:16:39 sas Exp $ */
+/* $Id: ircg.c,v 1.179 2003/04/28 19:02:52 sas Exp $ */
/* {{{ includes */
@@ -217,7 +217,7 @@
"%f is inviting %t to %c<br />",
};
-ZEND_DECLARE_MODULE_GLOBALS(ircg)
+ZEND_DECLARE_MODULE_GLOBALS(ircg);
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("ircg.work_dir", "/tmp/ircg", PHP_INI_ALL, OnUpdateString,
work_dir, zend_ircg_globals, ircg_globals)
@@ -2286,8 +2286,8 @@
*/
if (irc_write_buf_close_conn()) {
- sapi_send_headers();
- sapi_flush();
+ sapi_send_headers(TSRMLS_C);
+ sapi_flush(TSRMLS_C);
close(conn->fd);
}
#endif
@@ -2365,7 +2365,7 @@
php_ircg_init_compat();
#if IRCG_API_VERSION >= 20021127
- if (php_ircg_get_target_data(&uid, &gid)) {
+ if (php_ircg_get_target_data(&uid, &gid TSRMLS_CC)) {
user = IRCGG(control_user);
} else {
sprintf(buf, "%u", uid);
@@ -2409,7 +2409,7 @@
#include <ircg_log.h>
#endif
-static void php_ircg_print_table_row(const char *name, unsigned int d)
+static void php_ircg_print_table_row(const char *name, unsigned int d TSRMLS_DC)
{
char buf[32];
@@ -2436,36 +2436,37 @@
php_ircg_print_table_row("Maximum concurrent IRC connections",
- php_ircg->max_concurrency);
- php_ircg_print_table_row("Scanner result cache hits", php_ircg->cache_hits);
+ php_ircg->max_concurrency TSRMLS_CC);
+ php_ircg_print_table_row("Scanner result cache hits",
+ php_ircg->cache_hits TSRMLS_CC);
php_ircg_print_table_row("Scanner result cache misses",
- php_ircg->cache_misses);
+ php_ircg->cache_misses TSRMLS_CC);
php_ircg_print_table_row("Handled format messages",
- php_ircg->exec_fmt_msgs);
+ php_ircg->exec_fmt_msgs TSRMLS_CC);
php_ircg_print_table_row("Tokenizer invocations",
- php_ircg->exec_token_compiler);
+ php_ircg->exec_token_compiler TSRMLS_CC);
php_ircg_print_table_row("Initiated IRC connections",
- php_ircg->irc_connects);
+ php_ircg->irc_connects TSRMLS_CC);
php_ircg_print_table_row("Terminated IRC connections",
- php_ircg->irc_quit_handlers);
+ php_ircg->irc_quit_handlers TSRMLS_CC);
php_ircg_print_table_row("Persistent HTTP connections",
- php_ircg->irc_set_currents);
+ php_ircg->irc_set_currents TSRMLS_CC);
php_ircg_print_table_row("Failed persistent HTTP connections",
- php_ircg->failed_set_currents);
+ php_ircg->failed_set_currents TSRMLS_CC);
php_ircg_print_table_row("Write buffer destructs",
- php_ircg->irc_wbuf_destructs);
+ php_ircg->irc_wbuf_destructs TSRMLS_CC);
php_ircg_print_table_row("Format sets exist",
- php_ircg->fmt_sets_exist);
+ php_ircg->fmt_sets_exist TSRMLS_CC);
php_ircg_print_table_row("Format sets evicted",
- php_ircg->fmt_sets_evicted);
+ php_ircg->fmt_sets_evicted TSRMLS_CC);
php_ircg_print_table_row("Format sets updates",
- php_ircg->fmt_sets_updates);
+ php_ircg->fmt_sets_updates TSRMLS_CC);
php_ircg_print_table_row("Format sets ignored",
- php_ircg->fmt_sets_ignored);
+ php_ircg->fmt_sets_ignored TSRMLS_CC);
php_ircg_print_table_row("Format sets created",
- php_ircg->fmt_sets_created);
+ php_ircg->fmt_sets_created TSRMLS_CC);
php_ircg_print_table_row("Format sets destroyed",
- php_ircg->fmt_sets_destroyed);
+ php_ircg->fmt_sets_destroyed TSRMLS_CC);
#if IRCG_API_VERSION >= 20021127
@@ -2475,7 +2476,7 @@
for (i = 0; i < IRCG_LOG_CNT_NR; i++) {
ircg_log_get(i, &val, &name);
- php_ircg_print_table_row(name, val);
+ php_ircg_print_table_row(name, val TSRMLS_CC);
}
#endif
@@ -2497,7 +2498,8 @@
} else if (stage == 1) {
size_t sz;
-
+ TSRMLS_FETCH();
+
php_ircg_cache_entries = malloc(sizeof(struct cache_entry) * NR_CACHE_ENTRIES);
memset(php_ircg_cache_entries, 0, sizeof(struct cache_entry) * NR_CACHE_ENTRIES);
Index: php4/ext/ircg/ircg_common.c
diff -u php4/ext/ircg/ircg_common.c:1.7 php4/ext/ircg/ircg_common.c:1.8
--- php4/ext/ircg/ircg_common.c:1.7 Mon Apr 28 14:16:39 2003
+++ php4/ext/ircg/ircg_common.c Mon Apr 28 15:02:52 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg_common.c,v 1.7 2003/04/28 18:16:39 sas Exp $ */
+/* $Id: ircg_common.c,v 1.8 2003/04/28 19:02:52 sas Exp $ */
#if YOU_ARE_SANE
@@ -266,8 +266,8 @@
int php_ircg_get_target_data(uid_t *uid, gid_t *gid TSRMLS_DC)
{
- return php_ircg_sapi_get_target_uid(uid TSRMLS_DC)
- || php_ircg_sapi_get_target_gid(gid TSRMLS_DC);
+ return php_ircg_sapi_get_target_uid(uid TSRMLS_CC)
+ || php_ircg_sapi_get_target_gid(gid TSRMLS_CC);
}
int php_ircg_register_with_sapi(int *fd TSRMLS_DC)
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.28 php4/ext/ircg/php_ircg.h:1.29
--- php4/ext/ircg/php_ircg.h:1.28 Mon Apr 28 14:16:39 2003
+++ php4/ext/ircg/php_ircg.h Mon Apr 28 15:02:52 2003
@@ -73,7 +73,7 @@
ZEND_END_MODULE_GLOBALS(ircg)
#ifdef ZTS
-#define IRCGG(v) TSRMG(ircg_globals_id, php_ircg_globals *, v)
+#define IRCGG(v) TSRMG(ircg_globals_id, zend_ircg_globals *, v)
#else
#define IRCGG(v) (ircg_globals.v)
#endif