From 4472a86146a20a356383475792bae37870c7862a Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Sun, 13 Nov 2011 00:20:32 +0000 Subject: [PATCH] As discussed at AC NA 2011 o relocate srclib/libapreq/library/*.c -> server/apreq_${f}.c o relocate srclib/libapreq/include/*.h -> include/*.h o remove apreq_version.[hc] related stuff since its nolonger its own lib o connect modules/apreq to the build under 'most' default comment out in httpd.conf o update make_exports.awk to handle APREQ marcos git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201372 13f79535-47bb-0310-9956-ffa450edef68 --- build/make_exports.awk | 4 +- {srclib/libapreq/include => include}/apreq.h | 0 .../include => include}/apreq_cookie.h | 0 .../include => include}/apreq_error.h | 0 .../include => include}/apreq_module.h | 0 .../include => include}/apreq_param.h | 0 .../include => include}/apreq_parser.h | 0 .../libapreq/include => include}/apreq_util.h | 0 modules/apreq/Makefile.in | 1 + modules/apreq/config.m4 | 9 ++ modules/apreq/filter.c | 6 - server/Makefile.in | 7 +- .../library/cookie.c => server/apreq_cookie.c | 0 .../library/error.c => server/apreq_error.c | 0 .../library/module.c => server/apreq_module.c | 0 .../module_cgi.c => server/apreq_module_cgi.c | 0 .../apreq_module_custom.c | 0 .../library/param.c => server/apreq_param.c | 0 .../library/parser.c => server/apreq_parser.c | 0 .../apreq_parser_header.c | 0 .../apreq_parser_multipart.c | 0 .../apreq_parser_urlencoded.c | 0 .../library/util.c => server/apreq_util.c | 0 srclib/libapreq/include/apreq_version.h | 105 ------------------ srclib/libapreq/library/version.c | 36 ------ 25 files changed, 18 insertions(+), 150 deletions(-) rename {srclib/libapreq/include => include}/apreq.h (100%) rename {srclib/libapreq/include => include}/apreq_cookie.h (100%) rename {srclib/libapreq/include => include}/apreq_error.h (100%) rename {srclib/libapreq/include => include}/apreq_module.h (100%) rename {srclib/libapreq/include => include}/apreq_param.h (100%) rename {srclib/libapreq/include => include}/apreq_parser.h (100%) rename {srclib/libapreq/include => include}/apreq_util.h (100%) rename srclib/libapreq/library/cookie.c => server/apreq_cookie.c (100%) rename srclib/libapreq/library/error.c => server/apreq_error.c (100%) rename srclib/libapreq/library/module.c => server/apreq_module.c (100%) rename srclib/libapreq/library/module_cgi.c => server/apreq_module_cgi.c (100%) rename srclib/libapreq/library/module_custom.c => server/apreq_module_custom.c (100%) rename srclib/libapreq/library/param.c => server/apreq_param.c (100%) rename srclib/libapreq/library/parser.c => server/apreq_parser.c (100%) rename srclib/libapreq/library/parser_header.c => server/apreq_parser_header.c (100%) rename srclib/libapreq/library/parser_multipart.c => server/apreq_parser_multipart.c (100%) rename srclib/libapreq/library/parser_urlencoded.c => server/apreq_parser_urlencoded.c (100%) rename srclib/libapreq/library/util.c => server/apreq_util.c (100%) delete mode 100644 srclib/libapreq/include/apreq_version.h delete mode 100644 srclib/libapreq/library/version.c diff --git a/build/make_exports.awk b/build/make_exports.awk index 1cf0568414..3bbba19aa0 100644 --- a/build/make_exports.awk +++ b/build/make_exports.awk @@ -88,8 +88,8 @@ function add_symbol(symbol) { } } -/^[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { - sub("[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "") +/^[ \t]*(AP|APR|APU|APREQ)_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { + sub("[ \t]*(AP|APR|APU|APREQ)?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "") sub("[(].*", "") sub("([^ ]* (^([ \t]*[(])))+", "") diff --git a/srclib/libapreq/include/apreq.h b/include/apreq.h similarity index 100% rename from srclib/libapreq/include/apreq.h rename to include/apreq.h diff --git a/srclib/libapreq/include/apreq_cookie.h b/include/apreq_cookie.h similarity index 100% rename from srclib/libapreq/include/apreq_cookie.h rename to include/apreq_cookie.h diff --git a/srclib/libapreq/include/apreq_error.h b/include/apreq_error.h similarity index 100% rename from srclib/libapreq/include/apreq_error.h rename to include/apreq_error.h diff --git a/srclib/libapreq/include/apreq_module.h b/include/apreq_module.h similarity index 100% rename from srclib/libapreq/include/apreq_module.h rename to include/apreq_module.h diff --git a/srclib/libapreq/include/apreq_param.h b/include/apreq_param.h similarity index 100% rename from srclib/libapreq/include/apreq_param.h rename to include/apreq_param.h diff --git a/srclib/libapreq/include/apreq_parser.h b/include/apreq_parser.h similarity index 100% rename from srclib/libapreq/include/apreq_parser.h rename to include/apreq_parser.h diff --git a/srclib/libapreq/include/apreq_util.h b/include/apreq_util.h similarity index 100% rename from srclib/libapreq/include/apreq_util.h rename to include/apreq_util.h diff --git a/modules/apreq/Makefile.in b/modules/apreq/Makefile.in index e69de29bb2..f34af9cbd6 100644 --- a/modules/apreq/Makefile.in +++ b/modules/apreq/Makefile.in @@ -0,0 +1 @@ +include $(top_srcdir)/build/special.mk diff --git a/modules/apreq/config.m4 b/modules/apreq/config.m4 index e69de29bb2..a61c4231b0 100644 --- a/modules/apreq/config.m4 +++ b/modules/apreq/config.m4 @@ -0,0 +1,9 @@ +dnl modules enabled in this directory by default + +dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) + +APACHE_MODPATH_INIT(apreq) + +APACHE_MODULE(apreq, Apache Request Filter, filter.lo handle.lo, , most) + +APACHE_MODPATH_FINISH diff --git a/modules/apreq/filter.c b/modules/apreq/filter.c index ef122ba450..b682e6dbed 100644 --- a/modules/apreq/filter.c +++ b/modules/apreq/filter.c @@ -28,7 +28,6 @@ #include "apreq_private_apache2.h" #include "apreq_error.h" #include "apreq_util.h" -#include "apreq_version.h" static void *apreq_create_dir_config(apr_pool_t *p, char *d) { @@ -424,11 +423,6 @@ static int apreq_post_init(apr_pool_t *p, apr_pool_t *plog, { apr_status_t status; - ap_add_version_component(p, apr_psprintf(p, - "mod_apreq2-%d/%s", - APREQ_APACHE2_MMN, - apreq_version_string())); - status = apreq_post_initialize(p); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, base_server, diff --git a/server/Makefile.in b/server/Makefile.in index 42d1fe5c14..6511af2bf0 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -14,7 +14,12 @@ LTLIBRARY_SOURCES = \ util_filter.c util_pcre.c util_regex.c exports.c \ scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \ eoc_bucket.c eor_bucket.c core_filters.c \ - util_expr_parse.c util_expr_scan.c util_expr_eval.c + util_expr_parse.c util_expr_scan.c util_expr_eval.c \ + apreq_cookie.c apreq_error.c apreq_module.c \ + apreq_module_cgi.c apreq_module_custom.c apreq_param.c \ + apreq_parser.c apreq_parser_header.c apreq_parser_multipart.c \ + apreq_parser_urlencoded.c apreq_util.c + LTLIBRARY_DEPENDENCIES = test_char.h TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp diff --git a/srclib/libapreq/library/cookie.c b/server/apreq_cookie.c similarity index 100% rename from srclib/libapreq/library/cookie.c rename to server/apreq_cookie.c diff --git a/srclib/libapreq/library/error.c b/server/apreq_error.c similarity index 100% rename from srclib/libapreq/library/error.c rename to server/apreq_error.c diff --git a/srclib/libapreq/library/module.c b/server/apreq_module.c similarity index 100% rename from srclib/libapreq/library/module.c rename to server/apreq_module.c diff --git a/srclib/libapreq/library/module_cgi.c b/server/apreq_module_cgi.c similarity index 100% rename from srclib/libapreq/library/module_cgi.c rename to server/apreq_module_cgi.c diff --git a/srclib/libapreq/library/module_custom.c b/server/apreq_module_custom.c similarity index 100% rename from srclib/libapreq/library/module_custom.c rename to server/apreq_module_custom.c diff --git a/srclib/libapreq/library/param.c b/server/apreq_param.c similarity index 100% rename from srclib/libapreq/library/param.c rename to server/apreq_param.c diff --git a/srclib/libapreq/library/parser.c b/server/apreq_parser.c similarity index 100% rename from srclib/libapreq/library/parser.c rename to server/apreq_parser.c diff --git a/srclib/libapreq/library/parser_header.c b/server/apreq_parser_header.c similarity index 100% rename from srclib/libapreq/library/parser_header.c rename to server/apreq_parser_header.c diff --git a/srclib/libapreq/library/parser_multipart.c b/server/apreq_parser_multipart.c similarity index 100% rename from srclib/libapreq/library/parser_multipart.c rename to server/apreq_parser_multipart.c diff --git a/srclib/libapreq/library/parser_urlencoded.c b/server/apreq_parser_urlencoded.c similarity index 100% rename from srclib/libapreq/library/parser_urlencoded.c rename to server/apreq_parser_urlencoded.c diff --git a/srclib/libapreq/library/util.c b/server/apreq_util.c similarity index 100% rename from srclib/libapreq/library/util.c rename to server/apreq_util.c diff --git a/srclib/libapreq/include/apreq_version.h b/srclib/libapreq/include/apreq_version.h deleted file mode 100644 index 8f5b8d2796..0000000000 --- a/srclib/libapreq/include/apreq_version.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -** Licensed to the Apache Software Foundation (ASF) under one or more -** contributor license agreements. See the NOTICE file distributed with -** this work for additional information regarding copyright ownership. -** The ASF licenses this file to You under the Apache License, Version 2.0 -** (the "License"); you may not use this file except in compliance with -** the License. You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#ifndef APREQ_VERSION_H -#define APREQ_VERSION_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "apr_version.h" -#include "apreq.h" - -/** - * @file apreq_version.h - * @brief Versioning API for libapreq - * @ingroup libapreq2 - * - * There are several different mechanisms for accessing the version. There - * is a string form, and a set of numbers; in addition, there are constants - * which can be compiled into your application, and you can query the library - * being used for its actual version. - * - * Note that it is possible for an application to detect that it has been - * compiled against a different version of libapreq by use of the compile-time - * constants and the use of the run-time query function. - * - * libapreq version numbering follows the guidelines specified in: - * - * http://apr.apache.org/versioning.html - */ - -/* The numeric compile-time version constants. These constants are the - * authoritative version numbers for libapreq. - */ - -/** major version - * Major API changes that could cause compatibility problems for older - * programs such as structure size changes. No binary compatibility is - * possible across a change in the major version. - */ -#define APREQ_MAJOR_VERSION 2 - -/** - * Minor API changes that do not cause binary compatibility problems. - * Should be reset to 0 when upgrading APREQ_MAJOR_VERSION - */ -#define APREQ_MINOR_VERSION 8 - -/** patch level */ -#define APREQ_PATCH_VERSION 0 - -/** - * This symbol is defined for internal, "development" copies of libapreq. - * This symbol will be \#undef'd for releases. - */ -#define APREQ_IS_DEV_VERSION - - -/** The formatted string of libapreq's version */ -#define APREQ_VERSION_STRING \ - APR_STRINGIFY(APREQ_MAJOR_VERSION) "." \ - APR_STRINGIFY(APREQ_MINOR_VERSION) "." \ - APR_STRINGIFY(APREQ_PATCH_VERSION) \ - APREQ_IS_DEV_STRING - -/** - * Return libapreq's version information information in a numeric form. - * - * @param pvsn Pointer to a version structure for returning the version - * information. - */ -APREQ_DECLARE(void) apreq_version(apr_version_t *pvsn); - -/** Return libapreq's version information as a string. */ -APREQ_DECLARE(const char *) apreq_version_string(void); - - -/** Internal: string form of the "is dev" flag */ -#ifdef APREQ_IS_DEV_VERSION -#define APREQ_IS_DEV_STRING "-dev" -#else -#define APREQ_IS_DEV_STRING "" -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* APREQ_VERSION_H */ diff --git a/srclib/libapreq/library/version.c b/srclib/libapreq/library/version.c deleted file mode 100644 index 5cfd767c12..0000000000 --- a/srclib/libapreq/library/version.c +++ /dev/null @@ -1,36 +0,0 @@ -/* -** Licensed to the Apache Software Foundation (ASF) under one or more -** contributor license agreements. See the NOTICE file distributed with -** this work for additional information regarding copyright ownership. -** The ASF licenses this file to You under the Apache License, Version 2.0 -** (the "License"); you may not use this file except in compliance with -** the License. You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#include "apreq_version.h" -#include "apr_general.h" /* for APR_STRINGIFY */ - -APREQ_DECLARE(void) apreq_version(apr_version_t *pvsn) -{ - pvsn->major = APREQ_MAJOR_VERSION; - pvsn->minor = APREQ_MINOR_VERSION; - pvsn->patch = APREQ_PATCH_VERSION; -#ifdef APREQ_IS_DEV_VERSION - pvsn->is_dev = 1; -#else - pvsn->is_dev = 0; -#endif -} - -APREQ_DECLARE(const char *) apreq_version_string(void) -{ - return APREQ_VERSION_STRING; -} -- 2.40.0