diff --git a/httpd/httpd_2_2/ap_config.inc b/httpd/httpd_2_2/ap_config.inc index 801fde509..b29227050 100644 --- a/httpd/httpd_2_2/ap_config.inc +++ b/httpd/httpd_2_2/ap_config.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -246,3 +246,10 @@ {$define AP_HAVE_RELIABLE_PIPED_LOGS} {$endif} +{ Presume that the compiler supports C99-style designated + * initializers if using GCC (but not G++), or for any other compiler + * which claims C99 support. } +//#if (defined(__GNUC__) && !defined(__cplusplus)) \ +// || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) +//#define AP_HAVE_DESIGNATED_INITIALIZER +{.$endif} diff --git a/httpd/httpd_2_2/ap_mmn.inc b/httpd/httpd_2_2/ap_mmn.inc index 8e4ec081c..b456f768c 100644 --- a/httpd/httpd_2_2/ap_mmn.inc +++ b/httpd/httpd_2_2/ap_mmn.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -42,10 +42,10 @@ * 20011127 (2.0.29-dev) bump for postconfig hook change, and removal of socket * from connection record * 20011212 (2.0.30-dev) bump for new used_path_info member of request_rec - * 20011218 (2.0.30-dev) bump for new sbh member of conn_rec, different + * 20011218 (2.0.30-dev) bump for new sbh member of conn_rec, different * declarations for scoreboard, new parameter to * create_connection hook - * 20020102 (2.0.30-dev) bump for changed type of limit_req_body in + * 20020102 (2.0.30-dev) bump for changed type of limit_req_body in * core_dir_config * 20020109 (2.0.31-dev) bump for changed shm and scoreboard declarations * 20020111 (2.0.31-dev) bump for ETag fields added at end of cor_dir_config @@ -70,27 +70,47 @@ * 20020625 (2.0.40-dev) Changed conn_rec->keepalive to an enumeration * 20020628 (2.0.40-dev) Added filter_init to filter registration functions * 20020903 (2.0.41-dev) APR's error constants changed + * 20020903.1 (2.1.0-dev) allow_encoded_slashes added to core_dir_config * 20020903.2 (2.0.46-dev) add ap_escape_logitem - * 20020903.3 (2.0.46-dev) allow_encoded_slashes added to core_dir_config - * 20020903.4 (2.0.47-dev) add ap_is_recursion_limit_exceeded() - * 20020903.5 (2.0.49-dev) add ap_escape_errorlog_item() - * 20020903.6 (2.0.49-dev) add insert_error_filter hook - * 20020903.7 (2.0.49-dev) added XHTML Doctypes - * 20020903.8 (2.0.50-dev) export ap_set_sub_req_protocol and - * ap_finalize_sub_req_protocol on Win32 and NetWare - * 20020903.9 (2.0.51-dev) create pcommands and initialize arrays before - * calling ap_setup_prelinked_modules - * 20020903.10 (2.0.55-dev) add ap_log_cerror() - * 20020903.11 (2.0.55-dev) added trace_enable to core_server_config - * 20020903.12 (2.0.56-dev) added ap_get_server_revision / ap_version_t + * 20030213.1 (2.1.0-dev) changed log_writer optional fn's to return previous + * handler + * 20030821 (2.1.0-dev) bumped mod_include's entire API + * 20030821.1 (2.1.0-dev) added XHTML doctypes + * 20030821.2 (2.1.0-dev) added ap_escape_errorlog_item + * 20030821.3 (2.1.0-dev) added ap_get_server_revision / ap_version_t + * 20040425 (2.1.0-dev) removed ap_add_named_module API + * changed ap_add_module, ap_add_loaded_module, + * ap_setup_prelinked_modules, ap_process_resource_config + * 20040425.1 (2.1.0-dev) Added ap_module_symbol_t and ap_prelinked_module_symbols + * 20050101.0 (2.1.2-dev) Axed misnamed http_method for http_scheme (which it was!) + * 20050127.0 (2.1.3-dev) renamed regex_t->ap_regex_t, regmatch_t->ap_regmatch_t, + * REG_*->AP_REG_*, removed reg* in place of ap_reg*; + * added ap_regex.h + * 20050217.0 (2.1.3-dev) Axed find_child_by_pid, mpm_*_completion_context (winnt mpm) + * symbols from the public sector, and decorated real_exit_code + * with ap_ in the win32 os.h. + * 20050305.0 (2.1.4-dev) added pid and generation fields to worker_score + * 20050305.1 (2.1.5-dev) added ap_vhost_iterate_given_conn. + * 20050305.2 (2.1.5-dev) added AP_INIT_TAKE_ARGV. + * 20050305.3 (2.1.5-dev) added Protocol Framework. + * 20050701.0 (2.1.7-dev) Bump MODULE_MAGIC_COOKIE to "AP21"! + * 20050701.1 (2.1.7-dev) trace_enable member added to core server_config + * 20050708.0 (2.1.7-dev) Bump MODULE_MAGIC_COOKIE to "AP22"! + * 20050708.1 (2.1.7-dev) add proxy request_status hook (minor) + * 20051006.0 (2.1.8-dev) NET_TIME filter eliminated + * 20051115.0 (2.1.10-dev/2.2.0) add use_canonical_phys_port to core_dir_config + * 20051115.1 (2.2.1) flush_packets and flush_wait members added to + * proxy_server (minor) + * 20051115.2 (2.2.2) added inreslist member to proxy_conn_rec (minor) + * 20051115.3 (2.2.3) Added server_scheme member to server_rec (minor) } const - MODULE_MAGIC_COOKIE = $41503230; { "AP20" } + MODULE_MAGIC_COOKIE = $41503232; { "AP22" } - MODULE_MAGIC_NUMBER_MAJOR = 20020903; { For 2.0.58 Also works for 2.0.54} + MODULE_MAGIC_NUMBER_MAJOR = 20051115; { For 2.2.3 } - MODULE_MAGIC_NUMBER_MINOR = 12; // 0...n + MODULE_MAGIC_NUMBER_MINOR = 3; // 0...n { * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/httpd/httpd_2_2/ap_mpm.inc b/httpd/httpd_2_2/ap_mpm.inc index 83af0fbfc..ed6a1bb32 100644 --- a/httpd/httpd_2_2/ap_mpm.inc +++ b/httpd/httpd_2_2/ap_mpm.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -141,6 +141,7 @@ const AP_MPMQ_MAX_REQUESTS_DAEMON = 11; { Max # of requests per daemon } AP_MPMQ_MAX_DAEMONS = 12; { Max # of daemons by config } AP_MPMQ_MPM_STATE = 13; { starting, running, stopping } + AP_MPMQ_IS_ASYNC = 14; { MPM can process async connections } { * Query a property of the current MPM. diff --git a/httpd/httpd_2_2/ap_provider.inc b/httpd/httpd_2_2/ap_provider.inc index e14d2d34f..4fa67202f 100644 --- a/httpd/httpd_2_2/ap_provider.inc +++ b/httpd/httpd_2_2/ap_provider.inc @@ -1,9 +1,9 @@ -{ Copyright 2002-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -14,12 +14,17 @@ * limitations under the License. } -//#include "ap_config.h" - { * @package Provider API } +//#include "ap_config.h" + +type + ap_list_provider_names_t = record + provider_name: PChar; + end; + { * This function is used to register a provider with the global * provider pool. @@ -48,3 +53,16 @@ function ap_lookup_provider(provider_group, provider_name, provider_version: PCh {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_lookup_provider' + LibSuff12; +{ + * This function is used to retrieve a list (array) of provider + * names from the specified group with the specified version. + * @param pool The pool to create any storage from + * @param provider_group The group to look for this provider in + * @param provider_version The version for the provider + * @return pointer to array of ap_list_provider_names_t of provider names (could be empty) + } +function ap_list_provider_names(pool: Papr_pool_t; + const provider_group, provider_version: PChar): Papr_array_header_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibHTTPD name LibNamePrefix + 'ap_list_provider_names' + LibSuff12; + diff --git a/httpd/httpd_2_2/ap_release.inc b/httpd/httpd_2_2/ap_release.inc index ae8594ab6..727e0abee 100644 --- a/httpd/httpd_2_2/ap_release.inc +++ b/httpd/httpd_2_2/ap_release.inc @@ -1,8 +1,9 @@ -{ Copyright 2001-2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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 +{ 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 * @@ -17,8 +18,7 @@ const AP_SERVER_COPYRIGHT = - 'Copyright 2001-2006 The Apache Software Foundation' + - ' or its licensors, as applicable.'; + 'Copyright 2006 The Apache Software Foundation.'; { * The below defines the base string of the Server: header. Additional @@ -33,12 +33,19 @@ const * Example: "Apache/1.1.0 MrWidget/0.1-alpha" } AP_SERVER_BASEVENDOR = 'Apache Software Foundation'; + AP_SERVER_BASEPROJECT = 'Apache HTTP Server'; AP_SERVER_BASEPRODUCT = 'Apache'; AP_SERVER_MAJORVERSION_NUMBER = 2; - AP_SERVER_MINORVERSION_NUMBER = 0; - AP_SERVER_PATCHLEVEL_NUMBER = 58; + AP_SERVER_MINORVERSION_NUMBER = 2; + AP_SERVER_PATCHLEVEL_NUMBER = 3; + AP_SERVER_DEVBUILD_BOOLEAN = 0; + +{$ifdef AP_SERVER_DEVBUILD_BOOLEAN} + AP_SERVER_ADD_STRING = '-dev'; +{$else} AP_SERVER_ADD_STRING = ''; +{$endif} { keep old macros as well } {#define AP_SERVER_MAJORVERSION APR_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER) @@ -48,6 +55,12 @@ const #define AP_SERVER_MINORREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION #define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL -#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION -#define AP_SERVER_VERSION AP_SERVER_BASEVERSION} +#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION +#define AP_SERVER_VERSION AP_SERVER_BASEVERSION + +/* macro for Win32 .rc files using numeric csv representation */ +#define AP_SERVER_PATCHLEVEL_CSV AP_SERVER_MAJORVERSION_NUMBER ##, \ + ##AP_SERVER_MINORVERSION_NUMBER ##, \ + ##AP_SERVER_PATCHLEVEL_NUMBER +} diff --git a/httpd/httpd_2_2/apr/apr.pas b/httpd/httpd_2_2/apr/apr.pas index ea2be9f9c..beb8b5660 100644 --- a/httpd/httpd_2_2/apr/apr.pas +++ b/httpd/httpd_2_2/apr/apr.pas @@ -92,6 +92,9 @@ type apr_int64_t = Int64; apr_uint64_t = Int64; apr_socklen_t = Integer; + apr_byte_t = Byte; + + apr_uint32_tso_handle_t = cuint; type {$IFDEF WINDOWS} @@ -102,10 +105,11 @@ type {$ENDIF} apr_int32_t = Integer; + Papr_int32_t = ^Integer; apr_size_t = size_t; Papr_size_t = ^apr_size_t; - - va_list = Pointer; + apr_int16_t = SmallInt; + Papr_int16_t = ^SmallInt; // Network structures @@ -118,6 +122,10 @@ type s_addr: culong; // load with inet_aton() end; +{$ifndef windows} + + va_list = Pointer; + sockaddr_in = record sin_family: cshort; // e.g. AF_INET sin_port: cushort; // e.g. htons(3490) @@ -125,6 +133,8 @@ type sin_zero: array [1..8] of Char; // zero this if you want to end; +{$endif} + in6_addr = record Case Integer of 1: (u6_addr8: array [1..16] of Byte); @@ -182,6 +192,7 @@ type {$include apr_thread_proc.inc} {$include apr_version.inc} +{$include apr_poll.inc} implementation diff --git a/httpd/httpd_2_2/apr/apr_allocator.inc b/httpd/httpd_2_2/apr/apr_allocator.inc index 576db59a4..b2a2e2e65 100644 --- a/httpd/httpd_2_2/apr/apr_allocator.inc +++ b/httpd/httpd_2_2/apr/apr_allocator.inc @@ -31,16 +31,25 @@ type { the allocator structure } + apr_allocator_t = record end; Papr_allocator_t = ^apr_allocator_t; PPapr_allocator_t = ^Papr_allocator_t; - { the structure which holds information about the allocation } +{ the structure which holds information about the allocation } Papr_memnode_t = ^apr_memnode_t; PPapr_memnode_t = ^Papr_memnode_t; - { basic memory node structure } +{ basic memory node structure + * @note The next, ref and first_avail fields are available for use by the + * caller of apr_allocator_alloc(), the remaining fields are read-only. + * The next field has to be used with caution and sensibly set when the + * memnode is passed back to apr_allocator_free(). See apr_allocator_free() + * for details. + * The ref and first_avail fields will be properly restored by + * apr_allocator_free(). + } apr_memnode_t = record next: Papr_memnode_t; {< next memnode } @@ -89,7 +98,9 @@ function apr_allocator_alloc(allocator: Papr_allocator_t; external LibAPR name LibNamePrefix + 'apr_allocator_alloc' + LibSuff8; { - * Free a block of mem, giving it back to the allocator + * Free a list of blocks of mem, giving them back to the allocator. + * The list is typically terminated by a memnode with its next field + * set to NULL. * @param allocator The allocator to give the mem back to * @param memnode The memory node to return } @@ -114,10 +125,6 @@ procedure apr_allocator_owner_set(allocator: Papr_allocator_t; pool: Papr_pool_t {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_allocator_owner_set' + LibSuff8; -{ @deprecated @see apr_allocator_owner_set } -{APR_DECLARE(void) apr_allocator_set_owner(apr_allocator_t *allocator, - apr_pool_t *pool); -} { * Get the current owner of the allocator * @param allocator The allocator to get the owner from @@ -126,10 +133,6 @@ function apr_allocator_owner_get(allocator: Papr_allocator_t): Papr_pool_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_allocator_owner_get' + LibSuff4; -{ @deprecated @see apr_allocator_owner_get } -{APR_DECLARE(apr_pool_t *) apr_allocator_get_owner( - apr_allocator_t *allocator); -} { * Set the current threshold at which the allocator should start * giving blocks back to the system. @@ -140,11 +143,7 @@ procedure apr_allocator_max_free_set(allocator: Papr_allocator_t; size: apr_size {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_allocator_max_free_set' + LibSuff8; -{ @deprecated @see apr_allocator_max_free_set } -{APR_DECLARE(void) apr_allocator_set_max_free(apr_allocator_t *allocator, - apr_size_t size); - -#include "apr_thread_mutex.h"} +{#include "apr_thread_mutex.h"} {$ifdef APR_HAS_THREADS} { @@ -155,10 +154,6 @@ procedure apr_allocator_max_free_set(allocator: Papr_allocator_t; size: apr_size APR_DECLARE(void) apr_allocator_mutex_set(apr_allocator_t *allocator, apr_thread_mutex_t *mutex); -{ @deprecated @see apr_allocator_mutex_set } -APR_DECLARE(void) apr_allocator_set_mutex(apr_allocator_t *allocator, - apr_thread_mutex_t *mutex); - { * Get the mutex currently set for the allocator * @param allocator The allocator @@ -166,9 +161,5 @@ APR_DECLARE(void) apr_allocator_set_mutex(apr_allocator_t *allocator, APR_DECLARE(apr_thread_mutex_t *) apr_allocator_mutex_get( apr_allocator_t *allocator); -{ @deprecated @see apr_allocator_mutex_get } -APR_DECLARE(apr_thread_mutex_t *) apr_allocator_get_mutex( - apr_allocator_t *allocator); - {$endif} { APR_HAS_THREADS } diff --git a/httpd/httpd_2_2/apr/apr_buckets.inc b/httpd/httpd_2_2/apr/apr_buckets.inc index c018172bc..235213386 100644 --- a/httpd/httpd_2_2/apr/apr_buckets.inc +++ b/httpd/httpd_2_2/apr/apr_buckets.inc @@ -373,50 +373,6 @@ type } //#define APR_BRIGADE_LAST(b) APR_RING_LAST(&(b)->list) -{ - * Iterate through a bucket brigade - * @param e The current bucket - * @param b The brigade to iterate over - * @remark This is the same as either: - *
- * e = APR_BRIGADE_FIRST(b); - * while (e != APR_BRIGADE_SENTINEL(b)) ( - * ... - * e = APR_BUCKET_NEXT(e); - * ) - * OR - * for (e = APR_BRIGADE_FIRST(b); - * e != APR_BRIGADE_SENTINEL(b); - * e = APR_BUCKET_NEXT(e)) ( - * ... - * ) - *- * @warning Be aware that you cannot change the value of e within - * the foreach loop, nor can you destroy the bucket it points to. - * Modifying the prev and next pointers of the bucket is dangerous - * but can be done if you're careful. If you change e's value or - * destroy the bucket it points to, then APR_BRIGADE_FOREACH - * will have no way to find out what bucket to use for its next - * iteration. The reason for this can be seen by looking closely - * at the equivalent loops given in the tip above. So, for example, - * if you are writing a loop that empties out a brigade one bucket - * at a time, APR_BRIGADE_FOREACH just won't work for you. Do it - * by hand, like so: - *
- * while (!APR_BRIGADE_EMPTY(b)) ( - * e = APR_BRIGADE_FIRST(b); - * ... - * apr_bucket_delete(e); - * ) - *- * @deprecated This macro causes more headaches than it's worth. Use - * one of the alternatives documented here instead; the clarity gained - * in what's really going on is well worth the extra line or two of code. - * This macro will be removed at some point in the future. - } -//#define APR_BRIGADE_FOREACH(e, b) \ -// APR_RING_FOREACH((e), &(b)->list, apr_bucket, link) - { * Insert a list of buckets at the front of a brigade * @param b The brigade to add to @@ -767,22 +723,15 @@ type * @param b The brigade to partition * @param point The offset at which to partition the brigade * @param after_point Returns a pointer to the first bucket after the partition + * @return APR_SUCCESS on success, APR_INCOMPLETE if the contents of the + * brigade were shorter than @a point, or an error code. + * @remark if APR_INCOMPLETE is returned, @a after_point will be set to + * the brigade sentinel. } //APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b, // apr_off_t point, // apr_bucket **after_point); -//#if APR_NOT_DONE_YET -{ - * consume nbytes from beginning of b -- call apr_bucket_destroy as - * appropriate, and/or modify start on last element - * @param b The brigade to consume data from - * @param nbytes The number of bytes to consume - } -//APU_DECLARE(void) apr_brigade_consume(apr_bucket_brigade *b, -// apr_off_t nbytes); -//#endif - { * Return the total length of the brigade. * @param bb The brigade to compute the length of @@ -950,6 +899,25 @@ type void *ctx, const char *fmt, va_list va); } + +{ + * Utility function to insert a file (or a segment of a file) onto the + * end of the brigade. The file is split into multiple buckets if it + * is larger than the maximum size which can be represented by a + * single bucket. + * @param bb the brigade to insert into + * @param f the file to insert + * @param start the offset of the start of the segment + * @param len the length of the segment of the file to insert + * @param p pool from which file buckets are allocated + * @return the last bucket inserted + } +{APU_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb, + apr_file_t *f, + apr_off_t start, + apr_off_t len, + apr_pool_t *p);} + { ***** Bucket freelist functions ***** } { * Create a bucket allocator. diff --git a/httpd/httpd_2_2/apr/apr_errno.inc b/httpd/httpd_2_2/apr/apr_errno.inc index 1bbb7f002..c9d47a203 100644 --- a/httpd/httpd_2_2/apr/apr_errno.inc +++ b/httpd/httpd_2_2/apr/apr_errno.inc @@ -263,13 +263,15 @@ const APR_ESYMNOTFOUND = (APR_OS_START_ERROR + 26); { @see APR_STATUS_IS_EPROC_UNKNOWN } APR_EPROC_UNKNOWN = (APR_OS_START_ERROR + 27); +{ @see APR_STATUS_IS_ENOTENOUGHENTROPY } + APR_ENOTENOUGHENTROPY = (APR_OS_START_ERROR + 28); { * @defgroup APR_STATUS_IS Status Value Tests * @warning For any particular error condition, more than one of these tests * may match. This is because platform-specific error codes may not * always match the semantics of the POSIX codes these tests (and the - * correcponding APR error codes) are named after. A notable example + * corresponding APR error codes) are named after. A notable example * are the APR_STATUS_IS_ENOENT and APR_STATUS_IS_ENOTDIR tests on * Win32 platforms. The programmer should always be aware of this and * adjust the order of the tests accordingly. @@ -349,6 +351,9 @@ const { The given process was not recognized by APR. } //#define APR_STATUS_IS_EPROC_UNKNOWN(s) ((s) == APR_EPROC_UNKNOWN) +{ APR could not gather enough entropy to continue. } +//#define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY) + { * @addtogroup APR_Error } @@ -689,7 +694,8 @@ const #define APR_ECONNRESET (APR_OS_START_CANONERR + 19) #endif } -{ @see APR_STATUS_IS_ETIMEDOUT } +{* @see APR_STATUS_IS_ETIMEDOUT + * @deprecated} {#ifdef ETIMEDOUT #define APR_ETIMEDOUT ETIMEDOUT #else @@ -764,8 +770,6 @@ const } {#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e)) -#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \ - || (s) == APR_OS_START_SYSERR + NO_ERROR) } { These can't sit in a private header, so in spite of the extra size, * they need to be made available here. @@ -862,8 +866,12 @@ const || (s) == APR_OS_START_SYSERR + SOCECONNABORTED) #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ || (s) == APR_OS_START_SYSERR + SOCECONNRESET) -#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ - || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) +/* XXX deprecated */ +#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ + || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) +#undef APR_STATUS_IS_TIMEUP +#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ + || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH) #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ @@ -921,8 +929,6 @@ const {#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) -#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \ - || (s) == APR_OS_START_SYSERR + ERROR_SUCCESS) } { APR CANONICAL ERROR TESTS } {#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ @@ -997,7 +1003,12 @@ const #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \ || (s) == APR_OS_START_SYSERR + WSAECONNRESET) -#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ +/* XXX deprecated */ +#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ + || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ + || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) +#undef APR_STATUS_IS_TIMEUP +#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ @@ -1019,7 +1030,7 @@ const #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY) } -//#elif defined(NETWARE) && !defined(DOXYGEN) { !defined(OS2) && !defined(WIN32) } +//#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) { !defined(OS2) && !defined(WIN32) } { #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) @@ -1031,7 +1042,6 @@ const {#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) -#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS) } { APR CANONICAL ERROR TESTS } {#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) @@ -1062,7 +1072,12 @@ const || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ || (s) == APR_OS_START_SYSERR + WSAECONNRESET) -#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ +/* XXX deprecated */ +#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ + || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ + || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) +#undef APR_STATUS_IS_TIMEUP +#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ @@ -1094,8 +1109,6 @@ const { * @addtogroup APR_STATUS_IS } -{ no error } -//#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS) { permission denied } //#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) @@ -1171,7 +1184,8 @@ const } { Connection Reset by peer } //#define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET) -{ Operation timed out } +{* Operation timed out + * @deprecated} //#define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT) { no route to host } //#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH) diff --git a/httpd/httpd_2_2/apr/apr_file_info.inc b/httpd/httpd_2_2/apr/apr_file_info.inc index 9436d85c2..71df4fd59 100644 --- a/httpd/httpd_2_2/apr/apr_file_info.inc +++ b/httpd/httpd_2_2/apr/apr_file_info.inc @@ -70,25 +70,41 @@ type } const - APR_USETID = $8000; {< Set user id } - APR_UREAD = $0400; {< Read by user } - APR_UWRITE = $0200; {< Write by user } - APR_UEXECUTE = $0100; {< Execute by user } + APR_FPROT_USETID = $8000; {< Set user id } + APR_FPROT_UREAD = $0400; {< Read by user } + APR_FPROT_UWRITE = $0200; {< Write by user } + APR_FPROT_UEXECUTE = $0100; {< Execute by user } - APR_GSETID = $4000; {< Set group id } - APR_GREAD = $0040; {< Read by group } - APR_GWRITE = $0020; {< Write by group } - APR_GEXECUTE = $0010; {< Execute by group } + APR_FPROT_GSETID = $4000; {< Set group id } + APR_FPROT_GREAD = $0040; {< Read by group } + APR_FPROT_GWRITE = $0020; {< Write by group } + APR_FPROT_GEXECUTE = $0010; {< Execute by group } - APR_WSTICKY = $2000; {< Sticky bit } - APR_WREAD = $0004; {< Read by others } - APR_WWRITE = $0002; {< Write by others } - APR_WEXECUTE = $0001; {< Execute by others } + APR_FPROT_WSTICKY = $2000; {< Sticky bit } + APR_FPROT_WREAD = $0004; {< Read by others } + APR_FPROT_WWRITE = $0002; {< Write by others } + APR_FPROT_WEXECUTE = $0001; {< Execute by others } - APR_OS_DEFAULT = $0FFF; {< use OS's default permissions } + APR_FPROT_OS_DEFAULT = $0FFF; {< use OS's default permissions } { additional permission flags for apr_file_copy and apr_file_append } - APR_FILE_SOURCE_PERMS = $1000; {< Copy source file's permissions } + APR_FPROT_FILE_SOURCE_PERMS = $1000; {< Copy source file's permissions } + +{ backcompat } + APR_USETID = APR_FPROT_USETID; {< @deprecated @see APR_FPROT_USETID } + APR_UREAD = APR_FPROT_UREAD; {< @deprecated @see APR_FPROT_UREAD } + APR_UWRITE = APR_FPROT_UWRITE; {< @deprecated @see APR_FPROT_UWRITE } + APR_UEXECUTE = APR_FPROT_UEXECUTE; {< @deprecated @see APR_FPROT_UEXECUTE } + APR_GSETID = APR_FPROT_GSETID; {< @deprecated @see APR_FPROT_GSETID } + APR_GREAD = APR_FPROT_GREAD; {< @deprecated @see APR_FPROT_GREAD } + APR_GWRITE = APR_FPROT_GWRITE; {< @deprecated @see APR_FPROT_GWRITE } + APR_GEXECUTE = APR_FPROT_GEXECUTE; {< @deprecated @see APR_FPROT_GEXECUTE } + APR_WSTICKY = APR_FPROT_WSTICKY; {< @deprecated @see APR_FPROT_WSTICKY } + APR_WREAD = APR_FPROT_WREAD; {< @deprecated @see APR_FPROT_WREAD } + APR_WWRITE = APR_FPROT_WWRITE; {< @deprecated @see APR_FPROT_WWRITE } + APR_WEXECUTE = APR_FPROT_WEXECUTE; {< @deprecated @see APR_FPROT_WEXECUTE } + APR_OS_DEFAULT= APR_FPROT_OS_DEFAULT; {< @deprecated @see APR_FPROT_OS_DEFAULT } + APR_FILE_SOURCE_PERMS = APR_FPROT_FILE_SOURCE_PERMS; {< @deprecated @see APR_FPROT_FILE_SOURCE_PERMS } { * Structure for referencing directories. @@ -208,34 +224,17 @@ type * @param fname The name of the file to stat. * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values - * @param cont the pool to use to allocate the new file. + * @param pool the pool to use to allocate the new file. * * @note If @c APR_INCOMPLETE is returned all the fields in @a finfo may * not be filled in, and you need to check the @c finfo->valid bitmask * to verify that what you're looking for is there. } function apr_stat(finfo: Papr_finfo_t; const fname: PChar; - wanted: apr_int32_t; cont: Papr_pool_t): apr_status_t; + wanted: apr_int32_t; pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_stat' + LibSuff16; -{ - * get the specified file's stats. The file is specified by filename, - * instead of using a pre-opened file. If the file is a symlink, this function - * will get the stats for the symlink not the file the symlink refers to. - * @param finfo Where to store the information about the file, which is - * never touched if the call fails. - * @param fname The name of the file to stat. - * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values - * @param cont the pool to use to allocate the new file. - * @deprecated This function is deprecated, it's equivalent to calling apr_stat with - * the wanted flag value APR_FINFO_LINK - } -function apr_lstat(finfo: Papr_finfo_t; const fname: PChar; - wanted: apr_int32_t; cont: Papr_pool_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_lstat' + LibSuff16; - { * @defgroup apr_dir Directory Manipulation Functions } @@ -244,10 +243,10 @@ function apr_lstat(finfo: Papr_finfo_t; const fname: PChar; * Open the specified directory. * @param new_dir The opened directory descriptor. * @param dirname The full path to the directory (use / on all systems) - * @param cont The pool to use. + * @param pool The pool to use. } function apr_dir_open(new_dir: PPapr_dir_t; const dirname: PChar; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_dir_open' + LibSuff12; diff --git a/httpd/httpd_2_2/apr/apr_file_io.inc b/httpd/httpd_2_2/apr/apr_file_io.inc index 0d94ae577..ccf5b7dfc 100644 --- a/httpd/httpd_2_2/apr/apr_file_io.inc +++ b/httpd/httpd_2_2/apr/apr_file_io.inc @@ -43,27 +43,47 @@ are reserved for platform-specific values. } const - APR_READ = $00001; {< Open the file for reading } - APR_WRITE = $00002; {< Open the file for writing } - APR_CREATE = $00004; {< Create the file if not there } - APR_APPEND = $00008; {< Append to the end of the file } - APR_TRUNCATE = $00010; {< Open the file and truncate to 0 length } - APR_BINARY = $00020; {< Open the file in binary mode } - APR_EXCL = $00040; {< Open should fail if APR_CREATE and file - exists. } - APR_BUFFERED = $00080; {< Open the file for buffered I/O } - APR_DELONCLOSE =$00100; {< Delete the file after close } - APR_XTHREAD = $00200; {< Platform dependent tag to open the file - for use across multiple threads } - APR_SHARELOCK = $00400; {< Platform dependent support for higher - level locked read/write access to support - writes across process/machines } - APR_FILE_NOCLEANUP =$00800; {< Do not register a cleanup when the file - is opened } - APR_SENDFILE_ENABLED =$01000; {< Advisory flag that this file should - support apr_sendfile operation } - APR_LARGEFILE = $04000; {< Platform dependent flag to enable large file - support; WARNING see below. } + APR_FOPEN_READ = $00001; {< Open the file for reading } + APR_FOPEN_WRITE = $00002; {< Open the file for writing } + APR_FOPEN_CREATE = $00004; {< Create the file if not there } + APR_FOPEN_APPEND = $00008; {< Append to the end of the file } + APR_FOPEN_TRUNCATE = $00010; {< Open the file and truncate + to 0 length } + APR_FOPEN_BINARY = $00020; {< Open the file in binary mode } + APR_FOPEN_EXCL = $00040; {< Open should fail if APR_CREATE + and file exists. } + APR_FOPEN_BUFFERED = $00080; {< Open the file for buffered I/O } + APR_FOPEN_DELONCLOSE= $00100; {< Delete the file after close } + APR_FOPEN_XTHREAD = $00200; {< Platform dependent tag to open + the file for use across multiple + threads } + APR_FOPEN_SHARELOCK = $00400; {< Platform dependent support for + higher level locked read/write + access to support writes across + process/machines } + APR_FOPEN_NOCLEANUP = $00800; {< Do not register a cleanup + when the file is opened } + APR_FOPEN_SENDFILE_ENABLED = $01000; {< Advisory flag that this + file should support + apr_socket_sendfile operation } + APR_FOPEN_LARGEFILE = $04000; {< Platform dependent flag to enable + large file support; WARNING see + below. } +{ backcompat } + APR_READ = APR_FOPEN_READ; {< @deprecated @see APR_FOPEN_READ } + APR_WRITE = APR_FOPEN_WRITE; {< @deprecated @see APR_FOPEN_WRITE } + APR_CREATE = APR_FOPEN_CREATE; {< @deprecated @see APR_FOPEN_CREATE } + APR_APPEND = APR_FOPEN_APPEND; {< @deprecated @see APR_FOPEN_APPEND } + APR_TRUNCATE = APR_FOPEN_TRUNCATE; {< @deprecated @see APR_FOPEN_TRUNCATE } + APR_BINARY = APR_FOPEN_BINARY; {< @deprecated @see APR_FOPEN_BINARY } + APR_EXCL = APR_FOPEN_EXCL; {< @deprecated @see APR_FOPEN_EXCL } + APR_BUFFERED = APR_FOPEN_BUFFERED; {< @deprecated @see APR_FOPEN_BUFFERED } + APR_DELONCLOSE = APR_FOPEN_DELONCLOSE; {< @deprecated @see APR_FOPEN_DELONCLOSE } + APR_XTHREAD = APR_FOPEN_XTHREAD; {< @deprecated @see APR_FOPEN_XTHREAD } + APR_SHARELOCK = APR_FOPEN_SHARELOCK; {< @deprecated @see APR_FOPEN_SHARELOCK } + APR_FILE_NOCLEANUP = APR_FOPEN_NOCLEANUP; {< @deprecated @see APR_FOPEN_NOCLEANUP } + APR_SENDFILE_ENABLED= APR_FOPEN_SENDFILE_ENABLED; {< @deprecated @see APR_FOPEN_SENDFILE_ENABLED } + APR_LARGEFILE = APR_FOPEN_LARGEFILE; {< @deprecated @see APR_FOPEN_LARGEFILE } { @warning The APR_LARGEFILE flag only has effect on some platforms * where sizeof(apr_off_t) == 4. Where implemented, it allows opening @@ -89,11 +109,25 @@ const APR_FILE_ATTR_EXECUTABLE =$02; {< File is executable } APR_FILE_ATTR_HIDDEN = $04; {< File is hidden } +{ + * @defgroup apr_file_writev(_full) max iovec size + } +{$ifdef DOXYGEN} + APR_MAX_IOVEC_SIZE = 1024; {< System dependent maximum + size of an iovec array } +{#elif defined(IOV_MAX) +#define APR_MAX_IOVEC_SIZE IOV_MAX +#elif defined(MAX_IOVEC) +#define APR_MAX_IOVEC_SIZE MAX_IOVEC} +{$else} + APR_MAX_IOVEC_SIZE = 1024; +{$endif} + { File attributes } type apr_fileattrs_t = apr_uint32_t; -{ should be same as whence type in lseek, POSIX defines this as int } +{ Type to pass as whence argument to apr_file_seek. } apr_seek_where_t = Integer; { @@ -145,12 +179,12 @@ const * level locked read/write access to support * writes across process/machines * APR_FILE_NOCLEANUP Do not register a cleanup with the pool - * passed in on the cont argument (see below). + * passed in on the pool argument (see below). * The apr_os_file_t handle in apr_file_t will not * be closed when the pool is destroyed. * APR_SENDFILE_ENABLED Open with appropriate platform semantics * for sendfile operations. Advisory only, - * apr_sendfile does not check this flag. + * apr_socket_sendfile does not check this flag. * * @param perm Access permissions for file. * @param pool The pool to use. @@ -175,10 +209,10 @@ function apr_file_close(file_: Papr_file_t): apr_status_t; { * delete the specified file. * @param path The full path to the file (using / on all systems) - * @param cont The pool to use. + * @param pool The pool to use. * @remark If the file is open, it won't be removed until all instances are closed. } -function apr_file_remove(const path: PChar; cont: Papr_pool_t): apr_status_t; +function apr_file_remove(const path: PChar; pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_remove' + LibSuff8; @@ -239,7 +273,7 @@ function apr_file_eof(fptr: Papr_file_t): apr_status_t; { * open standard error as an apr file pointer. * @param thefile The apr file to use as stderr. - * @param cont The pool to allocate the file out of. + * @param pool The pool to allocate the file out of. * * @remark The only reason that the apr_file_open_std* functions exist * is that you may not always have a stderr/out/in on Windows. This @@ -252,47 +286,31 @@ function apr_file_eof(fptr: Papr_file_t): apr_status_t; * platforms. } function apr_file_open_stderr(thefile: PPapr_file_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_open_stderr' + LibSuff8; { * open standard output as an apr file pointer. * @param thefile The apr file to use as stdout. - * @param cont The pool to allocate the file out of. - * - * @remark The only reason that the apr_file_open_std* functions exist - * is that you may not always have a stderr/out/in on Windows. This - * is generally a problem with newer versions of Windows and services. - * - * The other problem is that the C library functions generally work - * differently on Windows and Unix. So, by using apr_file_open_std* - * functions, you can get a handle to an APR struct that works with - * the APR functions which are supposed to work identically on all - * platforms. + * @param pool The pool to allocate the file out of. + * + * @remark See remarks for apr_file_open_stdout. } function apr_file_open_stdout(thefile: PPapr_file_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_open_stdout' + LibSuff8; { * open standard input as an apr file pointer. * @param thefile The apr file to use as stdin. - * @param cont The pool to allocate the file out of. - * - * @remark The only reason that the apr_file_open_std* functions exist - * is that you may not always have a stderr/out/in on Windows. This - * is generally a problem with newer versions of Windows and services. - * - * The other problem is that the C library functions generally work - * differently on Windows and Unix. So, by using apr_file_open_std* - * functions, you can get a handle to an APR struct that works with - * the APR functions which are supposed to work identically on all - * platforms. + * @param pool The pool to allocate the file out of. + * + * @remark See remarks for apr_file_open_stdout. } function apr_file_open_stdin(thefile: PPapr_file_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_open_stdin' + LibSuff8; @@ -300,18 +318,18 @@ function apr_file_open_stdin(thefile: PPapr_file_t; * Read data from the specified file. * @param thefile The file descriptor to read from. * @param buf The buffer to store the data to. - * @param nbytes On entry, the number of bytes to read; on exit, the number of bytes read. - * @remark apr_file_read will read up to the specified number of bytes, but - * never more. If there isn't enough data to fill that number of - * bytes, all of the available data is read. The third argument is - * modified to reflect the number of bytes read. If a char was put - * back into the stream via ungetc, it will be the first character - * returned. + * @param nbytes On entry, the number of bytes to read; on exit, the number + * of bytes read. * - * It is not possible for both bytes to be read and an APR_EOF or other - * error to be returned. + * @remark apr_file_read will read up to the specified number of + * bytes, but never more. If there isn't enough data to fill that + * number of bytes, all of the available data is read. The third + * argument is modified to reflect the number of bytes read. If a + * char was put back into the stream via ungetc, it will be the first + * character returned. * - * APR_EINTR is never returned. + * @remark It is not possible for both bytes to be read and an APR_EOF + * or other error to be returned. APR_EINTR is never returned. } function apr_file_read(thefile: Papr_file_t; buf: Pointer; nbytes: Papr_size_t): apr_status_t; @@ -322,16 +340,16 @@ function apr_file_read(thefile: Papr_file_t; buf: Pointer; * Write data to the specified file. * @param thefile The file descriptor to write to. * @param buf The buffer which contains the data. - * @param nbytes On entry, the number of bytes to write; on exit, the number + * @param nbytes On entry, the number of bytes to write; on exit, the number * of bytes written. - * @remark apr_file_write will write up to the specified number of bytes, but never - * more. If the OS cannot write that many bytes, it will write as many - * as it can. The third argument is modified to reflect the * number - * of bytes written. * - * It is possible for both bytes to be written and an error to be returned. + * @remark apr_file_write will write up to the specified number of + * bytes, but never more. If the OS cannot write that many bytes, it + * will write as many as it can. The third argument is modified to + * reflect the * number of bytes written. * - * APR_EINTR is never returned. + * @remark It is possible for both bytes to be written and an error to + * be returned. APR_EINTR is never returned. } function apr_file_write(thefile: Papr_file_t; buf: Pointer; nbytes: Papr_size_t): apr_status_t; @@ -342,16 +360,16 @@ function apr_file_write(thefile: Papr_file_t; buf: Pointer; * Write data from iovec array to the specified file. * @param thefile The file descriptor to write to. * @param vec The array from which to get the data to write to the file. - * @param nvec The number of elements in the struct iovec array. This must - * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function + * @param nvec The number of elements in the struct iovec array. This must + * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function * will fail with APR_EINVAL. * @param nbytes The number of bytes written. - * @remark It is possible for both bytes to be written and an error to be returned. - * APR_EINTR is never returned. * - * apr_file_writev is available even if the underlying operating system + * @remark It is possible for both bytes to be written and an error to + * be returned. APR_EINTR is never returned. * - * doesn't provide writev(). + * @remark apr_file_writev is available even if the underlying + * operating system doesn't provide writev(). } function apr_file_writev(thefile: Papr_file_t; const vec: Piovec; nvec: apr_size_t; nbytes: Papr_size_t): apr_status_t; @@ -365,17 +383,18 @@ function apr_file_writev(thefile: Papr_file_t; const vec: Piovec; * @param buf The buffer to store the data to. * @param nbytes The number of bytes to read. * @param bytes_read If non-NULL, this will contain the number of bytes read. - * @remark apr_file_read will read up to the specified number of bytes, but never - * more. If there isn't enough data to fill that number of bytes, - * then the process/thread will block until it is available or EOF - * is reached. If a char was put back into the stream via ungetc, - * it will be the first character returned. * - * It is possible for both bytes to be read and an error to be - * returned. And if *bytes_read is less than nbytes, an - * accompanying error is _always_ returned. + * @remark apr_file_read will read up to the specified number of + * bytes, but never more. If there isn't enough data to fill that + * number of bytes, then the process/thread will block until it is + * available or EOF is reached. If a char was put back into the + * stream via ungetc, it will be the first character returned. * - * APR_EINTR is never returned. + * @remark It is possible for both bytes to be read and an error to be + * returned. And if *bytes_read is less than nbytes, an accompanying + * error is _always_ returned. + * + * @remark APR_EINTR is never returned. } function apr_file_read_full(thefile: Papr_file_t; buf: Pointer; nbytes: apr_size_t; bytes_read: Papr_size_t): apr_status_t; @@ -388,17 +407,19 @@ function apr_file_read_full(thefile: Papr_file_t; buf: Pointer; * @param thefile The file descriptor to write to. * @param buf The buffer which contains the data. * @param nbytes The number of bytes to write. - * @param bytes_written If non-NULL, this will contain the number of bytes written. - * @remark apr_file_write will write up to the specified number of bytes, but never - * more. If the OS cannot write that many bytes, the process/thread - * will block until they can be written. Exceptional error such as - * "out of space" or "pipe closed" will terminate with an error. + * @param bytes_written If non-NULL, set to the number of bytes written. * - * It is possible for both bytes to be written and an error to be - * returned. And if *bytes_written is less than nbytes, an - * accompanying error is _always_ returned. + * @remark apr_file_write will write up to the specified number of + * bytes, but never more. If the OS cannot write that many bytes, the + * process/thread will block until they can be written. Exceptional + * error such as "out of space" or "pipe closed" will terminate with + * an error. * - * APR_EINTR is never returned. + * @remark It is possible for both bytes to be written and an error to + * be returned. And if *bytes_written is less than nbytes, an + * accompanying error is _always_ returned. + * + * @remark APR_EINTR is never returned. } function apr_file_write_full(thefile: Papr_file_t; buf: Pointer; nbytes: apr_size_t; bytes_written: Papr_size_t): apr_status_t; @@ -406,7 +427,25 @@ function apr_file_write_full(thefile: Papr_file_t; buf: Pointer; external LibAPR name LibNamePrefix + 'apr_file_write_full' + LibSuff16; { - * put a character into the specified file. + * Write data from iovec array to the specified file, ensuring that all of the + * data is written before returning. + * @param thefile The file descriptor to write to. + * @param vec The array from which to get the data to write to the file. + * @param nvec The number of elements in the struct iovec array. This must + * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function + * will fail with APR_EINVAL. + * @param nbytes The number of bytes written. + * + * @remark apr_file_writev_full is available even if the underlying + * operating system doesn't provide writev(). + } +function apr_file_writev_full(thefile: Papr_file_t; const vec: Piovec; + nvec: apr_size_t; nbytes: Papr_size_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_file_writev_full' + LibSuff16; + +{ + * Write a character into the specified file. * @param ch The character to write. * @param thefile The file descriptor to write to } @@ -524,10 +563,10 @@ function apr_file_seek(thefile: Papr_file_t; * Create an anonymous pipe. * @param in The file descriptor to use as input to the pipe. * @param out The file descriptor to use as output from the pipe. - * @param cont The pool to operate on. + * @param pool The pool to operate on. } function apr_file_pipe_create(in_: PPapr_file_t; out_: PPapr_file_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_pipe_create' + LibSuff12; @@ -535,10 +574,10 @@ function apr_file_pipe_create(in_: PPapr_file_t; out_: PPapr_file_t; * Create a named pipe. * @param filename The filename of the named pipe * @param perm The permissions for the newly created pipe. - * @param cont The pool to operate on. + * @param pool The pool to operate on. } function apr_file_namedpipe_create(const filename: PChar; - perm: apr_fileperms_t; cont: Papr_pool_t): apr_status_t; + perm: apr_fileperms_t; pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_namedpipe_create' + LibSuff12; @@ -658,7 +697,7 @@ function apr_file_perms_set(const fname: PChar; * APR_FILE_ATTR_HIDDEN - make the file hidden * * @param attr_mask Mask of valid bits in attributes. - * @param cont the pool to use. + * @param pool the pool to use. * @remark This function should be used in preference to explict manipulation * of the file permissions, because the operations to provide these * attributes are platform specific and may involve more than simply @@ -668,7 +707,7 @@ function apr_file_perms_set(const fname: PChar; } function apr_file_attrs_set(const fname: PChar; attributes, attr_mask: apr_fileattrs_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_file_attrs_set' + LibSuff16; @@ -689,10 +728,10 @@ function apr_file_mtime_set(const fname: PChar; * Create a new directory on the file system. * @param path the path for the directory to be created. (use / on all systems) * @param perm Permissions for the new direcoty. - * @param cont the pool to use. + * @param pool the pool to use. } function apr_dir_make(const path: PChar; perm: apr_fileperms_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_dir_make' + LibSuff12; @@ -711,9 +750,9 @@ function apr_dir_make_recursive(const path: PChar; { * Remove directory from the file system. * @param path the path for the directory to be removed. (use / on all systems) - * @param cont the pool to use. + * @param pool the pool to use. } -function apr_dir_remove(const path: PChar; cont: Papr_pool_t): apr_status_t; +function apr_dir_remove(const path: PChar; pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_dir_remove' + LibSuff8; @@ -757,17 +796,13 @@ function apr_file_flags_get(f: Papr_file_t): apr_int32_t; } {APR_DECLARE_INHERIT_SET(file); } -{ @deprecated @see apr_file_inherit_set } -{APR_DECLARE(void) apr_file_set_inherit(apr_file_t *file); -} + { * Unset a file from being inherited by child processes. } {APR_DECLARE_INHERIT_UNSET(file); } -{ @deprecated @see apr_file_inherit_unset } -{APR_DECLARE(void) apr_file_unset_inherit(apr_file_t *file); -} + { * Open a temporary file * @param fp The apr file to use as a temporary file. diff --git a/httpd/httpd_2_2/apr/apr_general.inc b/httpd/httpd_2_2/apr/apr_general.inc index b9e8eff56..8e9891229 100644 --- a/httpd/httpd_2_2/apr/apr_general.inc +++ b/httpd/httpd_2_2/apr/apr_general.inc @@ -94,12 +94,6 @@ type #define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field) #endif} -{ @deprecated @see APR_OFFSET } -//#define APR_XtOffset APR_OFFSET - -{ @deprecated @see APR_OFFSETOF } -//#define APR_XtOffsetOf APR_OFFSETOF - {$ifndef DOXYGEN} { A couple of prototypes for functions in case some platform doesn't @@ -135,12 +129,15 @@ int strncasecmp(const char *a, const char *b, size_t n); * String and memory functions } +{ APR_STRINGIFY is defined here, and also in apr_release.h, so wrap it } +{$ifndef APR_STRINGIFY} { Properly quote a value as a string in the C preprocessor } //#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n) { Helper macro for APR_STRINGIFY } -{#define APR_STRINGIFY_HELPER(n) #n +{#define APR_STRINGIFY_HELPER(n) #n} +{$endif} -#if (!APR_HAVE_MEMMOVE) +{#if (!APR_HAVE_MEMMOVE) #define memmove(a,b,c) bcopy(b,a,c) #endif @@ -214,15 +211,9 @@ procedure apr_terminate2; * @param buf Buffer to fill with random bytes * @param length Length of buffer in bytes (becomes apr_size_t in APR 1.0) } -{$ifdef APR_ENABLE_FOR_1_0} -function apr_generate_random_bytes(buf: PChar; length: apr_size_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_generate_random_bytes' + LibSuff8; -{$else} function apr_generate_random_bytes(buf: PChar; length: Integer): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_generate_random_bytes' + LibSuff8; -{$endif} {$endif} diff --git a/httpd/httpd_2_2/apr/apr_hash.inc b/httpd/httpd_2_2/apr/apr_hash.inc index d7577324b..bf78b4c98 100644 --- a/httpd/httpd_2_2/apr/apr_hash.inc +++ b/httpd/httpd_2_2/apr/apr_hash.inc @@ -53,6 +53,20 @@ type apr_hash_index_t = record end; Papr_hash_index_t = ^apr_hash_index_t; +{ + * Callback functions for calculating hash values. + * @param key The key. + * @param klen The length of the key, or APR_HASH_KEY_STRING to use the string + * length. If APR_HASH_KEY_STRING then returns the actual key length. + } + apr_hashfunc_t = function (const key: PChar; klen: Papr_size_t): cuint; + +{ + * The default hash function. + } +function apr_hashfunc_default(const key: PChar; klen: Papr_size_t): cuint; + cdecl; external LibAPR name LibNamePrefix + 'apr_hashfunc_default' + LibSuff8; + { * Create a hash table. * @param pool The pool to allocate the hash table out of @@ -62,6 +76,16 @@ function apr_hash_make(pool: Papr_pool_t): Papr_hash_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_hash_make' + LibSuff4; +{ + * Create a hash table with a custom hash function + * @param pool The pool to allocate the hash table out of + * @param hash_func A custom hash function. + * @return The hash table just created + } +function apr_hash_make_custom(pool: Papr_pool_t; hash_func: apr_hashfunc_t): Papr_hash_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_hash_make_custom' + LibSuff8; + { * Make a copy of a hash table * @param pool The pool from which to allocate the new hash table @@ -165,7 +189,8 @@ function apr_hash_count(ht: Papr_hash_t): cuint; { * Merge two hash tables into one new hash table. The values of the overlay - * hash override the values of the base if both have the same key. + * hash override the values of the base if both have the same key. Both + * hash tables must use the same hash function. * @param p The pool to use for the new hash table * @param overlay The table to add to the initial table * @param base The table that represents the initial values of the new table @@ -179,7 +204,8 @@ function apr_hash_overlay(p: Papr_pool_t; { * Merge two hash tables into one new hash table. If the same key * is present in both tables, call the supplied merge function to - * produce a merged value for the key in the new table. + * produce a merged value for the key in the new table. Both + * hash tables must use the same hash function. * @param p The pool to use for the new hash table * @param h1 The first of the tables to merge * @param h2 The second of the tables to merge diff --git a/httpd/httpd_2_2/apr/apr_lib.inc b/httpd/httpd_2_2/apr/apr_lib.inc index 1b14f7bf6..3996e6232 100644 --- a/httpd/httpd_2_2/apr/apr_lib.inc +++ b/httpd/httpd_2_2/apr/apr_lib.inc @@ -78,11 +78,6 @@ function apr_filepath_name_get(const pathname: PChar): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_filepath_name_get' + LibSuff4; -{ @deprecated @see apr_filepath_name_get } -function apr_filename_of_pathname(const pathname: PChar): PChar; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_filename_of_pathname' + LibSuff4; - { * apr_killpg * Small utility macros to make things easier to read. Not usually a @@ -116,6 +111,8 @@ function apr_filename_of_pathname(const pathname: PChar): PChar; * [ipv6-address]:port * %%pT takes an apr_os_thread_t * and prints it in decimal * ('0' is printed if !APR_HAS_THREADS) + * %%pt takes an apr_os_thread_t * and prints it in hexadecimal + * ('0' is printed if !APR_HAS_THREADS) * %%pp takes a void * and outputs it in hex * * The %%p hacks are to force gcc's printf warning code to skip @@ -173,6 +170,11 @@ function apr_vformatter(flush_func: flush_func_t; * @param prompt The prompt to display * @param pwbuf Buffer to store the password * @param bufsize The length of the password buffer. + * @remark If the password entered must be truncated to fit in + * the provided buffer, APR_ENAMETOOLONG will be returned. + * Note that the bufsize paramater is passed by reference for no + * reason; its value will never be modified by the apr_password_get() + * function. } function apr_password_get(const prompt: PChar; pwbuf: PChar; bufsize: Papr_size_t): apr_status_t; diff --git a/httpd/httpd_2_2/apr/apr_network_io.inc b/httpd/httpd_2_2/apr/apr_network_io.inc index ea93d118a..09f574aa9 100644 --- a/httpd/httpd_2_2/apr/apr_network_io.inc +++ b/httpd/httpd_2_2/apr/apr_network_io.inc @@ -38,9 +38,6 @@ const { Maximum seconds to linger } APR_MAX_SECS_TO_LINGER = 30; -{ @deprecated @see APR_MAX_SECS_TO_LINGER } - MAX_SECS_TO_LINGER = APR_MAX_SECS_TO_LINGER; - { Maximum hostname length } APRMAXHOSTLEN = 256; @@ -55,7 +52,6 @@ const APR_SO_DEBUG = 4; {< Debug } APR_SO_NONBLOCK = 8; {< Non-blocking IO } APR_SO_REUSEADDR = 16; {< Reuse addresses } - APR_SO_TIMEOUT = 32; {< Timeout } APR_SO_SNDBUF = 64; {< Send buffer } APR_SO_RCVBUF = 128; {< Receive buffer } APR_SO_DISCONNECTED = 256; {< Disconnected } @@ -69,7 +65,7 @@ const * APR_TCP_NODELAY should be turned on * again when NOPUSH is turned off } - APR_INCOMPLETE_READ = 4096; {< Set on non-blocking sockets + APR_INCOMPLETE_READ = 4096; {< Set on non-blocking sockets * (timeout != 0) on which the * previous read() did not fill a buffer * completely. the next apr_socket_recv() @@ -80,12 +76,16 @@ const * read, in cases where the app expects * that an immediate read would fail.) } - APR_INCOMPLETE_WRITE = 8192; {< like APR_INCOMPLETE_READ, but for write + APR_INCOMPLETE_WRITE = 8192;{< like APR_INCOMPLETE_READ, but for write * @see APR_INCOMPLETE_READ } APR_IPV6_V6ONLY = 16384; {< Don't accept IPv4 connections on an * IPv6 listening socket. } + APR_TCP_DEFER_ACCEPT = 32768;{< Delay accepting of new connections + * until data is available. + * @see apr_socket_accept_filter + } { Define what type of socket shutdown should occur. } type @@ -110,6 +110,16 @@ const end;} {$endif} +{ @def APR_INADDR_NONE + * Not all platforms have a real INADDR_NONE. This macro replaces + * INADDR_NONE on all platforms. + } +{$ifdef INADDR_NONE} + APR_INADDR_NONE = INADDR_NONE; +{$else} + APR_INADDR_NONE = $ffffffff; +{$endif} + const { * @def APR_INET @@ -126,6 +136,11 @@ const #define APR_UNSPEC 0 #endif #if APR_HAVE_IPV6 + +/** @def APR_INET6 +* IPv6 Address Family. Not all platforms may have this defined. +*/ + #define APR_INET6 AF_INET6 #endif} @@ -198,6 +213,11 @@ type {$ifdef APR_HAVE_IPV6} { IPv6 sockaddr structure } 1: (sin6: sockaddr_in6); +{$endif} +{$ifdef APR_HAVE_SA_STORAGE} + { Placeholder to ensure that the size of this union is not + * dependent on whether APR_HAVE_IPV6 is defined. } + 2: (sas: sockaddr_storage); {$endif} end; @@ -215,8 +235,6 @@ type port: apr_port_t; { The family } family: apr_int32_t; - { Union of either IPv4 or IPv6 sockaddr. } - sa: sa_t; { How big is the sockaddr we're using? } salen: apr_socklen_t; { How big is the ip address structure we're using? } @@ -230,6 +248,8 @@ type { If multiple addresses were found by apr_sockaddr_info_get(), this * points to a representation of the next address. } next: Papr_sockaddr_t; + { Union of either IPv4 or IPv6 sockaddr. } + sa: sa_t; end; {$ifdef APR_HAS_SENDFILE} @@ -257,32 +277,15 @@ type { * Create a socket. - * @remark With APR 1.0, this function follows the prototype - * of apr_socket_create_ex. * @param new_sock The new socket that has been set up. * @param family The address family of the socket (e.g., APR_INET). * @param type The type of the socket (e.g., SOCK_STREAM). * @param cont The pool to use } function apr_socket_create(new_sock: PPapr_socket_t; - family, type_: Integer; cont: Papr_pool_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_socket_create' + LibSuff16; - -{ - * Create a socket. - * @remark With APR 1.0, this function is deprecated and apr_socket_create - * follows this prototype. - * @param new_sock The new socket that has been set up. - * @param family The address family of the socket (e.g., APR_INET). - * @param type The type of the socket (e.g., SOCK_STREAM). - * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP). - * @param cont The pool to use - } -function apr_socket_create_ex(new_sock: PPapr_socket_t; family, type_, protocol: Integer; cont: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_socket_create_ex' + LibSuff20; + external LibAPR name LibNamePrefix + 'apr_socket_create' + LibSuff20; { * Shutdown either reading, writing, or both sides of a socket. @@ -302,12 +305,6 @@ function apr_socket_shutdown(thesocket: Papr_socket_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_shutdown' + LibSuff8; -{ @deprecated @see apr_socket_shutdown } -function apr_shutdown(thesocket: Papr_socket_t; - how: apr_shutdown_how_e): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_shutdown' + LibSuff8; - { * Close a socket. * @param thesocket The socket to close @@ -328,12 +325,6 @@ function apr_socket_bind(sock: Papr_socket_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_bind' + LibSuff8; -{ @deprecated @see apr_socket_bind } -function apr_bind(sock: Papr_socket_t; - sa: Papr_sockaddr_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_bind' + LibSuff8; - { * Listen to a bound socket for connections. * @param sock The socket to listen on @@ -346,12 +337,6 @@ function apr_socket_listen(sock: Papr_socket_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_listen' + LibSuff8; -{ @deprecated @see apr_socket_listen } -function apr_listen(sock: Papr_socket_t; - backlog: apr_int32_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_listen' + LibSuff8; - { * Accept a new connection request * @param new_sock A copy of the socket that is connected to the socket that @@ -365,11 +350,6 @@ function apr_socket_accept(new_sock: PPapr_socket_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_accept' + LibSuff12; -{ @deprecated @see apr_socket_accept } -{APR_DECLARE(apr_status_t) apr_accept(apr_socket_t **new_sock, - apr_socket_t *sock, - apr_pool_t *connection_pool);} - { * Issue a connection request to a socket either on the same machine * or a different one. @@ -382,9 +362,6 @@ function apr_socket_connect(sock: Papr_socket_t; sa: Papr_sockaddr_t): apr_statu {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_connect' + LibSuff8; -{ @deprecated @see apr_socket_connect } -//APR_DECLARE(apr_status_t) apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa); - { * Create apr_sockaddr_t from hostname, address family, and port. * @param sa The new apr_sockaddr_t. @@ -518,10 +495,6 @@ function apr_socket_send(sock: Papr_socket_t; const buf: PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_send' + LibSuff12; -{ @deprecated @see apr_socket_send } -{APR_DECLARE(apr_status_t) apr_send(apr_socket_t *sock, const char *buf, - apr_size_t *len);} - { * Send multiple packets of data over a network. * @param sock The socket to send the data over. @@ -544,11 +517,6 @@ function apr_socket_sendv(sock: Papr_socket_t; const vec: Piovec; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_sendv' + LibSuff16; -{ @deprecated @see apr_socket_sendv } -{APR_DECLARE(apr_status_t) apr_sendv(apr_socket_t *sock, - const struct iovec *vec, - apr_int32_t nvec, apr_size_t *len);} - { * @param sock The socket to send from * @param where The apr_sockaddr_t describing where to send the data @@ -561,11 +529,6 @@ function apr_socket_sendto(sock: Papr_socket_t; where: Papr_sockaddr_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_sendto' + LibSuff20; -{ @deprecated @see apr_socket_sendto } -{APR_DECLARE(apr_status_t) apr_sendto(apr_socket_t *sock, apr_sockaddr_t *where, - apr_int32_t flags, const char *buf, - apr_size_t *len);} - { * @param from The apr_sockaddr_t to fill in the recipient info * @param sock The socket to use @@ -578,11 +541,6 @@ function apr_socket_recvfrom(from: Papr_sockaddr_t; sock: Papr_socket_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_recvfrom' + LibSuff20; -{ @deprecated @see apr_socket_recvfrom } -{APR_DECLARE(apr_status_t) apr_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock, - apr_int32_t flags, char *buf, - apr_size_t *len);} - {$if defined(APR_HAS_SENDFILE) or defined(DOXYGEN)} { @@ -606,11 +564,6 @@ function apr_socket_sendfile(sock: Papr_socket_t; file_: Papr_file_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_sendfile' + LibSuff24; -{ @deprecated @see apr_socket_sendfile } -{APR_DECLARE(apr_status_t) apr_sendfile(apr_socket_t *sock, apr_file_t *file, - apr_hdtr_t *hdtr, apr_off_t *offset, - apr_size_t *len, apr_int32_t flags);} - {$endif} { APR_HAS_SENDFILE } { @@ -635,10 +588,6 @@ function apr_socket_recv(sock: Papr_socket_t; buf: PChar; len: Papr_size_t): apr {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_recv' + LibSuff12; -{ @deprecated @see apr_socket_recv } -{APR_DECLARE(apr_status_t) apr_recv(apr_socket_t *sock, - char *buf, apr_size_t *len);} - { * Setup socket options for the specified socket * @param sock The socket to set up. @@ -648,6 +597,11 @@ function apr_socket_recv(sock: Papr_socket_t; buf: PChar; len: Papr_size_t): apr * APR_SO_KEEPALIVE -- keep connections active * APR_SO_LINGER -- lingers on close if data is present * APR_SO_NONBLOCK -- Turns blocking on/off for socket + * When this option is enabled, use + * the APR_STATUS_IS_EAGAIN() macro to + * see if a send or receive function + * could not transfer data without + * blocking. * APR_SO_REUSEADDR -- The rules used in validating addresses * supplied to bind should allow reuse * of local addresses. @@ -660,10 +614,6 @@ function apr_socket_opt_set(sock: Papr_socket_t; opt, on_: apr_int32_t): apr_sta {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_opt_set' + LibSuff12; -{ @deprecated @see apr_socket_opt_set } -{APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock, - apr_int32_t opt, apr_int32_t on);} - { * Setup socket timeout for the specified socket * @param sock The socket to set up. @@ -702,10 +652,6 @@ function apr_socket_opt_get(sock: Papr_socket_t; opt, on_: apr_int32_t): apr_sta {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_opt_get' + LibSuff12; -{ @deprecated @see apr_socket_opt_set } -{APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock, - apr_int32_t opt, apr_int32_t *on);} - { * Query socket timeout for the specified socket * @param sock The socket to query @@ -736,37 +682,6 @@ function apr_socket_addr_get(sa: PPapr_sockaddr_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_addr_get' + LibSuff12; -{ - * Set the port in an APR socket address. - * @param sockaddr The socket address to set. - * @param port The port to be stored in the socket address. - * @deprecated @see apr_sockaddr_info_get - } -function apr_sockaddr_port_set(sockaddr: Papr_sockaddr_t; port: apr_port_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_sockaddr_port_set' + LibSuff8; - -{ - * Return the port in an APR socket address. - * @param port The port from the socket address. - * @param sockaddr The socket address to reference. - * @deprecated Access port field directly. - } -function apr_sockaddr_port_get(port: Papr_port_t; sockaddr: Papr_sockaddr_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_sockaddr_port_get' + LibSuff8; - -{ - * Set the IP address in an APR socket address. - * @param sockaddr The socket address to use - * @param addr The IP address to attach to the socket. - * Use APR_ANYADDR to use any IP addr on the machine. - * @deprecated @see apr_sockaddr_info_get - } -function apr_sockaddr_ip_set(sockaddr: Papr_sockaddr_t; const addr: PChar): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_sockaddr_ip_set' + LibSuff8; - { * Return the IP address (in numeric address string format) in * an APR socket address. APR will allocate storage for the IP address @@ -792,23 +707,14 @@ function apr_sockaddr_equal(const addr1, addr2: Papr_sockaddr_t): Integer; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_sockaddr_equal' + LibSuff8; -{$if defined(APR_FILES_AS_SOCKETS) or defined(DOXYGEN)} - { - * Convert a File type to a socket so that it can be used in a poll operation. - * @param newsock the newly created socket which represents a file. - * @param file the file to mask as a socket. - * @warning This is not available on all platforms. Platforms that have the - * ability to poll files for data to be read/written/exceptions will - * have the APR_FILES_AS_SOCKETS macro defined as true. - * @deprecated This function has been deprecated, because of the new poll - * implementation. + * Return the type of the socket. + * @param sock The socket to query. + * @param type The returned type (e.g., SOCK_STREAM). } -function apr_socket_from_file(newsock: Papr_socket_t; file_: Papr_file_t): apr_status_t; +function apr_socket_type_get(sock: Papr_socket_t; type_: PInteger): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_socket_connect' + LibSuff8; - -{$endif} { APR_FILES_AS_SOCKETS } + external LibAPR name LibNamePrefix + 'apr_socket_type_get' + LibSuff8; { * Given an apr_sockaddr_t and a service name, set the port for the service @@ -866,19 +772,80 @@ function apr_socket_protocol_get(sock: Papr_socket_t; protocol: PInteger): apr_s {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_socket_protocol_get' + LibSuff8; +{ + * Get the pool used by the socket. + } +//APR_POOL_DECLARE_ACCESSOR(socket); + { * Set a socket to be inherited by child processes. } //APR_DECLARE_INHERIT_SET(socket); -{ @deprecated @see apr_socket_inherit_set } -{APR_DECLARE(void) apr_socket_set_inherit(apr_socket_t *skt);} - { * Unset a socket from being inherited by child processes. } //APR_DECLARE_INHERIT_UNSET(socket); -{ @deprecated @see apr_socket_inherit_unset } -{APR_DECLARE(void) apr_socket_unset_inherit(apr_socket_t *skt);} +{ + * @defgroup apr_mcast IP Multicast + } + +{ + * Join a Multicast Group + * @param sock The socket to join a multicast group + * @param join The address of the multicast group to join + * @param iface Address of the interface to use. If NULL is passed, the + * default multicast interface will be used. (OS Dependent) + * @param source Source Address to accept transmissions from (non-NULL + * implies Source-Specific Multicast) + } +function apr_mcast_join(sock: Papr_socket_t; + join, iface, source: Papr_sockaddr_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_mcast_join' + LibSuff16; + +{ + * Leave a Multicast Group. All arguments must be the same as + * apr_mcast_join. + * @param sock The socket to leave a multicast group + * @param addr The address of the multicast group to leave + * @param iface Address of the interface to use. If NULL is passed, the + * default multicast interface will be used. (OS Dependent) + * @param source Source Address to accept transmissions from (non-NULL + * implies Source-Specific Multicast) + } +function apr_mcast_leave(sock: Papr_socket_t; + addr, iface, source: Papr_sockaddr_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_mcast_leave' + LibSuff16; + +{ + * Set the Multicast Time to Live (ttl) for a multicast transmission. + * @param sock The socket to set the multicast ttl + * @param ttl Time to live to Assign. 0-255, default=1 + * @remark If the TTL is 0, packets will only be seen by sockets on + * the local machine, and only when multicast loopback is enabled. + } +function apr_mcast_hops(sock: Papr_socket_t; ttl: apr_byte_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_mcast_hops' + LibSuff8; + +{ + * Toggle IP Multicast Loopback + * @param sock The socket to set multicast loopback + * @param opt 0=disable, 1=enable + } +function apr_mcast_loopback(sock: Papr_socket_t; opt: apr_byte_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_mcast_loopback' + LibSuff8; + +{ + * Set the Interface to be used for outgoing Multicast Transmissions. + * @param sock The socket to set the multicast interface on + * @param iface Address of the interface to use for Multicast + } +function apr_mcast_interface(sock: Papr_socket_t; iface: Papr_sockaddr_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_mcast_interface' + LibSuff8; diff --git a/httpd/httpd_2_2/apr/apr_pools.inc b/httpd/httpd_2_2/apr/apr_pools.inc index 6ffc3c10c..025fd3478 100644 --- a/httpd/httpd_2_2/apr/apr_pools.inc +++ b/httpd/httpd_2_2/apr/apr_pools.inc @@ -33,7 +33,7 @@ {#include "apr.h" #include "apr_errno.h" -#include "apr_general.h"{ { for APR_STRINGIFY } +#include "apr_general.h" for APR_STRINGIFY } //#include "apr_want.h" { @@ -88,7 +88,7 @@ type *
* | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | * --------------------------------- - * | | | | | | | | x | General debug code enabled (usefull in + * | | | | | | | | x | General debug code enabled (useful in * combination with --with-efence). * * | | | | | | | x | | Verbose output on stderr (report @@ -117,15 +117,17 @@ type * If level 0 was specified, debugging is switched off *} -{#if defined(APR_POOL_DEBUG) -#if (APR_POOL_DEBUG != 0) && (APR_POOL_DEBUG - 0 == 0) +{$ifdef APR_POOL_DEBUG} +{/* If APR_POOL_DEBUG is blank, we get 1; if it is a number, we get -1. */ +#if (APR_POOL_DEBUG - APR_POOL_DEBUG -1 == 1) #undef APR_POOL_DEBUG #define APR_POOL_DEBUG 1 -#endif -#else -#define APR_POOL_DEBUG 0 -#endif -} +#endif} +{$else} +const + APR_POOL_DEBUG = 0; +{$endif} + { the place in the code where the particular function was called } //#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__) @@ -237,17 +239,6 @@ function apr_pool_create(newpool: PPapr_pool_t; parent: Papr_pool_t): apr_status {.$endif} {$endif} -{ @deprecated @see apr_pool_create_ex } -{#if APR_POOL_DEBUG -#define apr_pool_sub_make(newpool, parent, abort_fn) \ - (void)apr_pool_create_ex_debug(newpool, parent, abort_fn, \ - NULL, \ - APR_POOL__FILE_LINE__) -#else} -function apr_pool_sub_make(newpool: PPapr_pool_t; parent: Papr_pool_t; - abort_fn: apr_abortfunc_t): apr_status_t; -//#endif - { * Find the pools allocator * @param pool The pool to get the allocator from. @@ -404,10 +395,6 @@ procedure apr_pool_abort_set(abortfunc: apr_abortfunc_t; pool: Papr_pool_t); {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_pool_abort_set' + LibSuff8; -{ @deprecated @see apr_pool_abort_set } -{APR_DECLARE(void) apr_pool_set_abort(apr_abortfunc_t abortfunc, - apr_pool_t *pool); -} { * Get the abort function associated with the specified pool. * @param pool The pool for retrieving the abort function. @@ -417,9 +404,6 @@ function apr_pool_abort_get(pool: Papr_pool_t): apr_abortfunc_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_pool_abort_get' + LibSuff4; -{ @deprecated @see apr_pool_abort_get } -//APR_DECLARE(apr_abortfunc_t) apr_pool_get_abort(apr_pool_t *pool); - { * Get the parent pool of the specified pool. * @param pool The pool for retrieving the parent pool. @@ -429,15 +413,16 @@ function apr_pool_parent_get(pool: Papr_pool_t): Papr_pool_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_pool_parent_get' + LibSuff4; -{ @deprecated @see apr_pool_parent_get } -//APR_DECLARE(apr_pool_t *) apr_pool_get_parent(apr_pool_t *pool); - { - * Determine if pool a is an ancestor of pool b + * Determine if pool a is an ancestor of pool b. * @param a The pool to search * @param b The pool to search for * @return True if a is an ancestor of b, NULL is considered an ancestor * of all pools. + * @remark if compiled with APR_POOL_DEBUG, this function will also + * return true if A is a pool which has been guaranteed by the caller + * (using apr_pool_join) to have a lifetime at least as long as some + * ancestor of pool B. } function apr_pool_is_ancestor(a, b: Papr_pool_t): Integer; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} @@ -519,10 +504,16 @@ function apr_pool_userdata_get(data: PPointer; const key: PChar; external LibAPR name LibNamePrefix + 'apr_pool_userdata_get' + LibSuff12; { - * Cleanup + * @defgroup PoolCleanup Pool Cleanup Functions * * Cleanups are performed in the reverse order they were registered. That is: - * Last In, First Out. + * Last In, First Out. A cleanup function can safely allocate memory from + * the pool that is being cleaned up. It can also safely register additional + * cleanups which will be run LIFO, directly after the current cleanup + * terminates. Cleanups have to take caution in calling functions that + * create subpools. Subpools, created during cleanup will NOT automatically + * be cleaned up. In other words, cleanups are to clean up after themselves. + * } { @@ -531,8 +522,8 @@ function apr_pool_userdata_get(data: PPointer; const key: PChar; * @param data The data to pass to the cleanup function. * @param plain_cleanup The function to call when the pool is cleared * or destroyed - * @param child_cleanup The function to call when a child process is being - * shutdown - this function is called in the child, obviously! + * @param child_cleanup The function to call when a child process is about + * to exec - this function is called in the child, obviously! } type plain_cleanup_t = function(param: Pointer): apr_status_t; cdecl; @@ -578,9 +569,13 @@ procedure apr_pool_cleanup_register(p: Papr_pool_t; apr_status_t child_cleanup)(void ); } { - * Run the specified cleanup function immediately and unregister it. Use - * @a data instead of the data that was registered with the cleanup. - * @param p The pool remove the cleanup from + * Run the specified cleanup function immediately and unregister it. + * + * The cleanup most recently registered with @a p having the same values of + * @a data and @a cleanup will be removed and @a cleanup will be called + * with @a data as the argument. + * + * @param p The pool to remove the cleanup from * @param data The data to remove from cleanup * @param cleanup The function to remove from cleanup } @@ -594,17 +589,19 @@ procedure apr_pool_cleanup_register(p: Papr_pool_t; apr_status_t cleanup)(void );} { - * An empty cleanup function - * @param data The data to cleanup + * An empty cleanup function. + * + * Passed to apr_pool_cleanup_register() when no cleanup is required. + * + * @param data The data to cleanup, will not be used by this function. } //APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data); -{ Preparing for exec() --- close files, etc., but *don't* flush I/O - * buffers, *don't* wait for subprocesses, and *don't* free any memory. - } { - * Run all of the child_cleanups, so that any unnecessary files are - * closed because we are about to exec a new program + * Run all registered child cleanups, in preparation for an exec() + * call in a forked child -- close files, etc., but *don't* flush I/O + * buffers, *don't* wait for subprocesses, and *don't* free any + * memory. } procedure apr_pool_cleanup_for_exec; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} @@ -639,16 +636,14 @@ procedure apr_pool_cleanup_for_exec; * structures. * * However, sometimes this ancestor requirement is inconvenient -- - * sometimes we're forced to create a sub pool (such as through - * apr_sub_req_lookup_uri), and the sub pool is guaranteed to have - * the same lifetime as the parent pool. This is a guarantee implemented - * by the *caller*, not by the pool code. That is, the caller guarantees - * they won't destroy the sub pool individually prior to destroying the - * parent pool. + * sometimes it's necessary to create a sub pool where the sub pool is + * guaranteed to have the same lifetime as the parent pool. This is a + * guarantee implemented by the *caller*, not by the pool code. That + * is, the caller guarantees they won't destroy the sub pool + * individually prior to destroying the parent pool. * * In this case the caller must call apr_pool_join() to indicate this - * guarantee to the APR_POOL_DEBUG code. There are a few examples spread - * through the standard modules. + * guarantee to the APR_POOL_DEBUG code. * * These functions are only implemented when #APR_POOL_DEBUG is set. * diff --git a/httpd/httpd_2_2/apr/apr_portable.inc b/httpd/httpd_2_2/apr/apr_portable.inc index 415e969c8..b8bc09c9c 100644 --- a/httpd/httpd_2_2/apr/apr_portable.inc +++ b/httpd/httpd_2_2/apr/apr_portable.inc @@ -192,9 +192,7 @@ typedef void* apr_os_shm_t; {< native SHM } remote: Psockaddr; {< NULL if not connected } family: Integer; {< always required (APR_INET, APR_INET6, etc.) } type_: Integer; {< always required (SOCK_STREAM, SOCK_DGRAM, etc.) } -{$ifdef APR_ENABLE_FOR_1_0} {< enable with APR 1.0 } protocol: Integer; {< 0 or actual protocol (APR_PROTO_SCTP, APR_PROTO_TCP, etc.) } -{$endif} end; Papr_os_sock_info_t = ^apr_os_sock_info_t; diff --git a/httpd/httpd_2_2/apr/apr_signal.inc b/httpd/httpd_2_2/apr/apr_signal.inc index 952cb3145..bf9920383 100644 --- a/httpd/httpd_2_2/apr/apr_signal.inc +++ b/httpd/httpd_2_2/apr/apr_signal.inc @@ -75,11 +75,6 @@ function apr_signal_description_get(signo: Integer): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_signal_description_get' + LibSuff4; -{ @deprecated @see apr_signal_description_get } -function apr_signal_get_description(signo: Integer): PChar; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_signal_get_description' + LibSuff4; - { * APR-private function for initializing the signal package * @internal @@ -87,4 +82,22 @@ function apr_signal_get_description(signo: Integer): PChar; } //void apr_signal_init(apr_pool_t *pglobal); +{ + * Block the delivery of a particular signal + * @param signum The signal number + * @return status + } +function apr_signal_block(signum: Integer): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_signal_block' + LibSuff4; + +{ + * Enable the delivery of a particular signal + * @param signum The signal number + * @return status + } +function apr_signal_unblock(signum: Integer): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_signal_unblock' + LibSuff4; + {$endif} diff --git a/httpd/httpd_2_2/apr/apr_strings.inc b/httpd/httpd_2_2/apr/apr_strings.inc index 21ab2a5f8..7acd0cf91 100644 --- a/httpd/httpd_2_2/apr/apr_strings.inc +++ b/httpd/httpd_2_2/apr/apr_strings.inc @@ -178,22 +178,25 @@ function apr_psprintf(p: Papr_pool_t; const fmt: PChar; others: array of const): cdecl; external LibAPR name 'apr_psprintf'; { - * copy n characters from src to dst + * Copy up to dst_size characters from src to dst; does not copy + * past a NUL terminator in src, but always terminates dst with a NUL + * regardless. * @param dst The destination string * @param src The source string * @param dst_size The space available in dst; dst always receives - * null-termination, so if src is longer than + * NUL termination, so if src is longer than * dst_size, the actual number of characters copied is * dst_size - 1. + * @return Pointer to the NUL terminator of the destination string, dst * @remark *
- * We re-implement this function to implement these specific changes: - * 1) strncpy() doesn't always null terminate and we want it to. - * 2) strncpy() null fills, which is bogus, esp. when copy 8byte strings - * into 8k blocks. - * 3) Instead of returning the pointer to the beginning of the - * destination string, we return a pointer to the terminating null - * to allow us to check for truncation. + * Note the differences between this function and strncpy(): + * 1) strncpy() doesn't always NUL terminate; apr_cpystrn() does. + * 2) strncpy() pads the destination string with NULs, which is often + * unnecessary; apr_cpystrn() does not. + * 3) strncpy() returns a pointer to the beginning of the dst string; + * apr_cpystrn() returns a pointer to the NUL terminator of dst, + * to allow a check for truncation. *} function apr_cpystrn(dst: PChar; const src: PChar; @@ -258,7 +261,6 @@ function apr_strtok(str: PChar; * the buffer had been infinite (in this case, *buffer can be NULL) * * In no event does apr_snprintf return a negative number. - * @{ } { @@ -316,6 +318,25 @@ function apr_off_t_toa(p: Papr_pool_t; n: apr_off_t): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_off_t_toa' + LibSuff12; +{ + * Convert a numeric string into an apr_off_t numeric value. + * @param offset The value of the parsed string. + * @param buf The string to parse. It may contain optional whitespace, + * followed by an optional '+' (positive, default) or '-' (negative) + * character, followed by an optional '0x' prefix if base is 0 or 16, + * followed by numeric digits appropriate for base. + * @param end A pointer to the end of the valid character in buf. If + * not NULL, it is set to the first invalid character in buf. + * @param base A numeric base in the range between 2 and 36 inclusive, + * or 0. If base is zero, buf will be treated as base ten unless its + * digits are prefixed with '0x', in which case it will be treated as + * base 16. + } +function apr_strtoff(offset: Papr_off_t; + const buf: PChar; end_: PPChar; base: cint): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_strtoff' + LibSuff16; + { * parse a numeric string into a 64-bit numeric value * @param buf The string to parse. It may contain optional whitespace, diff --git a/httpd/httpd_2_2/apr/apr_tables.inc b/httpd/httpd_2_2/apr/apr_tables.inc index 0485f3814..4035d322c 100644 --- a/httpd/httpd_2_2/apr/apr_tables.inc +++ b/httpd/httpd_2_2/apr/apr_tables.inc @@ -105,7 +105,7 @@ function apr_array_make(p: Papr_pool_t; external LibAPR name LibNamePrefix + 'apr_array_make' + LibSuff12; { - * Add a new element to an array + * Add a new element to an array (as a first-in, last-out stack) * @param arr The array to add an element to. * @return Location for the new element in the array. * @remark If there are no free spots in the array, then this function will @@ -116,7 +116,7 @@ function apr_array_push(arr: Papr_array_header_t): Pointer; external LibAPR name LibNamePrefix + 'apr_array_push' + LibSuff4; { - * Remove an element from an array + * Remove an element from an array (as a first-in, last-out stack) * @param arr The array to remove an element from. * @return Location of the element in the array. * @remark If there are no elements in the array, NULL is returned. @@ -225,7 +225,7 @@ procedure apr_table_clear(t: Papr_table_t); * The data is still in the table * @param t The table to search for the key * @param key The key to search for - * @return The value associated with the key + * @return The value associated with the key, or NULL if the key does not exist. } function apr_table_get(t: Papr_table_t; key: PChar): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} @@ -434,7 +434,7 @@ procedure apr_table_overlap(a: Papr_table_t; external LibAPR name LibNamePrefix + 'apr_table_overlap' + LibSuff12; { - * Eliminate redunandant entries in a table by either overwriting + * Eliminate redundant entries in a table by either overwriting * or merging duplicates * * @param t Table. diff --git a/httpd/httpd_2_2/apr/apr_thread_proc.inc b/httpd/httpd_2_2/apr/apr_thread_proc.inc index c6c5cfadf..af4c9cedb 100644 --- a/httpd/httpd_2_2/apr/apr_thread_proc.inc +++ b/httpd/httpd_2_2/apr/apr_thread_proc.inc @@ -239,6 +239,20 @@ function apr_threadattr_stacksize_set(new_attr: PPapr_threadattr_t; stacksize: a {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_threadattr_stacksize_set' + LibSuff8; +{ + * Set the stack guard area size of newly created threads. + * @param attr The threadattr to affect + * @param guardsize The stack guard area size in bytes + * @note Thread library implementations commonly use a "guard area" + * after each thread's stack which is not readable or writable such that + * stack overflows cause a segfault; this consumes e.g. 4K of memory + * and increases memory management overhead. Setting the guard area + * size to zero hence trades off reliable behaviour on stack overflow + * for performance. } +function apr_threadattr_guardsize_set(attr: Papr_threadattr_t; guardsize: apr_size_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_threadattr_guardsize_set' + LibSuff8; + { * Create a new thread of execution * @param new_thread The newly created thread handle. @@ -566,6 +580,29 @@ function apr_procattr_addrspace_set(attr: Papr_procattr_t; addrspace: apr_int32_ {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_procattr_addrspace_set' + LibSuff8; +{ + * Set the username used for running process + * @param attr The procattr we care about. + * @param username The username used + * @param password User password if needed. Password is needed on WIN32 + * or any other platform having + * APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set. + } +function apr_procattr_user_set(attr: Papr_procattr_t; + const username, password: PChar): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_procattr_user_set' + LibSuff12; + +{ + * Set the group used for running process + * @param attr The procattr we care about. + * @param groupname The group name used + } +function apr_procattr_group_set(attr: Papr_procattr_t; + const groupname: PChar): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPR name LibNamePrefix + 'apr_procattr_group_set' + LibSuff8; + {$ifdef APR_HAS_FORK} { * This is currently the only non-portable call in APR. This executes @@ -591,12 +628,12 @@ function apr_proc_fork(proc: Papr_proc_t; cont: Papr_pool_t): apr_status_t; * APR_SHELLCMD_ENV types of commands. * @param attr the procattr we should use to determine how to create the new * process - * @param cont The pool to use. + * @param pool The pool to use. } function apr_proc_create(new_proc: Papr_proc_t; const progname: PChar; args, arnv: PPChar; attr: Papr_procattr_t; - cont: Papr_pool_t): apr_status_t; + pool: Papr_pool_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_proc_create' + LibSuff24; @@ -763,23 +800,6 @@ procedure apr_proc_other_child_refresh_all(reason: Integer); {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_proc_other_child_refresh_all' + LibSuff4; -{ @deprecated @see apr_proc_other_child_refresh_all - * @remark Call apr_proc_other_child_refresh_all(APR_OC_REASON_RESTART) - * or apr_proc_other_child_refresh_all(APR_OC_REASON_RUNNING) instead. - * @bug The differing implementations of this function on Win32 (_RUNNING checks) - * and Unix (used only for _RESTART) are the reason it will be dropped with APR 1.0. - } -procedure apr_proc_other_child_check; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_proc_other_child_check' + LibSuff0; - -{ @deprecated @see apr_proc_other_child_alert - * @bug This function's name had nothing to do with it's purpose - } -function apr_proc_other_child_read(proc: Papr_proc_t; status: Integer): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_proc_other_child_read' + LibSuff8; - { * Terminate a process. * @param proc The process to terminate. diff --git a/httpd/httpd_2_2/apr/apr_time.inc b/httpd/httpd_2_2/apr/apr_time.inc index 929d6930d..857e222a9 100644 --- a/httpd/httpd_2_2/apr/apr_time.inc +++ b/httpd/httpd_2_2/apr/apr_time.inc @@ -137,12 +137,6 @@ function apr_time_exp_tz(result: Papr_time_exp_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_time_exp_tz' + LibSuff16; -{ @deprecated @see apr_time_exp_tz } -function apr_explode_time(result: Papr_time_exp_t; - input: apr_time_t; offs: apr_int32_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_explode_time' + LibSuff16; - { * convert a time to its human readable components in GMT timezone * @param result the exploded time @@ -163,12 +157,6 @@ function apr_time_exp_lt(result: Papr_time_exp_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_time_exp_lt' + LibSuff12; -{ @deprecated @see apr_time_exp_lt } -function apr_explode_localtime(result: Papr_time_exp_t; - input: apr_time_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_explode_localtime' + LibSuff12; - { * Convert time value from human readable format to a numeric apr_time_t * e.g. elapsed usec since epoch @@ -191,12 +179,6 @@ function apr_time_exp_gmt_get(result: Papr_time_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_time_exp_gmt_get' + LibSuff8; -{ @deprecated @see apr_time_exp_gmt_get } -function apr_implode_gmt(result: Papr_time_t; - input: Papr_time_exp_t): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_implode_gmt' + LibSuff8; - { * Sleep for the specified number of micro-seconds. * @param t desired amount of time to sleep. diff --git a/httpd/httpd_2_2/apr/apr_user.inc b/httpd/httpd_2_2/apr/apr_user.inc index 39d496dd8..45e14931e 100644 --- a/httpd/httpd_2_2/apr/apr_user.inc +++ b/httpd/httpd_2_2/apr/apr_user.inc @@ -67,10 +67,6 @@ function apr_uid_current(userid: Papr_uid_t; groupid: Papr_gid_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_uid_current' + LibSuff12; -{ @deprecated @see apr_uid_current } -{APR_DECLARE(apr_status_t) apr_current_userid(apr_uid_t *userid, - apr_gid_t *groupid, - apr_pool_t *p);} { * Get the user name for a specified userid * @param username Pointer to new string containing user name (on output) @@ -83,9 +79,6 @@ function apr_uid_name_get(username: PPChar; userid: apr_uid_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_uid_name_get' + LibSuff12; -{ @deprecated @see apr_uid_name_get } -{APR_DECLARE(apr_status_t) apr_get_username(char **username, apr_uid_t userid, - apr_pool_t *p);} { * Get the userid (and groupid) for the specified username * @param userid Returns the user id @@ -99,10 +92,6 @@ function apr_uid_get(userid: Papr_uid_t; groupid: Papr_gid_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_uid_get' + LibSuff16; -{ @deprecated @see apr_uid_get } -{APR_DECLARE(apr_status_t) apr_get_userid(apr_uid_t *userid, apr_gid_t *groupid, - const char *username, apr_pool_t *p);} - { * Get the home directory for the named user * @param dirname Pointer to new string containing directory name (on output) @@ -115,11 +104,6 @@ function apr_uid_homepath_get(dirname: PPChar; const username: PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_uid_homepath_get' + LibSuff12; -{ @deprecated @see apr_uid_homepath_get } -{APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, - const char *username, - apr_pool_t *p);} - { * Compare two user identifiers for equality. * @param left One uid to test @@ -131,12 +115,8 @@ function apr_uid_homepath_get(dirname: PPChar; const username: PChar; {$ifdef WIN32} //APR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right); -{ @deprecated @see apr_uid_compare } -//APR_DECLARE(apr_status_t) apr_compare_users(apr_uid_t left, apr_uid_t right); {$else} //#define apr_uid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH) -{ @deprecated @see apr_uid_compare } -//#define apr_compare_users(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH) {$endif} { @@ -151,14 +131,6 @@ function apr_gid_name_get(groupname: PPChar; groupid: apr_gid_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_gid_name_get' + LibSuff12; -{ @deprecated @see apr_gid_name_get } -{APR_DECLARE(apr_status_t) apr_group_name_get(char **groupname, - apr_gid_t groupid, apr_pool_t *p);} - -{ @deprecated @see apr_gid_name_get } -{APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, - apr_gid_t groupid, apr_pool_t *p);} - { * Get the groupid for a specified group name * @param groupid Pointer to the group id (on output) @@ -171,10 +143,6 @@ function apr_gid_get(groupid: Papr_gid_t; const groupname: PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPR name LibNamePrefix + 'apr_gid_get' + LibSuff12; -{ @deprecated @see apr_gid_get } -{APR_DECLARE(apr_status_t) apr_get_groupid(apr_gid_t *groupid, - const char *groupname, apr_pool_t *p);} - { * Compare two group identifiers for equality. * @param left One gid to test @@ -185,12 +153,8 @@ function apr_gid_get(groupid: Papr_gid_t; const groupname: PChar; } {$ifdef WIN32} //APR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right); -{ @deprecated @see apr_gid_compare } -//APR_DECLARE(apr_status_t) apr_compare_groups(apr_gid_t left, apr_gid_t right); {$else} //#define apr_gid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH) -{ @deprecated @see apr_gid_compare } -//#define apr_compare_groups(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH) {$endif} {$endif} { ! APR_HAS_USER } diff --git a/httpd/httpd_2_2/apr/apr_version.inc b/httpd/httpd_2_2/apr/apr_version.inc index 0b6423298..1427eb45b 100644 --- a/httpd/httpd_2_2/apr/apr_version.inc +++ b/httpd/httpd_2_2/apr/apr_version.inc @@ -40,28 +40,47 @@ * authoritative version numbers for APR. } -{ major version +const +{ 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. } -const - APR_MAJOR_VERSION = 0; + APR_MAJOR_VERSION = 1; -{ +{ minor version * Minor API changes that do not cause binary compatibility problems. - * Should be reset to 0 when upgrading APR_MAJOR_VERSION + * Reset to 0 when upgrading APR_MAJOR_VERSION } - APR_MINOR_VERSION = 9; + APR_MINOR_VERSION = 2; -{ patch level } - APR_PATCH_VERSION = 12; +{ patch level + * The Patch Level never includes API changes, simply bug fixes. + * Reset to 0 when upgrading APR_MINOR_VERSION + } + APR_PATCH_VERSION = 7; + +{$if defined(APR_IS_DEV_VERSION) or defined(DOXYGEN)} +{ Internal: string form of the "is dev" flag } + APR_IS_DEV_STRING = '-dev'; +{$else} + APR_IS_DEV_STRING = ''; +{$endif} + +{ APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it } +{#ifndef APR_STRINGIFY +/** Properly quote a value as a string in the C preprocessor */ +#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n) +/** Helper macro for APR_STRINGIFY */ +#define APR_STRINGIFY_HELPER(n) #n +#endif} { - * This symbol is defined for internal, "development" copies of APR. This - * symbol will be #undef'd for releases. + * The symbol APR_IS_DEV_VERSION is only defined for internal, + * "development" copies of APR. It is undefined for released versions + * of APR. } -{.$undef APR_IS_DEV_VERSION} +{$undef APR_IS_DEV_VERSION} { The formatted string of APR's version } @@ -71,6 +90,22 @@ const APR_STRINGIFY(APR_PATCH_VERSION) \ APR_IS_DEV_STRING} +{ An alternative formatted string of APR's version } +{ macro for Win32 .rc files using numeric csv representation } +{#define APR_VERSION_STRING_CSV APR_MAJOR_VERSION ##, \ + ##APR_MINOR_VERSION ##, \ + ##APR_PATCH_VERSION} + + +//#ifndef APR_VERSION_ONLY + +{ The C language API to access the version at run time, + * as opposed to compile time. APR_VERSION_ONLY may be defined + * externally when preprocessing apr_version.h to obtain strictly + * the C Preprocessor macro declarations. + } + +//#include "apr.h" { * The numeric version information is broken out into fields within this @@ -102,11 +137,5 @@ function apr_version_string: PChar; external LibAPR name LibNamePrefix + 'apr_version_string' + LibSuff0; -{ Internal: string form of the "is dev" flag } -{#ifdef APR_IS_DEV_VERSION -#define APR_IS_DEV_STRING "-dev" -#else} -const - APR_IS_DEV_STRING = ''; //#endif diff --git a/httpd/httpd_2_2/aprutil/apr_md5.inc b/httpd/httpd_2_2/aprutil/apr_md5.inc index 730c5ae43..8ce252515 100644 --- a/httpd/httpd_2_2/aprutil/apr_md5.inc +++ b/httpd/httpd_2_2/aprutil/apr_md5.inc @@ -60,7 +60,6 @@ const { The MD5 digest size } APR_MD5_DIGESTSIZE = 16; - MD5_DIGESTSIZE = APR_MD5_DIGESTSIZE; {< @deprecated } { @see apr_md5_ctx_t } type @@ -148,7 +147,12 @@ function apr_md5_encode(const password, salt: PChar; external LibAPRUtil name LibNamePrefix + 'apr_md5_encode' + LibSuff16; { - * Validate any password encypted with any algorithm that APR understands + * Validate hashes created by APR-supported algorithms: md5 and sha1. + * hashes created by crypt are supported only on platforms that provide + * crypt(3), so don't rely on that function unless you know that your + * application will be run only on platforms that support it. On platforms + * that don't support crypt(3), this falls back to a clear text string + * comparison. * @param passwd The password to validate * @param hash The password to validate against } diff --git a/httpd/httpd_2_2/aprutil/apr_uri.inc b/httpd/httpd_2_2/aprutil/apr_uri.inc index 479192a3c..0177eae45 100644 --- a/httpd/httpd_2_2/aprutil/apr_uri.inc +++ b/httpd/httpd_2_2/aprutil/apr_uri.inc @@ -120,11 +120,6 @@ function apr_uri_port_of_scheme(const scheme_str: PChar): apr_port_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPRUtil name LibNamePrefix + 'apr_uri_port_of_scheme' + LibSuff4; -{ @deprecated @see apr_uri_port_of_scheme } -function apr_uri_default_port_for_scheme(const scheme_str: PChar): apr_port_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPRUtil name LibNamePrefix + 'apr_uri_default_port_for_scheme' + LibSuff4; - { * Unparse a apr_uri_t structure to an URI string. Optionally * suppress the password for security reasons. diff --git a/httpd/httpd_2_2/aprutil/apr_xlate.inc b/httpd/httpd_2_2/aprutil/apr_xlate.inc index 7ecd65b69..580c62ce3 100644 --- a/httpd/httpd_2_2/aprutil/apr_xlate.inc +++ b/httpd/httpd_2_2/aprutil/apr_xlate.inc @@ -88,24 +88,27 @@ function apr_xlate_sb_get(convset: Papr_xlate_t; onoff: PInteger): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibAPRUtil name LibNamePrefix + 'apr_xlate_sb_get' + LibSuff8; -{ @deprecated @see apr_xlate_sb_get } -function apr_xlate_get_sb(convset: Papr_xlate_t; onoff: PInteger): apr_status_t; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPRUtil name LibNamePrefix + 'apr_xlate_get_sb' + LibSuff8; - { * Convert a buffer of text from one codepage to another. - * @param convset The handle allocated by apr_xlate_open, specifying + * @param convset The handle allocated by apr_xlate_open, specifying * the parameters of conversion * @param inbuf The address of the source buffer * @param inbytes_left Input: the amount of input data to be translated - * Output: the amount of input data not yet translated + * Output: the amount of input data not yet translated * @param outbuf The address of the destination buffer * @param outbytes_left Input: the size of the output buffer * Output: the amount of the output buffer not yet used * @remark - * Return APR_ENOTIMPL if charset transcoding is not available - * in this instance of apr-util (i.e., APR_HAS_XLATE is undefined). + * Returns APR_ENOTIMPL if charset transcoding is not available + * in this instance of apr-util (i.e., APR_HAS_XLATE is undefined). + * Returns APR_INCOMPLETE if the input buffer ends in an incomplete + * multi-byte character. + * + * To correctly terminate the output buffer for some multi-byte + * character set encodings, a final call must be made to this function + * after the complete input string has been converted, passing + * the inbuf and inbytes_left parameters as NULL. (Note that this + * mode only works from version 1.1.0 onwards) } function apr_xlate_conv_buffer(convset: Papr_xlate_t; const inbuf: PChar; inbytes_left: Papr_size_t; outbuf: PChar; outbytes_left: Papr_size_t): apr_status_t; diff --git a/httpd/httpd_2_2/aprutil/apr_xml.inc b/httpd/httpd_2_2/aprutil/apr_xml.inc index 9c5a7ecad..89c2284a3 100644 --- a/httpd/httpd_2_2/aprutil/apr_xml.inc +++ b/httpd/httpd_2_2/aprutil/apr_xml.inc @@ -26,7 +26,11 @@ #include "apr_tables.h" #include "apr_file_io.h" -#include "apu.h"} +#include "apu.h" +#if APR_CHARSET_EBCDIC +#include "apr_xlate.h" +#endif +} { * @package Apache XML library @@ -347,3 +351,17 @@ function apr_xml_insert_uri(uri_array: Papr_array_header_t; { Get the URI item for this XML element } //#define APR_XML_GET_URI_ITEM(ary, i) (((const char * const *)(ary)->elts)[i]) +{$ifdef APR_CHARSET_EBCDIC} +{ + * Convert parsed tree in EBCDIC + * @param p The pool to allocate out of + * @param pdoc The apr_xml_doc to convert. + * @param xlate The translation handle to use. + * @return Any errors found during conversion. + } +function apr_xml_parser_convert_doc(p: Papr_pool_t; + pdoc: Papr_xml_doc; convset: Papr_xlate_t): apr_status_t; + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibAPRUtil name LibNamePrefix + 'apr_xml_parser_convert_doc' + LibSuff12; +{$endif} + diff --git a/httpd/httpd_2_2/http_config.inc b/httpd/httpd_2_2/http_config.inc index a46c72494..056542c7e 100644 --- a/httpd/httpd_2_2/http_config.inc +++ b/httpd/httpd_2_2/http_config.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -31,14 +31,17 @@ const APR_HOOK_REALLY_LAST = 30; -//#include "apr_hooks.h" -{.$include util_cfgtree.inc} - { * @file http_config.h * @brief Apache Configuration + * + * @defgroup APACHE_CORE_CONFIG Configuration + * @ingroup APACHE_CORE } +//#include "apr_hooks.h" +{.$include util_cfgtree.inc} + { * @defgroup ConfigDirectives Allowed locations for configuration directives. * @@ -103,7 +106,8 @@ type TAKE3, {< three arguments only } TAKE23, {< two or three arguments } TAKE123, {< one, two or three arguments } - TAKE13 {< one or three arguments } + TAKE13, {< one or three arguments } + TAKE_ARGV {< an argc and argv are passed } ); { @@ -125,7 +129,9 @@ type { function to call for a no-args } no_args_t = function (parms: Pcmd_parms; mconfig: Pointer): PChar; { function to call for a raw-args } - raw_args_t = function (parms: Pcmd_parms; mconfig: Pointer; const args: PChar): Pchar; + raw_args_t = function (parms: Pcmd_parms; mconfig: Pointer; const args: PChar): PChar; + { function to call for a argv/argc } + take_argv_t = function (parms: Pcmd_parms; mconfig: Pointer; argc: cint; argv: array of PChar): PChar; { function to call for a take1 } take1_t = function (parms: Pcmd_parms; mconfig: Pointer; const w: PChar): PChar; { function to call for a take2 } @@ -140,6 +146,8 @@ type // AP_NO_ARGS = func.no_args; { This configuration directive will handle it's own parsing of arguments} // AP_RAW_ARGS = func.raw_args; + { This configuration directive will handle it's own parsing of arguments} +//# define AP_TAKE_ARGV func.take_argv { This configuration directive takes 1 argument} // AP_TAKE1 = func.take1; { This configuration directive takes 2 arguments } @@ -155,6 +163,9 @@ type { method of declaring a directive with raw argument parsing } //# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \ // directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help } +{ method of declaring a directive with raw argument parsing } +//# define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help) \ +// { directive, { .take_argv=func }, mconfig, where, TAKE_ARGV, help } { method of declaring a directive which takes 1 argument } //# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \ // directive, { .take1=func }, mconfig, where, TAKE1, help } @@ -192,6 +203,7 @@ type //# define AP_NO_ARGS func //# define AP_RAW_ARGS func +//# define AP_TAKE_ARGV func //# define AP_TAKE1 func //# define AP_TAKE2 func //# define AP_TAKE3 func @@ -201,6 +213,8 @@ type { directive, func, mconfig, where, RAW_ARGS, help } //# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \ { directive, func, mconfig, where, RAW_ARGS, help } +//# define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help) \ + { directive, func, mconfig, where, TAKE_ARGV, help } //# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \ { directive, func, mconfig, where, TAKE1, help } //# define AP_INIT_ITERATE(directive, func, mconfig, where, help) \ @@ -312,6 +326,9 @@ type context: Pap_conf_vector_t; { directive with syntax error } err_directive: Pap_directive_t; + + { Which allow-override-opts bits are set } + override_opts: cint; end; cmd_parms = cmd_parms_struct; @@ -572,7 +589,7 @@ function ap_server_root_relative(p: Papr_pool_t; const fname: PChar): PChar; * @param m The module structure of the module to add * @param p The pool of the same lifetime as the module } -procedure ap_add_module(m: Pmodule; p: Papr_pool_t); +function ap_add_module(m: Pmodule; p: Papr_pool_t): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_add_module' + LibSuff8; @@ -605,17 +622,6 @@ procedure ap_remove_loaded_module(m: Pmodule); {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_remove_loaded_module' + LibSuff4; -{ - * Add a module to the list of loaded module based on the name of the - * module - * @param name The name of the module - * @param p The pool valid for the lifetime of the module - * @return 1 on success, 0 on failure - } -function ap_add_named_module(const name: PChar; p: Papr_pool_t): Integer; - {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibHTTPD name LibNamePrefix + 'ap_add_named_module' + LibSuff8; - { * Find the name of the specified module * @param m The module to get the name for @@ -750,7 +756,7 @@ function ap_walk_config(conftree: Pap_directive_t; external LibHTTPD name LibNamePrefix + 'ap_walk_config' + LibSuff12; { - * @defgroup ap_check_cmd_context ap_check_cmd_context + * @defgroup ap_check_cmd_context Check command context } { * Check the context a command is used in. @@ -776,6 +782,15 @@ const //#ifdef CORE_PRIVATE +{ + * @brief This structure is used to assign symbol names to module pointers + } +type + ap_module_symbol_t = record + name: PChar; + modp: Pmodule; + end; + { * The topmost module in the list * @defvar module *ap_top_module @@ -787,6 +802,11 @@ const * @defvar module *ap_prelinked_modules[] } //AP_DECLARE_DATA extern module *ap_prelinked_modules[]; +{ + * Array of all statically linked modulenames (symbols) + * @defvar ap_module_symbol_t ap_prelinked_modulenames[] + } +//AP_DECLARE_DATA extern ap_module_symbol_t ap_prelinked_module_symbols[]; { * Array of all preloaded modules * @defvar module *ap_preloaded_modules[] @@ -814,7 +834,7 @@ procedure ap_single_module_configure(p: Papr_pool_t; * Add all of the prelinked modules into the loaded module list * @param process The process that is currently running the server } -procedure ap_setup_prelinked_modules(process: Pprocess_rec); +function ap_setup_prelinked_modules(process: Pprocess_rec): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_setup_prelinked_modules' + LibSuff4; @@ -935,10 +955,10 @@ function ap_create_conn_config(p: Papr_pool_t): Pap_conf_vector_t; * int The status of the current request } function ap_parse_htaccess(result: PPap_conf_vector_t; - r: Prequest_rec; override_: Integer; + r: Prequest_rec; override_: Integer; override_opts: cint; const path, access_name: PChar): Integer; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibHTTPD name LibNamePrefix + 'ap_parse_htaccess' + LibSuff20; + external LibHTTPD name LibNamePrefix + 'ap_parse_htaccess' + LibSuff24; { * Setup a virtual host @@ -950,7 +970,7 @@ function ap_parse_htaccess(result: PPap_conf_vector_t; } function ap_init_virtual_host(p: Papr_pool_t; const hostname: PChar; main_server: Pserver_rec; - m: PPserver_rec): PChar; + ps: PPserver_rec): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_init_virtual_host' + LibSuff16; @@ -962,9 +982,9 @@ function ap_init_virtual_host(p: Papr_pool_t; * @param p Pool for general allocation * @param ptem Pool for temporary allocation } -procedure ap_process_resource_config(s: Pserver_rec; +function ap_process_resource_config(s: Pserver_rec; const fname: PChar; conftree: PPap_directive_t; - p, ptemp: Papr_pool_t); + p, ptemp: Papr_pool_t): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_process_resource_config' + LibSuff20; @@ -975,8 +995,8 @@ procedure ap_process_resource_config(s: Pserver_rec; * @param p The pool for general allocation * @param ptemp The pool for temporary allocations } -procedure ap_process_config_tree(s: Pserver_rec; - conftree: Pap_directive_t; p, ptemp: Papr_pool_t); +function ap_process_config_tree(s: Pserver_rec; + conftree: Pap_directive_t; p, ptemp: Papr_pool_t): cint; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_process_config_tree' + LibSuff16; @@ -1066,6 +1086,20 @@ procedure ap_hook_pre_config(pf: ap_HOOK_pre_config_t; const aszPre: PPChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_hook_pre_config' + LibSuff16; +{ + * Run the test_config function for each module; this hook is run + * only if the server was invoked to test the configuration syntax. + * @param pconf The config pool + * @param s The list of server_recs + } +type + ap_HOOK_test_config_t = procedure (pconf: Papr_pool_t; s: Pserver_rec); cdecl; + +procedure ap_hook_test_config(pf: ap_HOOK_test_config_t; const aszPre: PPChar; + const aszSucc: PPChar; nOrder: Integer); + {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} + external LibHTTPD name LibNamePrefix + 'ap_hook_test_config' + LibSuff16; + { * Run the post_config function for each module * @param pconf The config pool diff --git a/httpd/httpd_2_2/http_connection.inc b/httpd/httpd_2_2/http_connection.inc index ababd571c..d89dbb45d 100644 --- a/httpd/httpd_2_2/http_connection.inc +++ b/httpd/httpd_2_2/http_connection.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -14,13 +14,19 @@ * limitations under the License. } +{ + * @package Apache connection library + } + {#include "apr_hooks.h" #include "apr_network_io.h" #include "apr_buckets.h"} { - * @package Apache connection library + * @file http_connection.h + * @brief Apache connection library } + //#ifdef CORE_PRIVATE { * This is the protocol module driver. This calls all of the @@ -35,6 +41,10 @@ procedure ap_process_connection(c: Pconn_rec; csd: Pointer); {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_process_connection' + LibSuff8; +{ + * Flushes all remain data in the client send buffer + * @param c The connection to flush + } procedure ap_flush_conn(c: Pconn_rec); {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_flush_conn' + LibSuff4; diff --git a/httpd/httpd_2_2/http_core.inc b/httpd/httpd_2_2/http_core.inc index 230675a4d..c4e126165 100644 --- a/httpd/httpd_2_2/http_core.inc +++ b/httpd/httpd_2_2/http_core.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -41,18 +41,31 @@ } const +{ No directives } OPT_NONE = 0; +{ Indexes directive } OPT_INDEXES = 1; +{ Includes directive } OPT_INCLUDES = 2; +{ FollowSymLinks directive } OPT_SYM_LINKS = 4; +{ ExecCGI directive } OPT_EXECCGI = 8; +{ directive unset } OPT_UNSET = 16; +{ IncludesNOEXEC directive } OPT_INCNOEXEC = 32; +{ SymLinksIfOwnerMatch directive } OPT_SYM_OWNER = 64; +{ MultiViews directive } OPT_MULTI = 128; +{ All directives } OPT_ALL = (OPT_INDEXES or OPT_INCLUDES or OPT_SYM_LINKS or OPT_EXECCGI); -{ options for get_remote_host() } +{ + * @defgroup get_remote_host Remote Host Resolution + * @ingroup APACHE_CORE_HTTPD + } { REMOTE_HOST returns the hostname, or NULL if the hostname * lookup fails. It will force a DNS lookup according to the * HostnameLookups setting. @@ -77,8 +90,11 @@ const } REMOTE_DOUBLE_REV = (3); +{ all of the requirements must be met } SATISFY_ALL = 0; +{ any of the requirements must be met } SATISFY_ANY = 1; +{ There are no applicable satisfy lines } SATISFY_NOSPEC = 2; { Make sure we don't write less than 8000 bytes at any one time. @@ -464,6 +480,10 @@ const ENABLE_SENDFILE_ON = (1); ENABLE_SENDFILE_UNSET = (2); + USE_CANONICAL_PHYS_PORT_OFF = (0); + USE_CANONICAL_PHYS_PORT_ON = (1); + USE_CANONICAL_PHYS_PORT_UNSET = (2); + type server_signature_e = ( srv_sig_unset, @@ -490,6 +510,7 @@ type opts_add: allow_options_t; opts_remove: allow_options_t; override_: overrides_t; + override_opts: allow_options_t; { MIME typing --- the core doesn't do anything at all with this, * but it does know what to slap on a request for a document which @@ -517,8 +538,6 @@ type { Hostname resolution etc } { unsigned int hostname_lookups : 4; } -{ signed int do_rfc1413 : 2; }{ See if client is advertising a username? } - { signed int content_md5 : 2; }{ calculate Content-MD5? } { unsigned use_canonical_name : 2; } @@ -556,7 +575,7 @@ type { Access control } sec_file: Papr_array_header_t; - r: Pregex_t; + r: Pap_regex_t; mime_type: PChar; { forced with ForceType } handler: PChar; { forced with SetHandler } @@ -581,6 +600,7 @@ type { unsigned int enable_sendfile : 2; }{ files in this dir can be mmap'ed } { unsigned int allow_encoded_slashes : 1; }{ URLs may contain %2f w/o being * pitched indiscriminately } +{ unsigned use_canonical_phys_port : 2;} end; { Per-server core configuration } @@ -616,6 +636,9 @@ type redirect_limit: Integer; { maximum number of internal redirects } subreq_limit: Integer; { maximum nesting level of subrequests } + protocol: PChar; + accf_map: Papr_table_t; + { TRACE control } trace_enable: Integer; end; @@ -632,7 +655,16 @@ AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config); AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config); AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);} -//#endif COREPRIVATE +{ Core filters; not exported. } +{int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, + ap_input_mode_t mode, apr_read_type_e block, + apr_off_t readbytes); +apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b); + +#endif} { CORE_PRIVATE } + +//AP_DECLARE(const char*) ap_get_server_protocol(server_rec* s); +//AP_DECLARE(void) ap_set_server_protocol(server_rec* s, const char* proto); { ---------------------------------------------------------------------- @@ -665,7 +697,6 @@ type {extern AP_DECLARE_DATA ap_filter_rec_t *ap_subreq_core_filter_handle; extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_output_filter_handle; extern AP_DECLARE_DATA ap_filter_rec_t *ap_content_length_filter_handle; -extern AP_DECLARE_DATA ap_filter_rec_t *ap_net_time_filter_handle; extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;} { @@ -700,3 +731,11 @@ procedure ap_hook_get_mgmt_items(pf: ap_HOOK_get_mgmt_items_t; {APR_DECLARE_OPTIONAL_FN(void, ap_logio_add_bytes_out, (conn_rec *c, apr_off_t bytes));} +{ ---------------------------------------------------------------------- + * + * ident lookups with mod_ident + } + +{APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup, + (request_rec *r));} + diff --git a/httpd/httpd_2_2/http_request.inc b/httpd/httpd_2_2/http_request.inc index e2997834f..c06eba423 100644 --- a/httpd/httpd_2_2/http_request.inc +++ b/httpd/httpd_2_2/http_request.inc @@ -1,9 +1,9 @@ -{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -14,19 +14,12 @@ * limitations under the License. } -{#include "apr_hooks.h" -#include "util_filter.h"} - -const - AP_SUBREQ_NO_ARGS = 0; - AP_SUBREQ_MERGE_ARGS = 1; - { * @file http_request.h * @brief Apache Request library } -{ http_request.c is the code which handles the main line of request +{ request.c is the code which handles the main line of request * processing, once a request has been read in (finding the right per- * directory configuration, building it if necessary, and calling all * the module dispatch functions in the right order). @@ -46,6 +39,13 @@ const * about which was allocated in its apr_pool_t elsewhere before doing this. } +{#include "apr_hooks.h" +#include "util_filter.h"} + +const + AP_SUBREQ_NO_ARGS = 0; + AP_SUBREQ_MERGE_ARGS = 1; + { * An internal handler used by the ap_process_request, all subrequest mechanisms * and the redirect mechanism. diff --git a/httpd/httpd_2_2/httpd.inc b/httpd/httpd_2_2/httpd.inc index a79d9ca80..53db814dc 100644 --- a/httpd/httpd_2_2/httpd.inc +++ b/httpd/httpd_2_2/httpd.inc @@ -25,7 +25,7 @@ {#include "os.h"} -{$include pcreposix.inc} +{$include ap_regex.inc} // Note: util_uri.h is also included, see below @@ -1061,7 +1061,7 @@ type limit_req_fields: Integer; { The server request scheme for redirect responses } - server_scheme: P_Char; + server_scheme: PChar; end; type @@ -1675,7 +1675,7 @@ function ap_escape_quotes(p: Papr_pool_t; const instring: PChar): PChar; * @param string The string to append the PID to * @param delim The string to use to deliminate the string from the PID * @return A copy of the string with the PID appended - */ + } function ap_append_pid(p: Papr_pool_t; const string_, delim: PChar): PChar; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD name LibNamePrefix + 'ap_append_pid' + LibSuff12; diff --git a/httpd/httpd_2_2/pcreposix.inc b/httpd/httpd_2_2/pcreposix.inc deleted file mode 100644 index 94e7b4092..000000000 --- a/httpd/httpd_2_2/pcreposix.inc +++ /dev/null @@ -1,85 +0,0 @@ -{************************************************* -* Perl-Compatible Regular Expressions * -*************************************************} - -{ Copyright (c) 1997-2000 University of Cambridge } - -{ - * @file include/pcreposix.h - * @brief PCRE definitions - } - -{ This is the header for the POSIX wrapper interface to the PCRE Perl- -Compatible Regular Expression library. It defines the things POSIX says should -be there. I hope. } - -{ Have to include stdlib.h in order to ensure that size_t is defined. } - -{ Options defined by POSIX. } - -const - { Ignore case } - REG_ICASE = $01; - { Don't match newlines with wildcards } - REG_NEWLINE = $02; - { Don't match BOL } - REG_NOTBOL = $04; - { Don't match EOL } - REG_NOTEOL = $08; - -{ These are not used by PCRE, but by defining them we make it easier -to slot PCRE into existing programs that make POSIX calls. } - - { UNUSED! } - REG_EXTENDED = 0; - { UNUSED! } - REG_NOSUB = 0; - -{ Error values. Not all these are relevant or used by the wrapper. } - -type - pc_error = ( - REG_ASSERT = 1, { internal error ? } - REG_BADBR, { invalid repeat counts in } {} - REG_BADPAT, { pattern error } - REG_BADRPT, { ? * + invalid } - REG_EBRACE, { unbalanced } {} - REG_EBRACK, { unbalanced [] } - REG_ECOLLATE, { collation error - not relevant } - REG_ECTYPE, { bad class } - REG_EESCAPE, { bad escape sequence } - REG_EMPTY, { empty expression } - REG_EPAREN, { unbalanced () } - REG_ERANGE, { bad range inside [] } - REG_ESIZE, { expression too big } - REG_ESPACE, { failed to get memory } - REG_ESUBREG, { bad back reference } - REG_INVARG, { bad argument } - REG_NOMATCH { match failed } - ); - - -{ The structure representing a compiled regular expression. } - - regex_t = record - re_pcre: Pointer; - re_nsub, re_erroffset: size_t; - end; - - Pregex_t = ^regex_t; - -{ The structure in which a captured offset is returned. } - - regoff_t = Integer; - - regmatch_t = record - rm_so, rm_eo: regoff_t; - end; - -{ The functions } - -{extern int regcomp(regex_t *, const char *, int); -extern int regexec(regex_t *, const char *, size_t, regmatch_t *, int); -extern size_t regerror(int, const regex_t *, char *, size_t); -extern void regfree(regex_t *);} - diff --git a/httpd/httpd_2_2/util_cfgtree.inc b/httpd/httpd_2_2/util_cfgtree.inc index b7ea01bb4..f989ce7a5 100644 --- a/httpd/httpd_2_2/util_cfgtree.inc +++ b/httpd/httpd_2_2/util_cfgtree.inc @@ -1,9 +1,9 @@ -{ Copyright 2000-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -14,12 +14,12 @@ * limitations under the License. } -//#include "ap_config.h" - { * @package Config Tree Package } +//#include "ap_config.h" + type Pap_directive_t = ^ap_directive_t; PPap_directive_t = ^Pap_directive_t; diff --git a/httpd/httpd_2_2/util_filter.inc b/httpd/httpd_2_2/util_filter.inc index e6ad186e5..69d11691a 100644 --- a/httpd/httpd_2_2/util_filter.inc +++ b/httpd/httpd_2_2/util_filter.inc @@ -1,9 +1,9 @@ -{ Copyright 2000-2005 The Apache Software Foundation or its licensors, as - * applicable. - * - * Licensed 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 +{ 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 * @@ -14,6 +14,11 @@ * limitations under the License. } +{ + * @file util_filter.h + * @brief Apache filter library + } + {#include "apr.h" #include "apr_buckets.h" @@ -23,11 +28,6 @@ #include