[PATCH] update against Apache 2

From: Date: Wed, 28 Nov 2001 20:46:52 +0000
Subject: [PATCH] update against Apache 2
Groups: php.dev 
Request: Send a blank email to php-dev+get-71958@lists.php.net to get a copy of this message
I normally don't follow this list, so forgive me if this has already been discussed, but here's a patch to update sapi_apache2.c against the latest changes to the Apache 2 API. The constness change for apr_array_header_t should be safe with prior versions of Apache 2.0 as well; the prototype change for the post_config hook, however, didn't go in until after 2.0.28-beta, so if you're interested in having it compile cleanly with both old and new versions, you probably need an module magic number check around the prototype for php_apache_server_startup(). --Cliff Index: sapi_apache2.c =================================================================== RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v retrieving revision 1.57 diff -u -d -r1.57 sapi_apache2.c --- sapi_apache2.c 13 Nov 2001 21:40:01 -0000 1.57 +++ sapi_apache2.c 28 Nov 2001 20:26:40 -0000 @@ -145,7 +145,7 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) { php_struct *ctx = SG(server_context); - apr_array_header_t *arr = apr_table_elts(ctx->f->r->subprocess_env); + const apr_array_header_t *arr = apr_table_elts(ctx->f->r->subprocess_env); char *key, *val; APR_ARRAY_FOREACH_OPEN(arr, key, val) @@ -419,7 +419,7 @@ } } -static void +static int php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { @@ -429,6 +429,7 @@ apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); php_apache_register_module(); php_apache_add_version(pconf); + return OK; } static void php_add_filter(request_rec *r, ap_filter_t *f) -------------------------------------------------------------- Cliff Woolley cliffwoolley@yahoo.com Charlottesville, VA

« previous php.dev (#71958) next »