From: Sascha Schumann Date: Thu, 2 Nov 2000 15:19:54 +0000 (+0000) Subject: Namespace protect dir_cmds and kill some warnings X-Git-Tag: php-4.0.4RC3~386 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ac8e2581273d799b29a624907a37ade31e921da;p=php Namespace protect dir_cmds and kill some warnings --- diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index 6b4db83482..c15c2e2931 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -56,7 +56,7 @@ static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char *name, str_len = strlen(name); - if (zend_hash_find(&d->config, name, str_len + 1, &pe) == SUCCESS) { + if (zend_hash_find(&d->config, name, str_len + 1, (void **) &pe) == SUCCESS) { if (pe->status > status) return NULL; } @@ -90,8 +90,8 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf) zend_hash_get_current_key_ex(&d->config, &str, &str_len, &num_index, NULL) == HASH_KEY_IS_STRING; zend_hash_move_forward(&d->config)) { pe = NULL; - zend_hash_get_current_data(&d->config, &data); - if (zend_hash_find(&e->config, str, str_len, &pe) == SUCCESS) { + zend_hash_get_current_data(&d->config, (void **) &data); + if (zend_hash_find(&e->config, str, str_len, (void **) &pe) == SUCCESS) { if (pe->status >= data->status) continue; } zend_hash_update(&e->config, str, str_len, data, sizeof(*data), NULL); @@ -110,7 +110,7 @@ void apply_config(void *dummy) for (zend_hash_internal_pointer_reset(&d->config); zend_hash_get_current_key_ex(&d->config, &str, &str_len, NULL, NULL) == HASH_KEY_IS_STRING; zend_hash_move_forward(&d->config)) { - zend_hash_get_current_data(&d->config, &data); + zend_hash_get_current_data(&d->config, (void **) &data); fprintf(stderr, "APPLYING (%s)(%s)\n", str, data->value); if (zend_alter_ini_entry(str, str_len, data->value, data->value_len + 1, data->status, PHP_INI_STAGE_RUNTIME) == FAILURE) @@ -118,7 +118,7 @@ void apply_config(void *dummy) } } -const command_rec dir_cmds[] = +const command_rec php_dir_cmds[] = { AP_INIT_TAKE2("php_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"), diff --git a/sapi/apache2filter/php_apache.h b/sapi/apache2filter/php_apache.h index 3b606dde45..6320ffd90b 100644 --- a/sapi/apache2filter/php_apache.h +++ b/sapi/apache2filter/php_apache.h @@ -34,6 +34,6 @@ typedef struct php_struct { void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf); void *create_php_config(apr_pool_t *p, char *dummy); void apply_config(void *); -extern const command_rec dir_cmds[]; +extern const command_rec php_dir_cmds[]; #endif /* PHP_APACHE_H */ diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 1a784cf528..00f2b92284 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -427,10 +427,10 @@ static void php_register_hook(void) module MODULE_VAR_EXPORT php4_module = { STANDARD20_MODULE_STUFF, create_php_config, /* create per-directory config structure */ - merge_php_config, /* merge per-directory config structures */ + merge_php_config, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - dir_cmds, /* command apr_table_t */ + php_dir_cmds, /* command apr_table_t */ NULL, /* handlers */ php_register_hook /* register hooks */ };