diff options
author | Guenter Knauf <fuankg@apache.org> | 2011-11-14 21:39:19 +0000 |
---|---|---|
committer | Guenter Knauf <fuankg@apache.org> | 2011-11-14 21:39:19 +0000 |
commit | 69218cb9126e098cae7e2a7095dd38f66363603f (patch) | |
tree | 932126825e30b8ab8c7cf285c3791658c3390b93 | |
parent | 4d4bf43429a9f9b5226b752a4247f6a42f020c55 (diff) | |
download | httpd-69218cb9126e098cae7e2a7095dd38f66363603f.tar.gz |
Added apreq to NetWare build.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201918 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | NWGNUmakefile | 11 | ||||
-rw-r--r-- | build/make_nw_export.awk | 4 | ||||
-rw-r--r-- | build/nw_export.inc | 12 | ||||
-rw-r--r-- | include/ap_config.h | 46 | ||||
-rw-r--r-- | include/apreq.h | 49 | ||||
-rw-r--r-- | include/apreq_error.h | 5 | ||||
-rw-r--r-- | include/apreq_parser.h | 4 | ||||
-rw-r--r-- | include/apreq_util.h | 2 | ||||
-rw-r--r-- | modules/NWGNUmakefile | 1 | ||||
-rw-r--r-- | modules/apreq/NWGNUmakefile | 250 |
10 files changed, 330 insertions, 54 deletions
diff --git a/NWGNUmakefile b/NWGNUmakefile index c52971a7ed..411d7755b3 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -226,6 +226,17 @@ TARGET_lib = \ # Paths must all use the '/' character # FILES_nlm_objs = \ + $(OBJDIR)/apreq_cookie.o \ + $(OBJDIR)/apreq_error.o \ + $(OBJDIR)/apreq_module.o \ + $(OBJDIR)/apreq_module_cgi.o \ + $(OBJDIR)/apreq_module_custom.o \ + $(OBJDIR)/apreq_param.o \ + $(OBJDIR)/apreq_parser.o \ + $(OBJDIR)/apreq_parser_header.o \ + $(OBJDIR)/apreq_parser_multipart.o \ + $(OBJDIR)/apreq_parser_urlencoded.o \ + $(OBJDIR)/apreq_util.o \ $(OBJDIR)/buildmark.o \ $(OBJDIR)/config.o \ $(OBJDIR)/connection.o \ diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk index 52f43e531c..da2765d4a7 100644 --- a/build/make_nw_export.awk +++ b/build/make_nw_export.awk @@ -29,8 +29,8 @@ function add_symbol(sym_name) { #/ap_some_name/{next} /ap_mpm_pod_/{next} -/^[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { - sub("[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "") +/^[ \t]*(AP|DAV)([RU]|REQ|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { + sub("[ \t]*(AP|DAV)([RU]|REQ|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "") sub("[(].*", "") sub("([^ ]* (^([ \t]*[(])))+", "") add_symbol($0) diff --git a/build/nw_export.inc b/build/nw_export.inc index 0d448ec77a..32c769b27f 100644 --- a/build/nw_export.inc +++ b/build/nw_export.inc @@ -23,6 +23,12 @@ #define APR_DECLARE_OPTIONAL_FN APR_DECLARE_OPTIONAL_FN #undef APR_DECLARE_EXTERNAL_HOOK #define APR_DECLARE_EXTERNAL_HOOK APR_DECLARE_EXTERNAL_HOOK +#undef APREQ_DECLARE +#define APREQ_DECLARE APREQ_DECLARE +#undef APREQ_DECLARE_NONSTD +#define APREQ_DECLARE_NONSTD APREQ_DECLARE_NONSTD +#undef APREQ_DECLARE_DATA +#define APREQ_DECLARE_DATA APREQ_DECLARE_DATA #undef APACHE_OS_H #include "httpd.h" @@ -35,6 +41,12 @@ #include "ap_provider.h" #include "ap_release.h" #include "ap_expr.h" +#include "apreq_cookie.h" +#include "apreq_error.h" +#include "apreq_module.h" +#include "apreq_param.h" +#include "apreq_parser.h" +#include "apreq_util.h" #include "http_config.h" #include "http_connection.h" #include "http_core.h" diff --git a/include/ap_config.h b/include/ap_config.h index 1a22329bf9..4f0500368e 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -102,6 +102,52 @@ #define AP_DECLARE_DATA __declspec(dllimport) #endif +#if !defined(WIN32) +/** + * The public APREQ functions are declared with APREQ_DECLARE(), so they may + * use the most appropriate calling convention. Public APR functions with + * variable arguments must use APR_DECLARE_NONSTD(). + * + * @remark Both the declaration and implementations must use the same macro. + */ +/** APREQ_DECLARE(rettype) apeq_func(args) + */ +#define APREQ_DECLARE(d) APR_DECLARE(d) +/** + * The public APEQ functions using variable arguments are declared with + * APEQ_DECLARE_NONSTD(), as they must follow the C language calling convention. + * @see APEQ_DECLARE @see APEQ_DECLARE_DATA + * @remark Both the declaration and implementations must use the same macro. + * @example + */ +/** APEQ_DECLARE_NONSTD(rettype) apr_func(args, ...); + */ +#define APREQ_DECLARE_NONSTD(d) APR_DECLARE_NONSTD(d) +/** + * The public APREQ variables are declared with APREQ_DECLARE_DATA. + * This assures the appropriate indirection is invoked at compile time. + * @see APREQ_DECLARE @see APREQ_DECLARE_NONSTD + * @remark Note that the declaration and implementations use different forms, + * but both must include the macro. + */ +/** extern APREQ_DECLARE_DATA type apr_variable;\n + * APREQ_DECLARE_DATA type apr_variable = value; + */ +#define APREQ_DECLARE_DATA +#elif defined (APREQ_DECLARE_STATIC) +#define APREQ_DECLARE(type) type __stdcall +#define APREQ_DECLARE_NONSTD(type) type +#define APREQ_DECLARE_DATA +#elif defined (APREQ_DECLARE_EXPORT) +#define APREQ_DECLARE(type) __declspec(dllexport) type __stdcall +#define APREQ_DECLARE_NONSTD(type) __declspec(dllexport) type +#define APREQ_DECLARE_DATA __declspec(dllexport) +#else +#define APREQ_DECLARE(type) __declspec(dllimport) type __stdcall +#define APREQ_DECLARE_NONSTD(type) __declspec(dllimport) type +#define APREQ_DECLARE_DATA __declspec(dllimport) +#endif + #if !defined(WIN32) || defined(AP_MODULE_DECLARE_STATIC) /** * Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA. diff --git a/include/apreq.h b/include/apreq.h index 2d1ba5eba0..9faebdb0b7 100644 --- a/include/apreq.h +++ b/include/apreq.h @@ -22,6 +22,7 @@ #include <assert.h> #endif +#include "ap_config.h" #include "apr_tables.h" #include <stddef.h> @@ -34,55 +35,9 @@ * @brief Main header file... * @ingroup libapreq2 * - * Define the generic APREQ_ macros and common data structures. + * Define the common data structures. */ -#ifndef WIN32 -/** - * The public APREQ functions are declared with APREQ_DECLARE(), so they may - * use the most appropriate calling convention. Public APR functions with - * variable arguments must use APR_DECLARE_NONSTD(). - * - * @remark Both the declaration and implementations must use the same macro. - */ -/** APREQ_DECLARE(rettype) apeq_func(args) - */ -#define APREQ_DECLARE(d) APR_DECLARE(d) -/** - * The public APEQ functions using variable arguments are declared with - * APEQ_DECLARE_NONSTD(), as they must follow the C language calling convention. - * @see APEQ_DECLARE @see APEQ_DECLARE_DATA - * @remark Both the declaration and implementations must use the same macro. - * @example - */ -/** APEQ_DECLARE_NONSTD(rettype) apr_func(args, ...); - */ -#define APREQ_DECLARE_NONSTD(d) APR_DECLARE_NONSTD(d) -/** - * The public APREQ variables are declared with APREQ_DECLARE_DATA. - * This assures the appropriate indirection is invoked at compile time. - * @see APREQ_DECLARE @see APREQ_DECLARE_NONSTD - * @remark Note that the declaration and implementations use different forms, - * but both must include the macro. - */ -/** extern APREQ_DECLARE_DATA type apr_variable;\n - * APREQ_DECLARE_DATA type apr_variable = value; - */ -#define APREQ_DECLARE_DATA -#elif defined (APREQ_DECLARE_STATIC) -#define APREQ_DECLARE(type) type __stdcall -#define APREQ_DECLARE_NONSTD(type) type -#define APREQ_DECLARE_DATA -#elif defined (APREQ_DECLARE_EXPORT) -#define APREQ_DECLARE(type) __declspec(dllexport) type __stdcall -#define APREQ_DECLARE_NONSTD(type) __declspec(dllexport) type -#define APREQ_DECLARE_DATA __declspec(dllexport) -#else -#define APREQ_DECLARE(type) __declspec(dllimport) type __stdcall -#define APREQ_DECLARE_NONSTD(type) __declspec(dllimport) type -#define APREQ_DECLARE_DATA __declspec(dllimport) -#endif - /** * Read chucks of data in 64k blocks from the request */ diff --git a/include/apreq_error.h b/include/apreq_error.h index b2de1fd2be..d669b89cdf 100644 --- a/include/apreq_error.h +++ b/include/apreq_error.h @@ -29,8 +29,9 @@ * apreq's wrapper around apr_strerror(); * recognizes APREQ_ERROR_* status codes. */ -APREQ_DECLARE(char *) -apreq_strerror(apr_status_t s, char *buf, apr_size_t bufsize); +APREQ_DECLARE(char *) apreq_strerror(apr_status_t s, + char *buf, + apr_size_t bufsize); /** * @file apreq_error.h diff --git a/include/apreq_parser.h b/include/apreq_parser.h index 1c9c36ce23..e719b8b019 100644 --- a/include/apreq_parser.h +++ b/include/apreq_parser.h @@ -67,13 +67,13 @@ typedef apr_status_t (*apreq_hook_function_t)(APREQ_HOOK_ARGS); * Declares a API parser. */ #define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \ - (f) (APREQ_PARSER_ARGS) + f (APREQ_PARSER_ARGS) /** * Declares an API hook. */ #define APREQ_DECLARE_HOOK(f) APREQ_DECLARE_NONSTD(apr_status_t) \ - (f) (APREQ_HOOK_ARGS) + f (APREQ_HOOK_ARGS) /** * A hook is called by the parser whenever data arrives in a file diff --git a/include/apreq_util.h b/include/apreq_util.h index feb2d396ce..c8708f41d2 100644 --- a/include/apreq_util.h +++ b/include/apreq_util.h @@ -434,7 +434,7 @@ APREQ_DECLARE(apr_status_t) apreq_brigade_concat(apr_pool_t *pool, * @param bb the bucket brigade * @return the spool file, or NULL. */ -APREQ_DECLARE(apr_file_t *)apreq_brigade_spoolfile(apr_bucket_brigade *bb); +APREQ_DECLARE(apr_file_t *) apreq_brigade_spoolfile(apr_bucket_brigade *bb); #ifdef __cplusplus } diff --git a/modules/NWGNUmakefile b/modules/NWGNUmakefile index b929d01a54..0e87b42b2a 100644 --- a/modules/NWGNUmakefile +++ b/modules/NWGNUmakefile @@ -27,6 +27,7 @@ endif SUBDIRS = \ aaa \ + apreq \ cache \ cluster \ dav/main \ diff --git a/modules/apreq/NWGNUmakefile b/modules/apreq/NWGNUmakefile new file mode 100644 index 0000000000..0e46e3c4ac --- /dev/null +++ b/modules/apreq/NWGNUmakefile @@ -0,0 +1,250 @@ +# +# Make sure all needed macro's are defined +# + +# +# Get the 'head' of the build environment if necessary. This includes default +# targets and paths to tools +# + +ifndef EnvironmentDefined +include $(AP_WORK)/build/NWGNUhead.inc +endif + +# +# These directories will be at the beginning of the include list, followed by +# INCDIRS +# +XINCDIRS += \ + $(APR)/include \ + $(APRUTIL)/include \ + $(AP_WORK)/include \ + $(NWOS) \ + $(EOLIST) + +# +# These flags will come after CFLAGS +# +XCFLAGS += \ + $(EOLIST) + +# +# These defines will come after DEFINES +# +XDEFINES += \ + $(EOLIST) + +# +# These flags will be added to the link.opt file +# +XLFLAGS += \ + $(EOLIST) + +# +# These values will be appended to the correct variables based on the value of +# RELEASE +# +ifeq "$(RELEASE)" "debug" +XINCDIRS += \ + $(EOLIST) + +XCFLAGS += \ + $(EOLIST) + +XDEFINES += \ + $(EOLIST) + +XLFLAGS += \ + $(EOLIST) +endif + +ifeq "$(RELEASE)" "noopt" +XINCDIRS += \ + $(EOLIST) + +XCFLAGS += \ + $(EOLIST) + +XDEFINES += \ + $(EOLIST) + +XLFLAGS += \ + $(EOLIST) +endif + +ifeq "$(RELEASE)" "release" +XINCDIRS += \ + $(EOLIST) + +XCFLAGS += \ + $(EOLIST) + +XDEFINES += \ + $(EOLIST) + +XLFLAGS += \ + $(EOLIST) +endif + +# +# These are used by the link target if an NLM is being generated +# This is used by the link 'name' directive to name the nlm. If left blank +# TARGET_nlm (see below) will be used. +# +NLM_NAME = mod_apreq + +# +# This is used by the link '-desc ' directive. +# If left blank, NLM_NAME will be used. +# +NLM_DESCRIPTION = Apache $(VERSION_STR) Request Filter Module + +# +# This is used by the '-threadname' directive. If left blank, +# NLM_NAME Thread will be used. +# +NLM_THREAD_NAME = apreq Module + +# +# If this is specified, it will override VERSION value in +# $(AP_WORK)/build/NWGNUenvironment.inc +# +NLM_VERSION = + +# +# If this is specified, it will override the default of 64K +# +NLM_STACK_SIZE = 8192 + + +# +# If this is specified it will be used by the link '-entry' directive +# +NLM_ENTRY_SYM = + +# +# If this is specified it will be used by the link '-exit' directive +# +NLM_EXIT_SYM = + +# +# If this is specified it will be used by the link '-check' directive +# +NLM_CHECK_SYM = + +# +# If these are specified it will be used by the link '-flags' directive +# +NLM_FLAGS = + +# +# If this is specified it will be linked in with the XDCData option in the def +# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled +# by setting APACHE_UNIPROC in the environment +# +XDCDATA = + +# +# If there is an NLM target, put it here +# +TARGET_nlm = \ + $(OBJDIR)/$(NLM_NAME).nlm \ + $(EOLIST) + +# +# If there is an LIB target, put it here +# +TARGET_lib = \ + $(EOLIST) + +# +# These are the OBJ files needed to create the NLM target above. +# Paths must all use the '/' character +# +FILES_nlm_objs = \ + $(OBJDIR)/filter.o \ + $(OBJDIR)/handle.o \ + $(EOLIST) + +# +# These are the LIB files needed to create the NLM target above. +# These will be added as a library command in the link.opt file. +# +FILES_nlm_libs = \ + $(PRELUDE) \ + $(EOLIST) + +# +# These are the modules that the above NLM target depends on to load. +# These will be added as a module command in the link.opt file. +# +FILES_nlm_modules = \ + aprlib \ + libc \ + $(EOLIST) + +# +# If the nlm has a msg file, put it's path here +# +FILE_nlm_msg = + +# +# If the nlm has a hlp file put it's path here +# +FILE_nlm_hlp = + +# +# If this is specified, it will override $(NWOS)\copyright.txt. +# +FILE_nlm_copyright = + +# +# Any additional imports go here +# +FILES_nlm_Ximports = \ + @aprlib.imp \ + @httpd.imp \ + @libc.imp \ + $(EOLIST) + +# +# Any symbols exported to here +# +FILES_nlm_exports = \ + apreq_module \ + $(EOLIST) + +# +# These are the OBJ files needed to create the LIB target above. +# Paths must all use the '/' character +# +FILES_lib_objs = \ + $(EOLIST) + +# +# implement targets and dependancies (leave this section alone) +# + +libs :: $(OBJDIR) $(TARGET_lib) + +nlms :: libs $(TARGET_nlm) + +# +# Updated this target to create necessary directories and copy files to the +# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples) +# +install :: nlms FORCE + $(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/) + +# +# Any specialized rules here +# + +# +# Include the 'tail' makefile that has targets that depend on variables defined +# in this makefile +# + +include $(APBUILD)/NWGNUtail.inc + + |