Michaël Van Canneyt 2 лет назад
Родитель
Сommit
09d4f7f4c1

+ 10 - 10
packages/httpd24/examples/mod_hello.pp

@@ -21,7 +21,7 @@ exports
 *******************************************************************}
 function DefaultHandler(r: Prequest_rec): Integer; cdecl;
 var
-  RequestedHandler, onerow: string;
+  RequestedHandler, onerow: ansistring;
 
   
 begin
@@ -42,7 +42,7 @@ begin
                0,                                   //The status code from the previous command
                r^.server,                           //The server on which we are logging
                'mod_hello: %s',                     //The format string
-               [PChar('Before content is output')]); //The arguments to use to fill out fmt.
+               [PAnsiChar('Before content is output')]); //The arguments to use to fill out fmt.
 
   ap_set_content_type(r, 'text/html');
 
@@ -59,21 +59,21 @@ begin
    ap_rputs and ap_rprintf functions. More information about
    the use of these can be found in http_protocol.inc }
   onerow := '<HTML>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '<HEAD>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '<TITLE>Hello There</TITLE>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '</HEAD>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '<BODY BGCOLOR="#FFFFFF">' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '<H1>Hello world</H1>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := 'This is an Apache Module working with the binding from Free Pascal' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
   onerow := '</BODY></HTML>' + LineEnding;
-  ap_rwrite(PChar(onerow), length(onerow), r);
+  ap_rwrite(PAnsiChar(onerow), length(onerow), r);
 
   { We can either return OK or DECLINED at this point. If we return
          * OK, then no other modules will attempt to process this request }

+ 40 - 40
packages/httpd24/src/ap_expr.inc

@@ -77,7 +77,7 @@ type
     {** The filename where the expression has been defined (for logging).
      *  May be NULL
      *}
-    filename: PChar;
+    filename: PAnsiChar;
     //** The line number where the expression has been defined (for logging). */
     line_number: cuint;
     //** Flags relevant for the expression, see AP_EXPR_FLAG_* */
@@ -113,8 +113,8 @@ const
  *       response header, unless ::AP_EXPR_FLAG_DONT_VARY is set.
  *}
 //AP_DECLARE(int) ap_expr_exec(request_rec *r, const ap_expr_info_t *expr,
-//                             const char **err);
-function ap_expr_exec(r: Prequest_rec; const expr: Pap_expr_info_t; err: PPChar): Integer;
+//                             const AnsiChar **err);
+function ap_expr_exec(r: Prequest_rec; const expr: Pap_expr_info_t; err: PPAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_exec' + LibSuff12;
 
@@ -136,10 +136,10 @@ function ap_expr_exec(r: Prequest_rec; const expr: Pap_expr_info_t; err: PPChar)
  *}
 //AP_DECLARE(int) ap_expr_exec_re(request_rec *r, const ap_expr_info_t *expr,
 //                                apr_size_t nmatch, ap_regmatch_t *pmatch,
-//                                const char **source, const char **err);
+//                                const AnsiChar **source, const AnsiChar **err);
 function ap_expr_exec_re(r: Prequest_rec; const expr: Pap_expr_info_t;
                          nmatch: apr_size_t; pmatch: Pap_regmatch_t;
-                         const source: PPChar; const err: PPChar): Integer;
+                         const source: PPAnsiChar; const err: PPAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_exec_re' + LibSuff24;
 
@@ -156,7 +156,7 @@ type
     //** the pool to use */
     p : Papr_pool_t;
     //** where to store the error string */
-    err : PPchar;
+    err : PPAnsiChar;
     //** ap_expr_info_t for the expression */
     info : Pap_expr_info_t;
     //** regex match information for back references */
@@ -164,14 +164,14 @@ type
     //** size of the vector pointed to by re_pmatch */
     re_nmatch : apr_size_t;
     //** the string corresponding to the re_pmatch */
-    re_source : PPchar;
+    re_source : PPAnsiChar;
     {** A string where the comma separated names of headers are stored
      * to be later added to the Vary: header. If NULL, the caller is not
      * interested in this information.
      *}
-    vary_this : PPchar;
+    vary_this : PPAnsiChar;
     //** where to store the result string */
-    result_string : PPchar;
+    result_string : PPAnsiChar;
     //** Arbitrary context data provided by the caller for custom functions */
     data : pointer;
     //** The current recursion level */
@@ -202,12 +202,12 @@ function ap_expr_exec_ctx(ctx: Pap_expr_eval_ctx_t): Integer;
  * @note request headers used during evaluation will be added to the Vary:
  *       response header, unless ::AP_EXPR_FLAG_DONT_VARY is set.
  *}
-//AP_DECLARE(const char *) ap_expr_str_exec(request_rec *r,
+//AP_DECLARE(const AnsiChar *) ap_expr_str_exec(request_rec *r,
 //                                          const ap_expr_info_t *expr,
-//                                          const char **err);
+//                                          const AnsiChar **err);
 function ap_expr_str_exec(r: Prequest_rec;
                           const expr: Pap_expr_info_t;
-                          const err: PPChar): PChar;
+                          const err: PPAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_str_exec' + LibSuff12;
 
@@ -227,18 +227,18 @@ function ap_expr_str_exec(r: Prequest_rec;
  * @note request headers used during evaluation will be added to the Vary:
  *       response header, unless ::AP_EXPR_FLAG_DONT_VARY is set.
  *}
-//AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r,
+//AP_DECLARE(const AnsiChar *) ap_expr_str_exec_re(request_rec *r,
 //                                             const ap_expr_info_t *expr,
 //                                             apr_size_t nmatch,
 //                                             ap_regmatch_t *pmatch,
-//                                             const char **source,
-//                                             const char **err);
+//                                             const AnsiChar **source,
+//                                             const AnsiChar **err);
 function ap_expr_str_exec_re(r: Prequest_rec;
                           const expr: Pap_expr_info_t;
                           nmatch: apr_size_t;
                           pmatch: Pap_regmatch_t;
-                          const source: PPChar;
-                          const err: PPChar): PChar;
+                          const source: PPAnsiChar;
+                          const err: PPAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_str_exec_re' + LibSuff24;
 
@@ -269,10 +269,10 @@ function ap_expr_str_exec_re(r: Prequest_rec;
  * @return 0 or 1
  *}
 //typedef int ap_expr_op_unary_t(ap_expr_eval_ctx_t *ctx, const void *data,
-//                               const char *arg);
+//                               const AnsiChar *arg);
 type
   ap_expr_op_unary_t = function(ctx: Pap_expr_eval_ctx_t; const data: Pointer;
-                                const arg: PChar): Integer; cdecl;
+                                const arg: PAnsiChar): Integer; cdecl;
 
 {** Binary operator, takes two string arguments and returns a bool value.
  * The name must have the form '-cmp' (at least two letters).
@@ -283,9 +283,9 @@ type
  * @return 0 or 1
  *}
 //typedef int ap_expr_op_binary_t(ap_expr_eval_ctx_t *ctx, const void *data,
-//                                const char *arg1, const char *arg2);
+//                                const AnsiChar *arg1, const AnsiChar *arg2);
   ap_expr_op_binary_t = function(ctx: Pap_expr_eval_ctx_t; const data: Pointer;
-                                 const arg1: PChar; const arg2: PChar): Integer; cdecl;
+                                 const arg1: PAnsiChar; const arg2: PAnsiChar): Integer; cdecl;
 
 {** String valued function, takes a string argument and returns a string
  * @param ctx The evaluation context
@@ -293,12 +293,12 @@ type
  * @param arg The argument
  * @return The functions result string, may be NULL for 'empty string'
  *}
-//typedef const char *(ap_expr_string_func_t)(ap_expr_eval_ctx_t *ctx,
+//typedef const AnsiChar *(ap_expr_string_func_t)(ap_expr_eval_ctx_t *ctx,
 //                                            const void *data,
-//                                            const char *arg);
+//                                            const AnsiChar *arg);
   ap_expr_string_func_t = function(ctx: Pap_expr_eval_ctx_t;
                                    const data: Pointer;
-                                   const arg: PChar): PChar; cdecl;
+                                   const arg: PAnsiChar): PAnsiChar; cdecl;
 
 {** List valued function, takes a string argument and returns a list of strings
  * Can currently only be called following the builtin '-in' operator.
@@ -309,20 +309,20 @@ type
  *}
 //typedef apr_array_header_t *(ap_expr_list_func_t)(ap_expr_eval_ctx_t *ctx,
 //                                                  const void *data,
-//                                                  const char *arg);
+//                                                  const AnsiChar *arg);
   ap_expr_list_func_t = function(ctx: Pap_expr_eval_ctx_t;
                                  const data: Pointer;
-                                 const arg: PChar): Papr_array_header_t;
+                                 const arg: PAnsiChar): Papr_array_header_t;
 
 {** Variable lookup function, takes no argument and returns a string
  * @param ctx The evaluation context
  * @param data An opaque context provided by the lookup hook function
  * @return The expanded variable
  *}
-//typedef const char *(ap_expr_var_func_t)(ap_expr_eval_ctx_t *ctx,
+//typedef const AnsiChar *(ap_expr_var_func_t)(ap_expr_eval_ctx_t *ctx,
 //                                         const void *data);
   ap_expr_var_func_t = function(ctx: Pap_expr_eval_ctx_t;
-                                const data: Pointer): PChar; cdecl;
+                                const data: Pointer): PAnsiChar; cdecl;
 
 const
   AP_EXPR_FUNC_VAR        = 0;
@@ -343,7 +343,7 @@ type
 //#define AP_EXPR_FUNC_OP_UNARY   3
 //#define AP_EXPR_FUNC_OP_BINARY  4
     //** name of the looked up object */
-    name: PChar;
+    name: PAnsiChar;
 
     flags: Integer;
 
@@ -355,11 +355,11 @@ type
     //** where to store the function's context */
     data: PPointer;
     //** where to store the error message (if any) */
-    err: PPChar;
+    err: PPAnsiChar;
 
     {** arg for pre-parsing (only if a simple string).
      *  For binary ops, this is the right argument. *}
-    arg: PChar;
+    arg: PAnsiChar;
   end; {ap_expr_lookup_parms}
 
 {** Function for looking up the provider function for a variable, operator
@@ -396,13 +396,13 @@ function ap_expr_lookup_default(parms: Pap_expr_lookup_parms): Integer; cdecl;
  *         A pointer to the resulting parse tree will be stored in
  *         info->root_node.
  *}
-//AP_DECLARE(const char *) ap_expr_parse(apr_pool_t *pool, apr_pool_t *ptemp,
-//                                       ap_expr_info_t *info, const char *expr,
+//AP_DECLARE(const AnsiChar *) ap_expr_parse(apr_pool_t *pool, apr_pool_t *ptemp,
+//                                       ap_expr_info_t *info, const AnsiChar *expr,
 //                                       ap_expr_lookup_fn_t *lookup_fn);
 function ap_expr_parse(pool, ptemp: Papr_pool_t;
                        info: Pap_expr_info_t;
-                       const expr: PChar;
-                       lookup_fn: ap_expr_lookup_fn_t): PChar;
+                       const expr: PAnsiChar;
+                       lookup_fn: ap_expr_lookup_fn_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_parse' + LibSuff20;
 
@@ -420,17 +420,17 @@ function ap_expr_parse(pool, ptemp: Papr_pool_t;
  * @note Usually ap_expr_parse_cmd() should be used
  *}
 //AP_DECLARE(ap_expr_info_t *) ap_expr_parse_cmd_mi(const cmd_parms *cmd,
-//                                                  const char *expr,
+//                                                  const AnsiChar *expr,
 //                                                  unsigned int flags,
-//                                                  const char **err,
+//                                                  const AnsiChar **err,
 //                                                  ap_expr_lookup_fn_t *lookup_fn,
 //                                                  int module_index);
 function ap_expr_parse_cmd_mi(cmd: Pcmd_parms;
-                              const expr: PChar;
+                              const expr: PAnsiChar;
                               flags: cuint;
-                              const err: PPChar;
+                              const err: PPAnsiChar;
                               lookup_fn: ap_expr_lookup_fn_t;
-                              module_index: Integer): PChar;
+                              module_index: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_expr_parse_cmd_mi' + LibSuff24;
 

+ 1 - 1
packages/httpd24/src/ap_mmn.inc

@@ -232,7 +232,7 @@
  * 20100609.1 (2.3.7-dev)  Introduce ap_log_cserror()
  * 20100609.2 (2.3.7-dev)  Add deferred write pool to core_output_filter_ctx
  * 20100625.0 (2.3.7-dev)  Add 'userctx' to socache iterator callback prototype
- * 20100630.0 (2.3.7-dev)  make module_levels vector of char instead of int
+ * 20100630.0 (2.3.7-dev)  make module_levels vector of AnsiChar instead of int
  * 20100701.0 (2.3.7-dev)  re-order struct members to improve alignment
  * 20100701.1 (2.3.7-dev)  add note_auth_failure hook
  * 20100701.2 (2.3.7-dev)  add ap_proxy_*_wid() functions

+ 17 - 17
packages/httpd24/src/ap_regex.inc

@@ -105,8 +105,8 @@ type
  *                                             other flags are ignored)
  * @return Zero on success or non-zero on error
  *}
-//AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const char *regex, int cflags);
-function ap_regcomp(preg: Pap_regex_t; const regex: PChar; cflags: Integer): Integer;
+//AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const AnsiChar *regex, int cflags);
+function ap_regcomp(preg: Pap_regex_t; const regex: PAnsiChar; cflags: Integer): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_regcomp' + LibSuff12;
 
@@ -120,9 +120,9 @@ function ap_regcomp(preg: Pap_regex_t; const regex: PChar; cflags: Integer): Int
  *                                             other flags are ignored)
  * @return 0 for successful match, \p AP_REG_NOMATCH otherwise
  *}
-//AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string,
+//AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const AnsiChar *string,
 //                           apr_size_t nmatch, ap_regmatch_t *pmatch, int eflags);
-function ap_regexec(const preg: Pap_regex_t; const string_: PChar;
+function ap_regexec(const preg: Pap_regex_t; const string_: PAnsiChar;
                     nmatch: apr_size_t; pmatch: Pap_regmatch_t; eflags: Integer): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_regexec' + LibSuff20;
@@ -139,10 +139,10 @@ function ap_regexec(const preg: Pap_regex_t; const string_: PChar;
  *                                             other flags are ignored)
  * @return 0 for successful match, AP_REG_NOMATCH otherwise
  *}
-//AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
+//AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const AnsiChar *buff,
 //                               apr_size_t len, apr_size_t nmatch,
 //                               ap_regmatch_t *pmatch, int eflags);
-function ap_regexec_len(const preg: Pap_regex_t; const buff: PChar;
+function ap_regexec_len(const preg: Pap_regex_t; const buff: PAnsiChar;
                         len, nmatch: apr_size_t;
                         pmatch: Pap_regmatch_t; eflags: Integer): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -156,9 +156,9 @@ function ap_regexec_len(const preg: Pap_regex_t; const buff: PChar;
  * @param errbuf_size The size of the buffer
  *}
 //AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
-//                                   char *errbuf, apr_size_t errbuf_size);
+//                                   AnsiChar *errbuf, apr_size_t errbuf_size);
 function ap_regerror(errcode: Integer; const preg: Pap_regex_t;
-                     errbuf: PChar; errbuf_size: apr_size_t): apr_size_t;
+                     errbuf: PAnsiChar; errbuf_size: apr_size_t): apr_size_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_regerror' + LibSuff16;
 
@@ -177,7 +177,7 @@ type
     rx: ap_regex_t;
     flags: apr_uint32_t;
     subs,
-    match: PChar;
+    match: PAnsiChar;
     nmatch: apr_size_t;
     pmatch: Pap_regmatch_t;
   end;{ap_rxplus_t}
@@ -197,8 +197,8 @@ type
  * @param pattern Pattern to compile
  * @return Compiled regexp, or NULL in case of compile/syntax error
  *}
-//AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool, const char *pattern);
-function ap_rxplus_compile(pool: Papr_pool_t; const pattern: PChar): Pap_rxplus_t;
+//AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool, const AnsiChar *pattern);
+function ap_rxplus_compile(pool: Papr_pool_t; const pattern: PAnsiChar): Pap_rxplus_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_rxplus_compile' + LibSuff8;
 
@@ -215,9 +215,9 @@ function ap_rxplus_compile(pool: Papr_pool_t; const pattern: PChar): Pap_rxplus_
  *         is applied with the 'g' flag.
  *}
 //AP_DECLARE(int) ap_rxplus_exec(apr_pool_t *pool, ap_rxplus_t *rx,
-//                               const char *pattern, char **newpattern);
+//                               const AnsiChar *pattern, AnsiChar **newpattern);
 function ap_rxplus_exec(pool: Papr_pool_t; rx: Pap_rxplus_t;
-                        const pattern: PChar; newpattern: PPChar): Integer;
+                        const pattern: PAnsiChar; newpattern: PPAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_rxplus_exec' + LibSuff16;
 
@@ -243,9 +243,9 @@ AP_DECLARE(int) ap_rxplus_nmatch(ap_rxplus_t *rx);
  * @param match Returns the match pattern
  *}
 //AP_DECLARE(void) ap_rxplus_match(ap_rxplus_t *rx, int n, int *len,
-//                                 const char **match);
+//                                 const AnsiChar **match);
 procedure ap_rxplus_match(rx: Pap_rxplus_t; len: Integer;
-                          const match: PPChar);
+                          const match: PPAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_rxplus_match' + LibSuff16;
 
@@ -258,9 +258,9 @@ procedure ap_rxplus_match(rx: Pap_rxplus_t; len: Integer;
  * @param n The match number to retrieve (must be between 0 and nmatch)
  * @return The matched string
  *}
-//AP_DECLARE(char*) ap_rxplus_pmatch(apr_pool_t *pool, ap_rxplus_t *rx, int n);
+//AP_DECLARE(AnsiChar*) ap_rxplus_pmatch(apr_pool_t *pool, ap_rxplus_t *rx, int n);
 //
-function ap_rxplus_pmatch(pool: Papr_pool_t; rx: Pap_rxplus_t; n: Integer): PChar;
+function ap_rxplus_pmatch(pool: Papr_pool_t; rx: Pap_rxplus_t; n: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_rxplus_pmatch' + LibSuff12;
 

+ 3 - 1
packages/httpd24/src/apr/apr24.pas

@@ -15,7 +15,9 @@
   }
 unit apr24;
 {$ifdef fpc}
-  {$mode delphi}{$H+}
+  {$mode delphi}
+  {$H-}
+  
 {$endif}
 {$ifdef Unix}
   {$PACKRECORDS C}

+ 2 - 2
packages/httpd24/src/apr/apr_allocator.inc

@@ -59,8 +59,8 @@ type
     ref: PPapr_memnode_t;            //**< reference to self */
     index: apr_uint32_t;             //**< size */
     free_index: apr_uint32_t;        //**< how much free */
-    first_avail: PChar;              //**< pointer to first free memory */
-    endp: PChar;                     //**< pointer to end of free memory */
+    first_avail: PAnsiChar;              //**< pointer to first free memory */
+    endp: PAnsiChar;                     //**< pointer to end of free memory */
   end;
 
 //** The base size of a memory node - aligned.  */

+ 2 - 2
packages/httpd24/src/apr/apr_errno.inc

@@ -48,9 +48,9 @@ type
  * @param buf A buffer to hold the error string.
  * @param bufsize Size of the buffer to hold the string.
  *}
-//APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
+//APR_DECLARE(AnsiChar *) apr_strerror(apr_status_t statcode, AnsiChar *buf,
 //                                 apr_size_t bufsize);
-function apr_strerror(statcode: apr_status_t; buf: PChar; bufsize: apr_size_t): PChar;
+function apr_strerror(statcode: apr_status_t; buf: PAnsiChar; bufsize: apr_size_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strerror' + LibSuff12;
 

+ 22 - 22
packages/httpd24/src/apr/apr_file_info.inc

@@ -214,9 +214,9 @@ type
     { The time the file was last changed }
     ctime: apr_time_t;
     { The pathname of the file (possibly unrooted) }
-    fname: PChar;
+    fname: PAnsiChar;
     { The file's name (no path) in filesystem case }
-    name: PChar;
+    name: PAnsiChar;
     { The file's handle, if accessed (can be submitted to apr_duphandle) }
     filehand: Papr_file_t;
   end;
@@ -236,9 +236,9 @@ type
  *       not be filled in, and you need to check the @c finfo->valid bitmask
  *       to verify that what you're looking for is there.
  *}
-//APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
+//APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const AnsiChar *fname,
 //                                   apr_int32_t wanted, apr_pool_t *pool);
-function apr_stat(finfo: Papr_finfo_t; const fname: PChar;
+function apr_stat(finfo: Papr_finfo_t; const fname: PAnsiChar;
                   wanted: apr_int32_t; pool: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_stat' + LibSuff16;
@@ -256,10 +256,10 @@ function apr_stat(finfo: Papr_finfo_t; const fname: PChar;
  * @param pool The pool to use.
  *)
 //APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new_dir,
-//                                       const char *dirname,
+//                                       const AnsiChar *dirname,
 //                                       apr_pool_t *pool);
 function apr_dir_open(new_dir: PPapr_dir_t;
-                      const dirname: PChar;
+                      const dirname: PAnsiChar;
                       pool: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_dir_open' + LibSuff12;
@@ -364,11 +364,11 @@ const
  * the drive letter), or APR_EBADPATH if the root is simply invalid.
  * APR_SUCCESS is returned if filepath is an absolute path.
  *}
-//APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
-//                                            const char **filepath,
+//APR_DECLARE(apr_status_t) apr_filepath_root(const AnsiChar **rootpath,
+//                                            const AnsiChar **filepath,
 //                                            apr_int32_t flags,
 //                                            apr_pool_t *p);
-function apr_filepath_root(const rootpath, filepath: PPChar;
+function apr_filepath_root(const rootpath, filepath: PPAnsiChar;
                            flags: apr_int32_t;
                            p: Papr_pool_t): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -387,13 +387,13 @@ function apr_filepath_root(const rootpath, filepath: PPChar;
  * result code will be APR_EPATHWILD, and all further segments will not
  * reflect the true filenames including the wildcard and following segments.
  *}
-//APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
-//                                             const char *rootpath,
-//                                             const char *addpath,
+//APR_DECLARE(apr_status_t) apr_filepath_merge(AnsiChar **newpath,
+//                                             const AnsiChar *rootpath,
+//                                             const AnsiChar *addpath,
 //                                             apr_int32_t flags,
 //                                             apr_pool_t *p);
-function apr_filepath_merge(newpath: PPChar;
-                            const rootpath, addpath: PPChar;
+function apr_filepath_merge(newpath: PPAnsiChar;
+                            const rootpath, addpath: PPAnsiChar;
                             flags: apr_int32_t;
                             p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -409,10 +409,10 @@ function apr_filepath_merge(newpath: PPChar;
  * e.g., ':' on Unix, ';' on Windows, etc.
  *}
 //APR_DECLARE(apr_status_t) apr_filepath_list_split(apr_array_header_t **pathelts,
-//                                                  const char *liststr,
+//                                                  const AnsiChar *liststr,
 //                                                  apr_pool_t *p);
 function apr_filepath_list_split(pathelts: PPapr_array_header_t;
-                                 const liststr: PChar;
+                                 const liststr: PAnsiChar;
                                  p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_filepath_list_split' + LibSuff12;
@@ -426,10 +426,10 @@ function apr_filepath_list_split(pathelts: PPapr_array_header_t;
  * @remark the path separator in @a liststr is system specific;
  * e.g., ':' on Unix, ';' on Windows, etc.
  *}
-//APR_DECLARE(apr_status_t) apr_filepath_list_merge(char **liststr,
+//APR_DECLARE(apr_status_t) apr_filepath_list_merge(AnsiChar **liststr,
 //                                                  apr_array_header_t *pathelts,
 //                                                  apr_pool_t *p);
-function apr_filepath_list_merge(liststr: PPChar;
+function apr_filepath_list_merge(liststr: PPAnsiChar;
                                  pathelts: Papr_array_header_t;
                                  p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -442,9 +442,9 @@ function apr_filepath_list_merge(liststr: PPChar;
  *              default file path in os-native format.
  * @param p the pool to allocate the default path string from
  *}
-//APR_DECLARE(apr_status_t) apr_filepath_get(char **path, apr_int32_t flags,
+//APR_DECLARE(apr_status_t) apr_filepath_get(AnsiChar **path, apr_int32_t flags,
 //                                           apr_pool_t *p);
-function apr_filepath_get(path: PPChar; flags: apr_int32_t;
+function apr_filepath_get(path: PPAnsiChar; flags: apr_int32_t;
                           p: Papr_pool_t): apr_status_t;
    {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    external LibAPR name LibNamePrefix + 'apr_filepath_get' + LibSuff12;
@@ -454,8 +454,8 @@ function apr_filepath_get(path: PPChar; flags: apr_int32_t;
  * @param path the default path returned
  * @param p the pool to allocate any working storage
  *}
-//APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p);
-function apr_filepath_set(const path: PChar; p: Papr_pool_t): apr_status_t;
+//APR_DECLARE(apr_status_t) apr_filepath_set(const AnsiChar *path, apr_pool_t *p);
+function apr_filepath_set(const path: PAnsiChar; p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_filepath_set' + LibSuff8;
 

+ 22 - 22
packages/httpd24/src/apr/apr_pools.inc

@@ -266,12 +266,12 @@ function apr_pool_create_unmanaged_ex(newpool: PPapr_pool_t;
 //                                                   apr_pool_t *parent,
 //                                                   apr_abortfunc_t abort_fn,
 //                                                   apr_allocator_t *allocator,
-//                                                   const char *file_line);
+//                                                   const AnsiChar *file_line);
 function apr_pool_create_ex_debug(newpool: PPapr_pool_t;
                                   parent: Papr_pool_t;
                                   abort_fn: apr_abortfunc_t;
                                   allocator: Papr_allocator_t;
-                                  const file_line: PChar): apr_status_t;
+                                  const file_line: PAnsiChar): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_create_ex_debug' + LibSuff20;
 
@@ -288,11 +288,11 @@ function apr_pool_create_ex_debug(newpool: PPapr_pool_t;
 //APR_DECLARE(apr_status_t) apr_pool_create_core_ex_debug(apr_pool_t **newpool,
 //                                                   apr_abortfunc_t abort_fn,
 //                                                   apr_allocator_t *allocator,
-//                                                   const char *file_line);
+//                                                   const AnsiChar *file_line);
 function apr_pool_create_core_ex_debug(newpool: PPapr_pool_t;
                                        abort_fn: apr_abortfunc_t;
                                        allocator: Papr_allocator_t;
-                                       const file_line: PChar): apr_status_t;
+                                       const file_line: PAnsiChar): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_create_core_ex_debug' + LibSuff16;
 
@@ -314,11 +314,11 @@ function apr_pool_create_core_ex_debug(newpool: PPapr_pool_t;
 //APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,
 //                                                   apr_abortfunc_t abort_fn,
 //                                                   apr_allocator_t *allocator,
-//                                                   const char *file_line);
+//                                                   const AnsiChar *file_line);
 function apr_pool_create_unmanaged_ex_debug(newpool: PPapr_pool_t;
                                             abort_fn: apr_abortfunc_t;
                                             allocator: Papr_allocator_t;
-                                            const file_line: PChar): apr_status_t;
+                                            const file_line: PAnsiChar): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_create_unmanaged_ex_debug' + LibSuff16;
 
@@ -418,8 +418,8 @@ procedure apr_pool_clear(p: Papr_pool_t);
  *         and don't call apr_pool_destroy_clear directly.
  *}
 //APR_DECLARE(void) apr_pool_clear_debug(apr_pool_t *p,
-//                                       const char *file_line);
-procedure apr_pool_clear_debug(p: Papr_pool_t; const file_line: PChar);
+//                                       const AnsiChar *file_line);
+procedure apr_pool_clear_debug(p: Papr_pool_t; const file_line: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_clear_debug' + LibSuff8;
 
@@ -453,8 +453,8 @@ procedure apr_pool_destroy(p: Papr_pool_t);
  *         and don't call apr_pool_destroy_debug directly.
  *}
 //APR_DECLARE(void) apr_pool_destroy_debug(apr_pool_t *p,
-//                                         const char *file_line);
-procedure apr_pool_destroy_debug(p: Papr_pool_t; const file_line: PChar);
+//                                         const AnsiChar *file_line);
+procedure apr_pool_destroy_debug(p: Papr_pool_t; const file_line: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_destroy_debug' + LibSuff8;
 
@@ -488,9 +488,9 @@ function apr_palloc(p: Papr_pool_t; size: apr_size_t): Pointer;
  * @return See: apr_palloc
  *}
 //APR_DECLARE(void *) apr_palloc_debug(apr_pool_t *p, apr_size_t size,
-//                                     const char *file_line);
+//                                     const AnsiChar *file_line);
 function apr_palloc_debug(p: Papr_pool_t; size: apr_size_t;
-                          const file_line: PChar): Pointer;
+                          const file_line: PAnsiChar): Pointer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_palloc_debug' + LibSuff12;
 
@@ -523,9 +523,9 @@ function apr_pcalloc(p: Papr_pool_t; size: apr_size_t): Pointer;
  * @return See: apr_pcalloc
  *}
 //APR_DECLARE(void *) apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,
-//                                      const char *file_line);
+//                                      const AnsiChar *file_line);
 function apr_pcalloc_debug(p: Papr_pool_t; size: apr_size_t;
-                           const file_line: PChar): Pointer;
+                           const file_line: PAnsiChar): Pointer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pcalloc_debug' + LibSuff12;
 
@@ -594,8 +594,8 @@ function apr_pool_is_ancestor(a, b: Papr_pool_t): Integer;
  * @param pool The pool to tag
  * @param tag  The tag
  *}
-//APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag);
-procedure apr_pool_tag(pool: Papr_pool_t; const tag: PChar);
+//APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const AnsiChar *tag);
+procedure apr_pool_tag(pool: Papr_pool_t; const tag: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_tag' + LibSuff8;
 
@@ -624,7 +624,7 @@ procedure apr_pool_tag(pool: Papr_pool_t; const tag: PChar);
  *}
 //APR_DECLARE(apr_status_t) apr_pool_userdata_set(
 //    const void *data,
-//    const char *key,
+//    const AnsiChar *key,
 //    apr_status_t (*cleanup)(void *),
 //    apr_pool_t *pool);
 type
@@ -632,7 +632,7 @@ type
 
 function apr_pool_userdata_set(
     const data:pointer;
-    const key:Pchar;
+    const key:PAnsiChar;
     cleanup: cleanup_func_t;
     pool:Papr_pool_t): apr_status_t
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -659,12 +659,12 @@ function apr_pool_userdata_set(
  *}
 //APR_DECLARE(apr_status_t) apr_pool_userdata_setn(
 //    const void *data,
-//    const char *key,
+//    const AnsiChar *key,
 //    apr_status_t (*cleanup)(void *),
 //    apr_pool_t *pool);
 function apr_pool_userdata_setn(
       const data:pointer;
-      const key:Pchar;
+      const key:PAnsiChar;
       cleanup: cleanup_func_t;
       pool:Papr_pool_t): apr_status_t
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -676,9 +676,9 @@ function apr_pool_userdata_setn(
  * @param key The key for the data to retrieve
  * @param pool The current pool.
  *}
-//APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key,
+//APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const AnsiChar *key,
 //                                                apr_pool_t *pool);
-function apr_pool_userdata_get(data: PPointer; const key: PChar;
+function apr_pool_userdata_get(data: PPointer; const key: PAnsiChar;
                                pool: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pool_userdata_get' + LibSuff12;

+ 52 - 52
packages/httpd24/src/apr/apr_strings.inc

@@ -69,8 +69,8 @@
  *          this returns <0, if they are equivalent it returns 0, and if the
  *          first string is greater than second string it retuns >0.
  *}
-//APR_DECLARE(int) apr_strnatcmp(char const *a, char const *b);
-function apr_strnatcmp(a, b: PChar): Integer;
+//APR_DECLARE(int) apr_strnatcmp(AnsiChar const *a, AnsiChar const *b);
+function apr_strnatcmp(a, b: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strnatcmp' + LibSuff8;
 
@@ -83,8 +83,8 @@ function apr_strnatcmp(a, b: PChar): Integer;
  *         this returns <0, if they are equivalent it returns 0, and if the
  *         first string is greater than second string it retuns >0.
  *}
-//APR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b);
-function apr_strnatcasecmp(a, b: PChar): Integer;
+//APR_DECLARE(int) apr_strnatcasecmp(AnsiChar const *a, AnsiChar const *b);
+function apr_strnatcasecmp(a, b: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strnatcasecmp' + LibSuff8;
 
@@ -94,8 +94,8 @@ function apr_strnatcasecmp(a, b: PChar): Integer;
  * @param s The string to duplicate
  * @return The new string
  *}
-//APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s);
-function apr_pstrdup(p: Papr_pool_t; s: PChar): PChar;
+//APR_DECLARE(AnsiChar *) apr_pstrdup(apr_pool_t *p, const AnsiChar *s);
+function apr_pstrdup(p: Papr_pool_t; s: PAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pstrdup' + LibSuff8;
 
@@ -111,8 +111,8 @@ function apr_pstrdup(p: Papr_pool_t; s: PChar): PChar;
  *         has 'n' or more characters.  If the string might contain
  *         fewer characters, use apr_pstrndup.
  *}
-//APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n);
-function apr_pstrmemdup(p: Papr_pool_t; s: PChar; n: apr_size_t): PChar;
+//APR_DECLARE(AnsiChar *) apr_pstrmemdup(apr_pool_t *p, const AnsiChar *s, apr_size_t n);
+function apr_pstrmemdup(p: Papr_pool_t; s: PAnsiChar; n: apr_size_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pstrmemdup' + LibSuff12;
 
@@ -126,8 +126,8 @@ function apr_pstrmemdup(p: Papr_pool_t; s: PChar; n: apr_size_t): PChar;
  * @remark The amount of memory allocated from the pool is the length
  *         of the returned string including the NUL terminator
  *}
-//APR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);
-function apr_pstrndup(p: Papr_pool_t; s: PChar; n: apr_size_t): PChar;
+//APR_DECLARE(AnsiChar *) apr_pstrndup(apr_pool_t *p, const AnsiChar *s, apr_size_t n);
+function apr_pstrndup(p: Papr_pool_t; s: PAnsiChar; n: apr_size_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pstrndup' + LibSuff12;
 
@@ -150,12 +150,12 @@ function apr_pmemdup(p: Papr_pool_t; m: Pointer; n: apr_size_t): Pointer;
  * @param ... The strings to concatenate.  The final string must be NULL
  * @return The new string
  *}
-//APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...)
+//APR_DECLARE_NONSTD(AnsiChar *) apr_pstrcat(apr_pool_t *p, ...)
 //#if defined(__GNUC__) && __GNUC__ >= 4
 //    __attribute__((sentinel))
 //#endif
 //    ;
-function apr_pstrcat(p: Papr_pool_t; params: array of const): PChar; cdecl;
+function apr_pstrcat(p: Papr_pool_t; params: array of const): PAnsiChar; cdecl;
   external LibAPR name 'apr_pstrcat';
 
 {**
@@ -166,10 +166,10 @@ function apr_pstrcat(p: Papr_pool_t; params: array of const): PChar; cdecl;
  * @param nbytes (output) strlen of new string (pass in NULL to omit)
  * @return The new string
  *}
-//APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
+//APR_DECLARE(AnsiChar *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
 //                                 apr_size_t nvec, apr_size_t *nbytes);
 //function apr_pstrcatv(p: Papr_pool_t; const vec: Piovec;
-//                      nvec: apr_size_t; nbytes: Papr_size_t): PChar;
+//                      nvec: apr_size_t; nbytes: Papr_size_t): PAnsiChar;
 //  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 //  external LibAPR name LibNamePrefix + 'apr_pstrcatv' + LibSuff16;
 
@@ -181,8 +181,8 @@ function apr_pstrcat(p: Papr_pool_t; params: array of const): PChar; cdecl;
  * @param ap The arguments to use while printing the data
  * @return The new string
  *}
-//APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);
-function apr_pvsprintf(p: Papr_pool_t; const fmt: PChar; ap: va_list): PChar;
+//APR_DECLARE(AnsiChar *) apr_pvsprintf(apr_pool_t *p, const AnsiChar *fmt, va_list ap);
+function apr_pvsprintf(p: Papr_pool_t; const fmt: PAnsiChar; ap: va_list): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_pvsprintf' + LibSuff12;
 
@@ -194,9 +194,9 @@ function apr_pvsprintf(p: Papr_pool_t; const fmt: PChar; ap: va_list): PChar;
  * @param ... The arguments to use while printing the data
  * @return The new string
  *}
-//APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)
+//APR_DECLARE_NONSTD(AnsiChar *) apr_psprintf(apr_pool_t *p, const AnsiChar *fmt, ...)
 //        __attribute__((format(printf,2,3)));
-function apr_psprintf(p: Papr_pool_t; const fmt: PChar; fmt_args: array of const): PChar; cdecl;
+function apr_psprintf(p: Papr_pool_t; const fmt: PAnsiChar; fmt_args: array of const): PAnsiChar; cdecl;
    external LibAPR name 'apr_psprintf';
 
 {**
@@ -221,10 +221,10 @@ function apr_psprintf(p: Papr_pool_t; const fmt: PChar; fmt_args: array of const
  *     to allow a check for truncation.
  * </PRE>
  *}
-//APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src,
+//APR_DECLARE(AnsiChar *) apr_cpystrn(AnsiChar *dst, const AnsiChar *src,
 //                                apr_size_t dst_size);
-function apr_cpystrn(dst: PChar; const src: PChar;
-                     dst_size: apr_size_t): PChar;
+function apr_cpystrn(dst: PAnsiChar; const src: PAnsiChar;
+                     dst_size: apr_size_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_cpystrn' + LibSuff12;
 
@@ -235,8 +235,8 @@ function apr_cpystrn(dst: PChar; const src: PChar;
  * @param src The string to rid the spaces from.
  * @return A pointer to the destination string's null terminator.
  *}
-//APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src);
-function apr_collapse_spaces(dest: PChar; const src: PChar): PChar;
+//APR_DECLARE(AnsiChar *) apr_collapse_spaces(AnsiChar *dest, const AnsiChar *src);
+function apr_collapse_spaces(dest: PAnsiChar; const src: PAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_collapse_spaces' + LibSuff8;
 
@@ -247,11 +247,11 @@ function apr_collapse_spaces(dest: PChar; const src: PChar): PChar;
  * @param argv_out Output location.  This is a pointer to an array of strings.
  * @param token_context Pool to use.
  *}
-//APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
-//                                               char ***argv_out,
+//APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const AnsiChar *arg_str,
+//                                               AnsiChar ***argv_out,
 //                                               apr_pool_t *token_context);
-function apr_tokenize_to_argv(const arg_str: PChar;
-                              var argv_out: PPChar;
+function apr_tokenize_to_argv(const arg_str: PAnsiChar;
+                              var argv_out: PPAnsiChar;
                               token_context: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_tokenize_to_argv' + LibSuff12;
@@ -267,8 +267,8 @@ function apr_tokenize_to_argv(const arg_str: PChar;
  * @param last Internal state saved by apr_strtok() between calls.
  * @return The next token from the string
  *}
-//APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last);
-function apr_strtok(str: PChar; const sep: PChar; last: PPChar): PChar;
+//APR_DECLARE(AnsiChar *) apr_strtok(AnsiChar *str, const AnsiChar *sep, AnsiChar **last);
+function apr_strtok(str: PAnsiChar; const sep: PAnsiChar; last: PPAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strtok' + LibSuff12;
 
@@ -302,11 +302,11 @@ function apr_strtok(str: PChar; const sep: PChar; last: PPChar): PChar;
  * @param format The format string
  * @param ... The arguments to use to fill out the format string.
  *}
-//APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,
-//                                     const char *format, ...)
+//APR_DECLARE_NONSTD(int) apr_snprintf(AnsiChar *buf, apr_size_t len,
+//                                     const AnsiChar *format, ...)
 //        __attribute__((format(printf,3,4)));
-function apr_snprintf(buf: PChar; len: apr_size_t;
-                      const format: PChar; format_args: array of const): PChar; cdecl;
+function apr_snprintf(buf: PAnsiChar; len: apr_size_t;
+                      const format: PAnsiChar; format_args: array of const): PAnsiChar; cdecl;
   external LibAPR name 'apr_snprintf';
 
 {**
@@ -317,9 +317,9 @@ function apr_snprintf(buf: PChar; len: apr_size_t;
  * @param format The format string
  * @param ap The arguments to use to fill out the format string.
  *}
-//APR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format,
+//APR_DECLARE(int) apr_vsnprintf(AnsiChar *buf, apr_size_t len, const AnsiChar *format,
 //                               va_list ap);
-function apr_vsnprintf(buf: PChar; len: apr_size_t; const format: PChar;
+function apr_vsnprintf(buf: PAnsiChar; len: apr_size_t; const format: PAnsiChar;
                        ap: va_list): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_vsnprintf' + LibSuff16;
@@ -332,8 +332,8 @@ function apr_vsnprintf(buf: PChar; len: apr_size_t; const format: PChar;
  * @param n The number to format
  * @return The string representation of the number
  *}
-//APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n);
-function apr_itoa(p: Papr_pool_t; n: Integer): PChar;
+//APR_DECLARE(AnsiChar *) apr_itoa(apr_pool_t *p, int n);
+function apr_itoa(p: Papr_pool_t; n: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_itoa' + LibSuff8;
 
@@ -343,8 +343,8 @@ function apr_itoa(p: Papr_pool_t; n: Integer): PChar;
  * @param n The number to format
  * @return The string representation of the number
  *}
-//APR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n);
-function apr_ltoa(p: Papr_pool_t; n: Integer): PChar;
+//APR_DECLARE(AnsiChar *) apr_ltoa(apr_pool_t *p, long n);
+function apr_ltoa(p: Papr_pool_t; n: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_ltoa' + LibSuff8;
 
@@ -354,8 +354,8 @@ function apr_ltoa(p: Papr_pool_t; n: Integer): PChar;
  * @param n The number to format
  * @return The string representation of the number
  *}
-//APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
-function apr_off_t_toa(p: Papr_pool_t; n: apr_off_t): PChar;
+//APR_DECLARE(AnsiChar *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
+function apr_off_t_toa(p: Papr_pool_t; n: apr_off_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_off_t_toa' + LibSuff12;
 
@@ -375,10 +375,10 @@ function apr_off_t_toa(p: Papr_pool_t; n: apr_off_t): PChar;
  * @bug *end breaks type safety; where *buf is const, *end needs to be
  * declared as const in APR 2.0
  *}
-//APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *buf,
-//                                      char **end, int base);
-function apr_strtoff(offset: Papr_off_t; const buf: PChar;
-                     end_: PPChar; base: Integer): apr_status_t;
+//APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const AnsiChar *buf,
+//                                      AnsiChar **end, int base);
+function apr_strtoff(offset: Papr_off_t; const buf: PAnsiChar;
+                     end_: PPAnsiChar; base: Integer): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strtoff' + LibSuff16;
 
@@ -397,20 +397,20 @@ function apr_strtoff(offset: Papr_off_t; const buf: PChar;
  * @return The numeric value of the string.  On overflow, errno is set
  * to ERANGE.  On success, errno is set to 0.
  *}
-//APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);
-function apr_strtoi64(const buf: PChar; end_: PPChar; base: Integer): apr_int64_t;
+//APR_DECLARE(apr_int64_t) apr_strtoi64(const AnsiChar *buf, AnsiChar **end, int base);
+function apr_strtoi64(const buf: PAnsiChar; end_: PPAnsiChar; base: Integer): apr_int64_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strtoi64' + LibSuff12;
 
 {**
  * parse a base-10 numeric string into a 64-bit numeric value.
- * Equivalent to apr_strtoi64(buf, (char**)NULL, 10).
+ * Equivalent to apr_strtoi64(buf, (AnsiChar**)NULL, 10).
  * @param buf The string to parse
  * @return The numeric value of the string.  On overflow, errno is set
  * to ERANGE.  On success, errno is set to 0.
  *}
-//APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);
-function apr_atoi64(const buf: PChar): apr_int64_t;
+//APR_DECLARE(apr_int64_t) apr_atoi64(const AnsiChar *buf);
+function apr_atoi64(const buf: PAnsiChar): apr_int64_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_atoi64' + LibSuff4;
 
@@ -422,8 +422,8 @@ function apr_atoi64(const buf: PChar): apr_int64_t;
  * @return The buf passed to apr_strfsize()
  * @remark All negative sizes report '  - ', apr_strfsize only formats positive values.
  *}
-//APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf);
-function apr_strfsize(size: apr_off_t; buf: PChar): PChar;
+//APR_DECLARE(AnsiChar *) apr_strfsize(apr_off_t size, AnsiChar *buf);
+function apr_strfsize(size: apr_off_t; buf: PAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strfsize' + LibSuff12;
 

+ 35 - 35
packages/httpd24/src/apr/apr_tables.inc

@@ -71,7 +71,7 @@ type
     //** The number of elements allocated in the array */
     nalloc: Integer;
     //** The elements in the array */
-    elts: PChar;
+    elts: PAnsiChar;
   end;
 
 {**
@@ -83,11 +83,11 @@ type
 //** The type for each entry in a string-content table */
   apr_table_entry_t = record
     //** The key for the current table entry */
-    key: PChar;          {* maybe NULL in future;
+    key: PAnsiChar;          {* maybe NULL in future;
                          * check when iterating thru table_elts
                          *}
     //** The value for the current table entry */
-    val: PChar;
+    val: PAnsiChar;
 
     //** A checksum for the key, for use by the apr_table internals */
     key_checksum: apr_uint32_t;
@@ -260,12 +260,12 @@ function apr_array_append(p: Papr_pool_t;
  * @param sep The separator to use
  * @return A string containing all of the data in the array.
  *}
-//APR_DECLARE(char *) apr_array_pstrcat(apr_pool_t *p,
+//APR_DECLARE(AnsiChar *) apr_array_pstrcat(apr_pool_t *p,
 //				      const apr_array_header_t *arr,
-//				      const char sep);
+//				      const AnsiChar sep);
 function apr_array_pstrcat(p: Papr_pool_t;
                            const arr: Papr_array_header_t;
-                           sep: Char): PChar;
+                           sep: AnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_array_pstrcat' + LibSuff12;
 
@@ -324,8 +324,8 @@ procedure apr_table_clear(t: Papr_table_t);
  * @param key The key to search for (case does not matter)
  * @return The value associated with the key, or NULL if the key does not exist. 
  *}
-//APR_DECLARE(const char *) apr_table_get(const apr_table_t *t, const char *key);
-function apr_table_get(t: Papr_table_t; key: PChar): PChar;
+//APR_DECLARE(const AnsiChar *) apr_table_get(const apr_table_t *t, const AnsiChar *key);
+function apr_table_get(t: Papr_table_t; key: PAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_get' + LibSuff8;
 
@@ -338,9 +338,9 @@ function apr_table_get(t: Papr_table_t; key: PChar): PChar;
  * @remark When adding data, this function makes a copy of both the key and the
  *         value.
  *}
-//APR_DECLARE(void) apr_table_set(apr_table_t *t, const char *key,
-//                                const char *val);
-procedure apr_table_set(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_set(apr_table_t *t, const AnsiChar *key,
+//                                const AnsiChar *val);
+procedure apr_table_set(t: Papr_table_t; const key, val: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_set' + LibSuff12;
 
@@ -354,9 +354,9 @@ procedure apr_table_set(t: Papr_table_t; const key, val: PChar);
  *          the value, so care should be taken to ensure that the values will 
  *          not change after they have been added..
  *}
-//APR_DECLARE(void) apr_table_setn(apr_table_t *t, const char *key,
-//                                 const char *val);
-procedure apr_table_setn(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_setn(apr_table_t *t, const AnsiChar *key,
+//                                 const AnsiChar *val);
+procedure apr_table_setn(t: Papr_table_t; const key, val: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_setn' + LibSuff12;
 
@@ -365,8 +365,8 @@ procedure apr_table_setn(t: Papr_table_t; const key, val: PChar);
  * @param t The table to remove data from
  * @param key The key of the data being removed (case does not matter)
  *}
-//APR_DECLARE(void) apr_table_unset(apr_table_t *t, const char *key);
-procedure apr_table_unset(t: Papr_table_t; const key: PChar);
+//APR_DECLARE(void) apr_table_unset(apr_table_t *t, const AnsiChar *key);
+procedure apr_table_unset(t: Papr_table_t; const key: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_unset' + LibSuff8;
 
@@ -379,9 +379,9 @@ procedure apr_table_unset(t: Papr_table_t; const key: PChar);
  * @param val The data to add
  * @remark If the key is not found, then this function acts like apr_table_add
  *}
-//APR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,
-//                                  const char *val);
-procedure apr_table_merge(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_merge(apr_table_t *t, const AnsiChar *key,
+//                                  const AnsiChar *val);
+procedure apr_table_merge(t: Papr_table_t; const key, val: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_merge' + LibSuff12;
 
@@ -394,9 +394,9 @@ procedure apr_table_merge(t: Papr_table_t; const key, val: PChar);
  * @param val The data to add
  * @remark If the key is not found, then this function acts like apr_table_addn
  *}
-//APR_DECLARE(void) apr_table_mergen(apr_table_t *t, const char *key,
-//                                   const char *val);
-procedure apr_table_mergen(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_mergen(apr_table_t *t, const AnsiChar *key,
+//                                   const AnsiChar *val);
+procedure apr_table_mergen(t: Papr_table_t; const key, val: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_mergen' + LibSuff12;
 
@@ -409,9 +409,9 @@ procedure apr_table_mergen(t: Papr_table_t; const key, val: PChar);
  * @remark When adding data, this function makes a copy of both the key and the
  *         value.
  *}
-//APR_DECLARE(void) apr_table_add(apr_table_t *t, const char *key,
-//                                const char *val);
-procedure apr_table_add(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_add(apr_table_t *t, const AnsiChar *key,
+//                                const AnsiChar *val);
+procedure apr_table_add(t: Papr_table_t; const key, val: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_table_add' + LibSuff12;
 
@@ -425,9 +425,9 @@ procedure apr_table_add(t: Papr_table_t; const key, val: PChar);
  *         value, so care should be taken to ensure that the values will not 
  *         change after they have been added.
  *}
-//APR_DECLARE(void) apr_table_addn(apr_table_t *t, const char *key,
-//                                 const char *val);
-procedure apr_table_addn(t: Papr_table_t; const key, val: PChar);
+//APR_DECLARE(void) apr_table_addn(apr_table_t *t, const AnsiChar *key,
+//                                 const AnsiChar *val);
+procedure apr_table_addn(t: Papr_table_t; const key, val: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibAPR name LibNamePrefix + 'apr_table_addn' + LibSuff12;
 
@@ -456,16 +456,16 @@ function apr_table_overlay(t: Papr_table_t;
  * To export the callback function for apr_table_[v]do() it must be declared 
  * in the _NONSTD convention.
  *}
-//typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
-//                                                    const char *value);
+//typedef int (apr_table_do_callback_fn_t)(void *rec, const AnsiChar *key,
+//                                                    const AnsiChar *value);
 type
-  apr_table_do_callback_fn_t = function (rec: Pointer; const key, value: PChar): Integer; cdecl;
+  apr_table_do_callback_fn_t = function (rec: Pointer; const key, value: PAnsiChar): Integer; cdecl;
   Papr_table_do_callback_fn_t = ^apr_table_do_callback_fn_t;
 
 {**
  * Iterate over a table running the provided function once for every
  * element in the table.  The varargs array must be a list of zero or
- * more (char *) keys followed by a NULL pointer.  If zero keys are
+ * more (AnsiChar *) keys followed by a NULL pointer.  If zero keys are
  * given, the @param comp function will be invoked for every element
  * in the table.  Otherwise, the function is invoked only for those
  * elements matching the keys specified.
@@ -476,7 +476,7 @@ type
  * @param comp The function to run
  * @param rec The data to pass as the first argument to the function
  * @param t The table to iterate over
- * @param ... A varargs array of zero or more (char *) keys followed by NULL
+ * @param ... A varargs array of zero or more (AnsiChar *) keys followed by NULL
  * @return FALSE if one of the comp() iterations returned zero; TRUE if all
  *            iterations returned non-zero
  * @see apr_table_do_callback_fn_t
@@ -497,7 +497,7 @@ function apr_table_do(comp: apr_table_do_callback_fn_t; rec: Pointer;
 {**
  * Iterate over a table running the provided function once for every
  * element in the table.  The @param vp varargs parameter must be a
- * list of zero or more (char *) keys followed by a NULL pointer.  If
+ * list of zero or more (AnsiChar *) keys followed by a NULL pointer.  If
  * zero keys are given, the @param comp function will be invoked for
  * every element in the table.  Otherwise, the function is invoked
  * only for those elements matching the keys specified.
@@ -508,7 +508,7 @@ function apr_table_do(comp: apr_table_do_callback_fn_t; rec: Pointer;
  * @param comp The function to run
  * @param rec The data to pass as the first argument to the function
  * @param t The table to iterate over
- * @param vp List of zero or more (char *) keys followed by NULL
+ * @param vp List of zero or more (AnsiChar *) keys followed by NULL
  * @return FALSE if one of the comp() iterations returned zero; TRUE if all
  *            iterations returned non-zero
  * @see apr_table_do_callback_fn_t

+ 10 - 10
packages/httpd24/src/apr/apr_time.inc

@@ -33,9 +33,9 @@
  *)
 
 //** month names */
-//APR_DECLARE_DATA extern const char apr_month_snames[12][4];
+//APR_DECLARE_DATA extern const AnsiChar apr_month_snames[12][4];
 //** day names */
-//APR_DECLARE_DATA extern const char apr_day_snames[7][4];
+//APR_DECLARE_DATA extern const AnsiChar apr_day_snames[7][4];
 
 type
 //** number of microseconds since 00:00:00 january 1, 1970 UTC */
@@ -226,8 +226,8 @@ const APR_RFC822_DATE_LEN = (30);
  * @param date_str String to write to.
  * @param t the time to convert 
  *}
-//APR_DECLARE(apr_status_t) apr_rfc822_date(char *date_str, apr_time_t t);
-function apr_rfc822_date(date_str: PChar; t: apr_time_t): apr_status_t;
+//APR_DECLARE(apr_status_t) apr_rfc822_date(AnsiChar *date_str, apr_time_t t);
+function apr_rfc822_date(date_str: PAnsiChar; t: apr_time_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_rfc822_date' + LibSuff12;//apr_time_t is 64bit so it is 12
 
@@ -244,8 +244,8 @@ const APR_CTIME_LEN = (25);
  * @param date_str String to write to.
  * @param t the time to convert 
  *}
-//APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t);
-function apr_ctime(date_str: PChar; t: apr_time_t): apr_status_t;
+//APR_DECLARE(apr_status_t) apr_ctime(AnsiChar *date_str, apr_time_t t);
+function apr_ctime(date_str: PAnsiChar; t: apr_time_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_ctime' + LibSuff12;//apr_time_t is 64bit so it is 12
 
@@ -257,12 +257,12 @@ function apr_ctime(date_str: PChar; t: apr_time_t): apr_status_t;
  * @param format The format for the time string
  * @param tm The time to convert
  *}
-//APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize,
-//                                       apr_size_t max, const char *format,
+//APR_DECLARE(apr_status_t) apr_strftime(AnsiChar *s, apr_size_t *retsize,
+//                                       apr_size_t max, const AnsiChar *format,
 //                                       apr_time_exp_t *tm);
-function apr_strftime(s: PChar;
+function apr_strftime(s: PAnsiChar;
                       retsize, max: apr_size_t;
-                      const format_: PChar;
+                      const format_: PAnsiChar;
                       tm: Papr_time_exp_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_strftime' + LibSuff20;

+ 12 - 12
packages/httpd24/src/apr/apr_user.inc

@@ -78,9 +78,9 @@ function apr_uid_current(userid: Papr_uid_t;
  * @param p The pool from which to allocate the string
  * @remark This function is available only if APR_HAS_USER is defined.
  *}
-//APR_DECLARE(apr_status_t) apr_uid_name_get(char **username, apr_uid_t userid,
+//APR_DECLARE(apr_status_t) apr_uid_name_get(AnsiChar **username, apr_uid_t userid,
 //                                           apr_pool_t *p);
-function apr_uid_name_get(username: PPChar; userid: apr_uid_t;
+function apr_uid_name_get(username: PPAnsiChar; userid: apr_uid_t;
                           p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_uid_name_get' + LibSuff12;
@@ -95,9 +95,9 @@ function apr_uid_name_get(username: PPChar; userid: apr_uid_t;
  * @remark This function is available only if APR_HAS_USER is defined.
  *}
 //APR_DECLARE(apr_status_t) apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,
-//                                      const char *username, apr_pool_t *p);
+//                                      const AnsiChar *username, apr_pool_t *p);
 function apr_uid_get(userid: Papr_uid_t; groupid: Papr_gid_t;
-                     const username: PChar; p: Papr_pool_t): apr_status_t;
+                     const username: PAnsiChar; p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_uid_get' + LibSuff16;
 
@@ -108,11 +108,11 @@ function apr_uid_get(userid: Papr_uid_t; groupid: Papr_gid_t;
  * @param p The pool from which to allocate the string
  * @remark This function is available only if APR_HAS_USER is defined.
  *}
-//APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
-//                                               const char *username,
+//APR_DECLARE(apr_status_t) apr_uid_homepath_get(AnsiChar **dirname,
+//                                               const AnsiChar *username,
 //                                               apr_pool_t *p);
-function apr_uid_homepath_get(dirname: PPChar;
-                              const username: PChar;
+function apr_uid_homepath_get(dirname: PPAnsiChar;
+                              const username: PAnsiChar;
                               p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_uid_homepath_get' + LibSuff12;
@@ -138,9 +138,9 @@ function apr_uid_homepath_get(dirname: PPChar;
  * @param p The pool from which to allocate the string
  * @remark This function is available only if APR_HAS_USER is defined.
  *}
-//APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname,
+//APR_DECLARE(apr_status_t) apr_gid_name_get(AnsiChar **groupname,
 //                                             apr_gid_t groupid, apr_pool_t *p);
-function apr_gid_name_get(groupname: PPChar;
+function apr_gid_name_get(groupname: PPAnsiChar;
                           groupid: apr_gid_t; p: Papr_pool_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_gid_name_get' + LibSuff12;
@@ -154,9 +154,9 @@ function apr_gid_name_get(groupname: PPChar;
  * @remark This function is available only if APR_HAS_USER is defined.
  *}
 //APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid,
-//                                      const char *groupname, apr_pool_t *p);
+//                                      const AnsiChar *groupname, apr_pool_t *p);
 function apr_gid_get(groupid: Papr_gid_t;
-                     const groupname: PChar; p: Papr_pool_t): apr_status_t;
+                     const groupname: PAnsiChar; p: Papr_pool_t): apr_status_t;
    {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    external LibAPR name LibNamePrefix + 'apr_gid_get' + LibSuff12;
 

+ 2 - 2
packages/httpd24/src/apr/apr_version.inc

@@ -151,8 +151,8 @@ procedure apr_version(pvsn: Papr_version_t);
   external LibAPR name LibNamePrefix + 'apr_version' + LibSuff4;
 
 //** Return APR's version information as a string. */
-//APR_DECLARE(const char *) apr_version_string(void);
-function apr_version_string: PChar;
+//APR_DECLARE(const AnsiChar *) apr_version_string(void);
+function apr_version_string: PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPR name LibNamePrefix + 'apr_version_string' + LibSuff0;
 

+ 30 - 30
packages/httpd24/src/aprutil/apr_buckets.inc

@@ -139,9 +139,9 @@ Papr_bucket_type_t = ^apr_bucket_type_t;
 //    void ( *destroy)(void *data);
   destroy_t = procedure(data: Pointer); cdecl;
 
-//    apr_status_t ( *read)(apr_bucket *b, const char **str, apr_size_t *len,
+//    apr_status_t ( *read)(apr_bucket *b, const AnsiChar **str, apr_size_t *len,
 //                         apr_read_type_e block);
-  read_t = function(b: Papr_bucket; const str: PPChar; len: Papr_size_t;
+  read_t = function(b: Papr_bucket; const str: PPAnsiChar; len: Papr_size_t;
                     block: apr_read_type_e): apr_status_t; cdecl;
 
 //    apr_status_t ( *setaside)(apr_bucket *e, apr_pool_t *pool);
@@ -161,7 +161,7 @@ Papr_bucket_type_t = ^apr_bucket_type_t;
     {**
      * The name of the bucket type
      *}
-    name: PChar;
+    name: PAnsiChar;
     {**
      * The number of functions this bucket understands.  Can not be less than
      * five.
@@ -204,7 +204,7 @@ Papr_bucket_type_t = ^apr_bucket_type_t;
      * @param block Should this read function block if there is more data that
      *              cannot be read immediately.
      *}
-//    apr_status_t ( *read)(apr_bucket *b, const char **str, apr_size_t *len,
+//    apr_status_t ( *read)(apr_bucket *b, const AnsiChar **str, apr_size_t *len,
 //                         apr_read_type_e block);
     read: read_t;
 
@@ -608,7 +608,7 @@ free_func_t = procedure (data: Pointer); cdecl;
     {** The start of the data actually allocated.  This should never be
      * modified, it is only used to free the bucket.
      *}
-    base: PChar;
+    base: PAnsiChar;
     //** how much memory was allocated */
     alloc_len: apr_size_t;
     //** function to use to delete the data */
@@ -641,7 +641,7 @@ Papr_bucket_pool = ^apr_bucket_pool;
      * the start and length of the apr_bucket accordingly.
      * This will be NULL after the pool gets cleaned up.
      *}
-    base: PChar;
+    base: PAnsiChar;
     {** The pool the data was allocated from.  When the pool
      * is cleaned up, this gets set to NULL as an indicator
      * to pool_read() that the data is now on the heap and
@@ -817,30 +817,30 @@ function apr_brigade_length(bb: Papr_bucket_brigade; read_all: Integer;
 
 (*
 /**
- * Take a bucket brigade and store the data in a flat char*
- * @param bb The bucket brigade to create the char* from
- * @param c The char* to write into
- * @param len The maximum length of the char array. On return, it is the
- *            actual length of the char array.
+ * Take a bucket brigade and store the data in a flat AnsiChar*
+ * @param bb The bucket brigade to create the AnsiChar* from
+ * @param c The AnsiChar* to write into
+ * @param len The maximum length of the AnsiChar array. On return, it is the
+ *            actual length of the AnsiChar array.
  */
 APU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,
-                                              char *c,
+                                              AnsiChar *c,
                                               apr_size_t *len);*)
 
-function apr_brigade_flatten(bb: Papr_bucket_brigade; c: Pchar;
+function apr_brigade_flatten(bb: Papr_bucket_brigade; c: PAnsiChar;
   len: Papr_size_t): apr_status_t;{$IFDEF WINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   external LibAPRUtil name LibNamePrefix + 'apr_brigade_flatten' + LibSuff12;
 
 (*
 /**
  * Creates a pool-allocated string representing a flat bucket brigade
- * @param bb The bucket brigade to create the char array from
- * @param c On return, the allocated char array
- * @param len On return, the length of the char array.
+ * @param bb The bucket brigade to create the AnsiChar array from
+ * @param c On return, the allocated AnsiChar array
+ * @param len On return, the length of the AnsiChar array.
  * @param pool The pool to allocate the string from.
  */
 APU_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb, 
-                                               char **c,
+                                               AnsiChar **c,
                                                apr_size_t *len,
                                                apr_pool_t *pool);
 
@@ -907,7 +907,7 @@ APU_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b,
  */
 APU_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,
                                             apr_brigade_flush flush, void *ctx,
-                                            const char *str, apr_size_t nbyte);
+                                            const AnsiChar *str, apr_size_t nbyte);
 
 /**
  * This function writes multiple strings into a bucket brigade.
@@ -934,7 +934,7 @@ APU_DECLARE(apr_status_t) apr_brigade_writev(apr_bucket_brigade *b,
  */
 APU_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb,
                                            apr_brigade_flush flush, void *ctx,
-                                           const char *str);
+                                           const AnsiChar *str);
 
 /**
  * This function writes a character into a bucket brigade.
@@ -946,7 +946,7 @@ APU_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb,
  */
 APU_DECLARE(apr_status_t) apr_brigade_putc(apr_bucket_brigade *b,
                                            apr_brigade_flush flush, void *ctx,
-                                           const char c);
+                                           const AnsiChar c);
 
 /**
  * This function writes an unspecified number of strings into a bucket brigade.
@@ -973,7 +973,7 @@ APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
 APU_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b, 
                                                     apr_brigade_flush flush,
                                                     void *ctx,
-                                                    const char *fmt, ...)
+                                                    const AnsiChar *fmt, ...)
         __attribute__((format(printf,4,5)));
 
 /**
@@ -989,7 +989,7 @@ APU_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b,
 APU_DECLARE(apr_status_t) apr_brigade_vprintf(apr_bucket_brigade *b, 
                                               apr_brigade_flush flush,
                                               void *ctx,
-                                              const char *fmt, va_list va);
+                                              const AnsiChar *fmt, va_list va);
 
 /**
  * Utility function to insert a file (or a segment of a file) onto the
@@ -1442,7 +1442,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_flush_make(apr_bucket *b);
  * @param list The freelist from which this bucket should be allocated
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_immortal_create(const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_immortal_create(const AnsiChar *buf,
                                                      apr_size_t nbyte,
                                                      apr_bucket_alloc_t *list);
 
@@ -1454,7 +1454,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_immortal_create(const char *buf,
  * @return The new bucket, or NULL if allocation failed
  */
 APU_DECLARE(apr_bucket * ) apr_bucket_immortal_make(apr_bucket *b,
-                                                   const char *buf, 
+                                                   const AnsiChar *buf, 
                                                    apr_size_t nbyte);
 
 /**
@@ -1464,7 +1464,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_immortal_make(apr_bucket *b,
  * @param list The freelist from which this bucket should be allocated
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_transient_create(const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_transient_create(const AnsiChar *buf,
                                                       apr_size_t nbyte,
                                                       apr_bucket_alloc_t *list);
 
@@ -1476,7 +1476,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_transient_create(const char *buf,
  * @return The new bucket, or NULL if allocation failed
  */
 APU_DECLARE(apr_bucket * ) apr_bucket_transient_make(apr_bucket *b,
-                                                    const char *buf,
+                                                    const AnsiChar *buf,
                                                     apr_size_t nbyte);
 
 /**
@@ -1493,7 +1493,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_transient_make(apr_bucket *b,
  * @param list The freelist from which this bucket should be allocated
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_heap_create(const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_heap_create(const AnsiChar *buf,
                                                  apr_size_t nbyte,
                                                  void ( *free_func)(void *data),
                                                  apr_bucket_alloc_t *list);
@@ -1506,7 +1506,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_heap_create(const char *buf,
  *                  bucket should make a copy of the data
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_heap_make(apr_bucket *b, const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_heap_make(apr_bucket *b, const AnsiChar *buf,
                                                apr_size_t nbyte,
                                                void ( *free_func)(void *data));
 
@@ -1519,7 +1519,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_heap_make(apr_bucket *b, const char *buf,
  * @param list The freelist from which this bucket should be allocated
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_pool_create(const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_pool_create(const AnsiChar *buf,
                                                  apr_size_t length,
                                                  apr_pool_t *pool,
                                                  apr_bucket_alloc_t *list);
@@ -1532,7 +1532,7 @@ APU_DECLARE(apr_bucket * ) apr_bucket_pool_create(const char *buf,
  * @param pool The pool the memory was allocated from
  * @return The new bucket, or NULL if allocation failed
  */
-APU_DECLARE(apr_bucket * ) apr_bucket_pool_make(apr_bucket *b, const char *buf,
+APU_DECLARE(apr_bucket * ) apr_bucket_pool_make(apr_bucket *b, const AnsiChar *buf,
                                                apr_size_t length, 
                                                apr_pool_t *pool);
 

+ 17 - 17
packages/httpd24/src/aprutil/apr_uri.inc

@@ -81,23 +81,23 @@ type
  *}
   apr_uri_t = record
    { scheme ("http"/"ftp"/...) }
-   scheme: PChar;
+   scheme: PAnsiChar;
    { combined [user[:password]\@]host[:port] }
-   hostinfo: PChar;
+   hostinfo: PAnsiChar;
    { user name, as in http://user:passwd\@host:port/ }
-   user: PChar;
+   user: PAnsiChar;
    { password, as in http://user:passwd\@host:port/ }
-   password: PChar;
+   password: PAnsiChar;
    { hostname from URI (or from Host: header) }
-   hostname: PChar;
+   hostname: PAnsiChar;
    { port string (integer representation is in "port") }
-   port_str: PChar;
+   port_str: PAnsiChar;
    { the request path (or "/" if only scheme://host was given) }
-   path: PChar;
+   path: PAnsiChar;
    { Everything after a '?' in the path, if present }
-   query: PChar;
+   query: PAnsiChar;
    { Trailing "#fragment" string, if present }
-   fragment: PChar;
+   fragment: PAnsiChar;
 
    { structure returned from gethostbyname() }
    hostent: Pointer;
@@ -123,8 +123,8 @@ type
  * @param scheme_str The string that contains the current scheme
  * @return The default port for this scheme
  *}
-//APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str);
-function apr_uri_port_of_scheme(const scheme_str: PChar): apr_port_t;
+//APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const AnsiChar *scheme_str);
+function apr_uri_port_of_scheme(const scheme_str: PAnsiChar): apr_port_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPRUtil name LibNamePrefix + 'apr_uri_port_of_scheme' + LibSuff4;
 
@@ -145,12 +145,12 @@ function apr_uri_port_of_scheme(const scheme_str: PChar): apr_port_t;
  * </PRE>
  * @return The uri as a string
  *}
-//APU_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
+//APU_DECLARE(AnsiChar *) apr_uri_unparse(apr_pool_t *p,
 //                                    const apr_uri_t *uptr,
 //                                    unsigned flags);
 function apr_uri_unparse(p: Papr_pool_t;
                          const uptr: Papr_uri_t;
-                         flags: cuint): PChar;
+                         flags: cuint): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPRUtil name LibNamePrefix + 'apr_uri_unparse' + LibSuff12;
 
@@ -163,9 +163,9 @@ function apr_uri_unparse(p: Papr_pool_t;
  * @param uptr The apr_uri_t to fill out
  * @return APR_SUCCESS for success or error code
  *}
-//APU_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const char *uri,
+//APU_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const AnsiChar *uri,
 //                                        apr_uri_t *uptr);
-function apr_uri_parse(p: Papr_pool_t; const uri: PChar;
+function apr_uri_parse(p: Papr_pool_t; const uri: PAnsiChar;
                        uptr: Papr_uri_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPRUtil name LibNamePrefix + 'apr_uri_parse' + LibSuff12;
@@ -178,10 +178,10 @@ function apr_uri_parse(p: Papr_pool_t; const uri: PChar;
  * @return APR_SUCCESS for success or error code
  *}
 //APU_DECLARE(apr_status_t) apr_uri_parse_hostinfo(apr_pool_t *p,
-//                                                 const char *hostinfo,
+//                                                 const AnsiChar *hostinfo,
 //                                                 apr_uri_t *uptr);
 function apr_uri_parse_hostinfo(p: Papr_pool_t;
-                                const hostinfo: PChar;
+                                const hostinfo: PAnsiChar;
                                 uptr: Papr_uri_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibAPRUtil name LibNamePrefix + 'apr_uri_parse_hostinfo' + LibSuff12;

+ 111 - 111
packages/httpd24/src/http_config.inc

@@ -119,13 +119,13 @@ type
 
 //#if defined(AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN)
 
-  tnoargsfunc   = function(parms: Pcmd_parms; mconfig: pointer): Pchar; cdecl;
-  trawargsfunc  = function(parms: Pcmd_parms; mconfig: pointer; args: Pchar): Pchar; cdecl;
-  ttakeargvfunc = function(parms: Pcmd_parms; mconfig: pointer; argc: longint; argv: PPchar): Pchar; cdecl;
-  ttake1func    = function(parms: Pcmd_parms; mconfig: pointer; w: Pchar): Pchar; cdecl;
-  ttake2func    = function(parms: Pcmd_parms; mconfig: pointer; w, w2: Pchar): Pchar; cdecl;
-  ttake3func    = function(parms: Pcmd_parms; mconfig: pointer; w, w2, w3: Pchar): Pchar; cdecl;
-  tflagfunc     = function(parms: Pcmd_parms; mconfig: pointer; on_: longint): Pchar; cdecl;
+  tnoargsfunc   = function(parms: Pcmd_parms; mconfig: pointer): PAnsiChar; cdecl;
+  trawargsfunc  = function(parms: Pcmd_parms; mconfig: pointer; args: PAnsiChar): PAnsiChar; cdecl;
+  ttakeargvfunc = function(parms: Pcmd_parms; mconfig: pointer; argc: longint; argv: PPAnsiChar): PAnsiChar; cdecl;
+  ttake1func    = function(parms: Pcmd_parms; mconfig: pointer; w: PAnsiChar): PAnsiChar; cdecl;
+  ttake2func    = function(parms: Pcmd_parms; mconfig: pointer; w, w2: PAnsiChar): PAnsiChar; cdecl;
+  ttake3func    = function(parms: Pcmd_parms; mconfig: pointer; w, w2, w3: PAnsiChar): PAnsiChar; cdecl;
+  tflagfunc     = function(parms: Pcmd_parms; mconfig: pointer; on_: longint): PAnsiChar; cdecl;
 
 {**
  * All the types of functions that can be used in directives
@@ -213,7 +213,7 @@ type
 
 #else /* AP_HAVE_DESIGNATED_INITIALIZER */
 
-typedef const char *( *cmd_func) ();
+typedef const AnsiChar *( *cmd_func) ();
 
 # define AP_NO_ARGS  func
 # define AP_RAW_ARGS func
@@ -258,7 +258,7 @@ typedef const char *( *cmd_func) ();
  *}
   command_struct = record
     {** Name of this command *}
-    name: PChar;
+    name: PAnsiChar;
     {** The function to be called when this directive is parsed *}
     func: cmd_func;
     {** Extra data, for functions which implement multiple commands... *}
@@ -269,7 +269,7 @@ typedef const char *( *cmd_func) ();
     args_how: cmd_how;
 
     {** 'usage' message, in case of syntax errors *}
-    errmsg: PChar;
+    errmsg: PAnsiChar;
   end;
   command_rec = command_struct;
   Pcommand_rec = ^command_rec;
@@ -280,7 +280,7 @@ typedef const char *( *cmd_func) ();
   PPap_configfile_t = ^Pap_configfile_t;
   ap_configfile_t = record
     {**< an apr_file_getc()-like function *}
-    getch : function (ch:Pchar; param:pointer):apr_status_t;cdecl;
+    getch : function (ch:PAnsiChar; param:pointer):apr_status_t;cdecl;
     {**< an apr_file_gets()-like function *}
     getstr : function (buf:pointer; bufsiz:apr_size_t; param:pointer):apr_status_t;cdecl;
     {**< a close handler function *}
@@ -288,7 +288,7 @@ typedef const char *( *cmd_func) ();
     {**< the argument passed to getch/getstr/close *}
     param : pointer;
     {**< the filename / description *}
-    name : Pchar;
+    name : PAnsiChar;
     {**< current line number, starting at 1 *}
     line_number : dword;
   end;
@@ -332,7 +332,7 @@ typedef const char *( *cmd_func) ();
      * derived from this field is whether a command is being called in a
      * server context (path == NULL) or being called in a dir context
      * (path != NULL).  *}
-    path : Pchar;
+    path : PAnsiChar;
     {** configuration command *}
     cmd : Pcommand_rec;
 
@@ -360,7 +360,7 @@ typedef const char *( *cmd_func) ();
     module_index : longint;
 
     {** The name of the module's C file *}
-    name : Pchar;
+    name : PAnsiChar;
     {** The handle for the DSO.  Internal use only *}
     dynamic_load_handle : pointer;
 
@@ -385,7 +385,7 @@ typedef const char *( *cmd_func) ();
      *  @param dir The directory currently being processed.
      *  @return The per-directory structure created
      *}
-    create_dir_config : function (p:Papr_pool_t; dir:Pchar):pointer;cdecl;
+    create_dir_config : function (p:Papr_pool_t; dir:PAnsiChar):pointer;cdecl;
 
     {** Function to allow all modules to merge the per directory configuration
      *  structures for two directories.
@@ -636,12 +636,12 @@ procedure ap_reset_module_loglevels(l: Pap_logconf; val: Integer);
  * @param arg The argument to the directive
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_string_slot(cmd_parms *cmd,
 //                                                   void *struct_ptr,
-//                                                   const char *arg);
+//                                                   const AnsiChar *arg);
 function ap_set_string_slot(cmd: Pcmd_parms;
                             struct_ptr: Pointer;
-                            const arg: PChar): PChar; cdecl;
+                            const arg: PAnsiChar): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_string_slot';
 
 {**
@@ -651,10 +651,10 @@ function ap_set_string_slot(cmd: Pcmd_parms;
  * @param arg The argument to the directive
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_int_slot(cmd_parms *cmd,
 //                                                void *struct_ptr,
-//                                                const char *arg);
-function ap_set_int_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PChar): PChar; cdecl;
+//                                                const AnsiChar *arg);
+function ap_set_int_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PAnsiChar): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_int_slot';
 
 {**
@@ -663,7 +663,7 @@ function ap_set_int_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PChar)
  * @param val The parsed log level
  * @return An error string or NULL on success
  *}
-function ap_parse_log_level(const str: PChar; val: Integer): PChar;
+function ap_parse_log_level(const str: PAnsiChar; val: Integer): PAnsiChar;
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 external LibHTTPD name LibNamePrefix + 'ap_parse_log_level' + LibSuff8;
 
@@ -677,7 +677,7 @@ external LibHTTPD name LibNamePrefix + 'ap_parse_log_level' + LibSuff8;
  *                  directive handler.
  * @return  0 if the method is not limited in the current scope
  *}
-function ap_method_is_limited(cmd: Pcmd_parms; const method: PChar): Integer;
+function ap_method_is_limited(cmd: Pcmd_parms; const method: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_method_is_limited' + LibSuff8;
 
@@ -689,12 +689,12 @@ function ap_method_is_limited(cmd: Pcmd_parms; const method: PChar): Integer;
  * @param arg The argument to the directive
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_string_slot_lower(cmd_parms *cmd,
 //                                                         void *struct_ptr,
-//                                                         const char *arg);
+//                                                         const AnsiChar *arg);
 function ap_set_string_slot_lower(cmd: Pcmd_parms;
                                   struct_ptr: Pointer;
-                                  const arg: PChar): PChar; cdecl;
+                                  const arg: PAnsiChar): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_string_slot_lower';
 
 {**
@@ -704,27 +704,27 @@ function ap_set_string_slot_lower(cmd: Pcmd_parms;
  * @param arg The argument to the directive (either 1 or 0)
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_flag_slot(cmd_parms *cmd,
 //                                                 void *struct_ptr,
 //                                                 int arg);
 function ap_set_flag_slot(cmd: Pcmd_parms;
                           struct_ptr: Pointer;
-                          const arg: PChar): PChar; cdecl;
+                          const arg: PAnsiChar): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_flag_slot';
 
 {**
- * Generic command handling function for flags stored in a char
+ * Generic command handling function for flags stored in a AnsiChar
  * @param cmd The command parameters for this directive
  * @param struct_ptr pointer into a given type
  * @param arg The argument to the directive (either 1 or 0)
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_flag_slot_char(cmd_parms *cmd,
 //                                                      void *struct_ptr,
 //                                                      int arg);
 function ap_set_flag_slot_char(cmd: Pcmd_parms;
                                struct_ptr: Pointer;
-                               arg: Integer): PChar; cdecl;
+                               arg: Integer): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_flag_slot_char';
 
 {**
@@ -734,10 +734,10 @@ function ap_set_flag_slot_char(cmd: Pcmd_parms;
  * @param arg The argument to the directive
  * @return An error string or NULL on success
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_file_slot(cmd_parms *cmd,
 //                                                 void *struct_ptr,
-//                                                 const char *arg);
-function ap_set_file_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PChar): PChar; cdecl;
+//                                                 const AnsiChar *arg);
+function ap_set_file_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PAnsiChar): PAnsiChar; cdecl;
   external LibHTTPD name 'ap_set_file_slot';
 
 {**
@@ -752,12 +752,12 @@ function ap_set_file_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PChar
  *         "The Foo directive is no longer supported, use Bar"),
  * @endcode
  *}
-//AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd,
+//AP_DECLARE_NONSTD(const AnsiChar *) ap_set_deprecated(cmd_parms *cmd,
 //                                                  void *struct_ptr,
-//                                                  const char *arg);
+//                                                  const AnsiChar *arg);
  function ap_set_deprecated(cmd: Pcmd_parms;
                             struct_ptr: Pointer;
-                            const arg: PChar): PChar; cdecl;
+                            const arg: PAnsiChar): PAnsiChar; cdecl;
    external LibHTTPD name 'ap_set_deprecated';
 
 {**
@@ -766,7 +766,7 @@ function ap_set_file_slot(cmd: Pcmd_parms; struct_ptr: Pointer; const arg: PChar
  * @param p pool to allocate data from
  * @param fname The file name
  *}
-function ap_server_root_relative(p: Papr_pool_t; const fname: PChar): PChar;
+function ap_server_root_relative(p: Papr_pool_t; const fname: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_server_root_relative' + LibSuff8;
 
@@ -776,7 +776,7 @@ function ap_server_root_relative(p: Papr_pool_t; const fname: PChar): PChar;
  * The run-time directory is configured via the DefaultRuntimeDir directive or
  * at build time.
  *}
-function ap_runtime_dir_relative(p: Papr_pool_t; const fname: PChar): PChar;
+function ap_runtime_dir_relative(p: Papr_pool_t; const fname: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_runtime_dir_relative' + LibSuff8;
 
@@ -788,7 +788,7 @@ function ap_runtime_dir_relative(p: Papr_pool_t; const fname: PChar): PChar;
  * @param p The pool of the same lifetime as the module
  * @param s The module's symbol name (used for logging)
  *}
-function ap_add_module(m: Pmodule; p: Papr_pool_t; s: PChar): PChar;
+function ap_add_module(m: Pmodule; p: Papr_pool_t; s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_add_module' + LibSuff12;
 
@@ -810,7 +810,7 @@ procedure ap_remove_module(m: Pmodule);
  * @param p The pool with the same lifetime as the module
  * @param s The module's symbol name (used for logging)
  *}
-function ap_add_loaded_module(mod_: Pmodule; p: Papr_pool_t; s: PChar): PChar;
+function ap_add_loaded_module(mod_: Pmodule; p: Papr_pool_t; s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_add_loaded_module' + LibSuff12;
 
@@ -827,7 +827,7 @@ procedure ap_remove_loaded_module(m: Pmodule);
  * @param m The module to get the name for
  * @return the name of the module
  *}
- function ap_find_module_name(m: Pmodule): PChar;
+ function ap_find_module_name(m: Pmodule): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_find_module_name' + LibSuff4;
 
@@ -836,7 +836,7 @@ procedure ap_remove_loaded_module(m: Pmodule);
  * @param module_index The module index to get the name for
  * @return the name of the module, NULL if not found
  *}
-function ap_find_module_short_name(module_index: Integer): PChar;
+function ap_find_module_short_name(module_index: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_module_short_name' + LibSuff4;
 
@@ -845,7 +845,7 @@ function ap_find_module_short_name(module_index: Integer): PChar;
  * @param name the name of the module
  * @return the module structure if found, NULL otherwise
  *}
-function ap_find_linked_module(const name: PChar): Pmodule;
+function ap_find_linked_module(const name: PAnsiChar): Pmodule;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_linked_module' + LibSuff4;
 
@@ -856,7 +856,7 @@ function ap_find_linked_module(const name: PChar): Pmodule;
  * @param name the name of the file to open
  *}
 function ap_pcfg_openfile(ret_cfg: PPap_configfile_t;
- p: Papr_pool_t; const name: PChar): apr_status_t;
+ p: Papr_pool_t; const name: PAnsiChar): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pcfg_openfile' + LibSuff12;
 
@@ -870,18 +870,18 @@ function ap_pcfg_openfile(ret_cfg: PPap_configfile_t;
  * @param close_func The close function
  *}
 //AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p,
-//    const char *descr,
+//    const AnsiChar *descr,
 //    void *param,
-//    apr_status_t (*getc_func) (char *ch, void *param),
+//    apr_status_t (*getc_func) (AnsiChar *ch, void *param),
 //    apr_status_t (*gets_func) (void *buf, apr_size_t bufsiz, void *param),
 //    apr_status_t (*close_func) (void *param));
 type
- getc_func_t = function (ch: PChar; param: Pointer): apr_status_t;
+ getc_func_t = function (ch: PAnsiChar; param: Pointer): apr_status_t;
  gets_func_t = function (buf: Pointer; bufsiz: apr_size_t; param: Pointer): apr_status_t;
  close_func_t = function (param: Pointer): apr_status_t;
 
  function ap_pcfg_open_custom(p: Papr_pool_t;
-                              const descr: PChar;
+                              const descr: PAnsiChar;
                               param: Pointer;
                               getc_func: getc_func_t;
                               gets_func: gets_func_t;
@@ -897,17 +897,17 @@ type
  * @param cfp File to read from
  * @return error status, APR_ENOSPC if bufsize is too small for the line
  *}
-function ap_cfg_getline(buf: PChar; bufsize: apr_size_t; cfp: Pap_configfile_t): apr_status_t;
+function ap_cfg_getline(buf: PAnsiChar; bufsize: apr_size_t; cfp: Pap_configfile_t): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_cfg_getline' + LibSuff12;
 
 {**
- * Read one char from open configfile_t, increase line number upon LF
- * @param ch place to store the char read
+ * Read one AnsiChar from open configfile_t, increase line number upon LF
+ * @param ch place to store the AnsiChar read
  * @param cfp The file to read from
  * @return error status
  *}
-function ap_cfg_getc(ch: PChar; cfp: Pap_configfile_t): apr_status_t;
+function ap_cfg_getc(ch: PAnsiChar; cfp: Pap_configfile_t): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_cfg_getc' + LibSuff8;
 
@@ -929,7 +929,7 @@ function ap_cfg_closefile(cfp: Pap_configfile_t): Integer;
  * @return The error string, NULL if rc == APR_SUCCESS
  *}
 function ap_pcfg_strerror(p: Papr_pool_t; cfp: Pap_configfile_t;
-                                          rc: apr_status_t): PChar;
+                                          rc: apr_status_t): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_pcfg_strerror' + LibSuff12;
 
@@ -942,7 +942,7 @@ function ap_pcfg_strerror(p: Papr_pool_t; cfp: Pap_configfile_t;
  * @note If cmd->pool == cmd->temp_pool, ap_soak_end_container() will assume
  *       .htaccess context and use a lower maximum line length.
  *}
-function ap_soak_end_container(cmd: Pcmd_parms; directive: PChar): PChar;
+function ap_soak_end_container(cmd: Pcmd_parms; directive: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_soak_end_container' + LibSuff8;
 
@@ -964,7 +964,7 @@ function ap_build_cont_config(p,
                               parms: Pcmd_parms;
                               current,
                               curr_parent: PPap_directive_t;
-                              orig_directive: PChar): PChar;
+                              orig_directive: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_build_cont_config' + LibSuff24;
 
@@ -981,7 +981,7 @@ function ap_build_cont_config(p,
 function ap_build_config(parms: Pcmd_parms;
                          conf_pool,
                          temp_pool: Papr_pool_t;
-                         conftree: PPap_directive_t): PChar;
+                         conftree: PPap_directive_t): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_build_config' + LibSuff16;
 
@@ -994,7 +994,7 @@ function ap_build_config(parms: Pcmd_parms;
  *}
 function ap_walk_config(conftree: Pap_directive_t;
                         parms: Pcmd_parms;
-                        section_vector: Pap_conf_vector_t): PChar;
+                        section_vector: Pap_conf_vector_t): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_walk_config' + LibSuff12;
 
@@ -1009,7 +1009,7 @@ function ap_walk_config(conftree: Pap_directive_t;
  * @return Error string on error, NULL on success
  *}
 function ap_check_cmd_context(cmd: Pcmd_parms;
-                              forbidden: dword): PChar;
+                              forbidden: dword): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_check_cmd_context' + LibSuff8;
 
@@ -1033,7 +1033,7 @@ const
  *}
 type
   ap_module_symbol_t = record
-    name: PChar;
+    name: PAnsiChar;
     modp: Pmodule;
   end;
 
@@ -1080,7 +1080,7 @@ procedure ap_single_module_configure(p: Papr_pool_t; s: Pserver_rec;
  * Add all of the prelinked modules into the loaded module list
  * @param process The process that is currently running the server
  *}
-function ap_setup_prelinked_modules(process: Pprocess_rec): PChar;
+function ap_setup_prelinked_modules(process: Pprocess_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_setup_prelinked_modules' + LibSuff4;
 
@@ -1104,7 +1104,7 @@ procedure ap_show_modules;
  * Show the MPM name.  Used in reporting modules such as mod_info to
  * provide extra information to the user
  *}
-function ap_show_mpm: PChar;
+function ap_show_mpm: PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_show_mpm' + LibSuff0;
 
@@ -1118,7 +1118,7 @@ function ap_show_mpm: PChar;
  *}
 function ap_read_config(process: Pprocess_rec;
                         temp_pool: Papr_pool_t;
-                        const config_name: PChar;
+                        const config_name: PAnsiChar;
                         conftree: PPap_directive_t): Pserver_rec;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_read_config' + LibSuff16;
@@ -1167,7 +1167,7 @@ procedure ap_reserve_module_slots(count: Longint);
  * ap_reserve_module_slots() accordingly.
  * @param directive The name of the directive
  *}
-procedure ap_reserve_module_slots_directive(const directive: PChar);
+procedure ap_reserve_module_slots_directive(const directive: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_reserve_module_slots_directive' + LibSuff4;
 
@@ -1254,8 +1254,8 @@ function ap_parse_htaccess(result_: PPap_conf_vector_t;
                            override_: Longint;
                            override_opts: Longint;
                            override_list: Papr_table_t;
-                           const path: PChar;
-                           const access_name: PChar): Longint;
+                           const path: PAnsiChar;
+                           const access_name: PAnsiChar): Longint;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_parse_htaccess' + LibSuff28;
 
@@ -1268,9 +1268,9 @@ function ap_parse_htaccess(result_: PPap_conf_vector_t;
  * return Error string on error, NULL on success
  *}
 function ap_init_virtual_host(p: Papr_pool_t;
-                              const hostname: PChar;
+                              const hostname: PAnsiChar;
                               main_server: Pserver_rec;
-                              ps: PPserver_rec): PChar;
+                              ps: PPserver_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_init_virtual_host' + LibSuff16;
 
@@ -1283,9 +1283,9 @@ function ap_init_virtual_host(p: Papr_pool_t;
  * @param ptemp Pool for temporary allocation
  *}
 function ap_process_resource_config(s: Pserver_rec;
-                                    const fname: PChar;
+                                    const fname: PAnsiChar;
                                     conftree: PPap_directive_t;
-                                    p, ptemp: Papr_pool_t): PChar;
+                                    p, ptemp: Papr_pool_t): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_process_resource_config' + LibSuff20;
 
@@ -1300,10 +1300,10 @@ function ap_process_resource_config(s: Pserver_rec;
  * @see apr_fnmatch for pattern handling
  *}
 function ap_process_fnmatch_configs(s: Pserver_rec;
-                                    const fname: PChar;
+                                    const fname: PAnsiChar;
                                     conftree: PPap_directive_t;
                                     p, ptemp: Papr_pool_t;
-                                    optional: Longint): PChar;
+                                    optional: Longint): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_process_fnmatch_configs' + LibSuff24;
 
@@ -1327,7 +1327,7 @@ function ap_process_config_tree(s: Pserver_rec;
  * @param size in bytes of the retained data (to be allocated)
  * @return Address of new retained data structure, initially cleared
  *}
-function ap_retained_data_create(const key: Pchar; size: apr_size_t): Pointer;
+function ap_retained_data_create(const key: PAnsiChar; size: apr_size_t): Pointer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_retained_data_create' + LibSuff8;
 
@@ -1336,7 +1336,7 @@ function ap_retained_data_create(const key: Pchar; size: apr_size_t): Pointer;
  * @param key The unique key associated with this module's retained data
  * @return Address of previously retained data structure, or NULL if not yet saved
  *}
-function ap_retained_data_get(const key: Pchar): Pointer;
+function ap_retained_data_get(const key: PAnsiChar): Pointer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_retained_data_get' + LibSuff4;
 
@@ -1359,7 +1359,7 @@ function ap_invoke_handler(r: Prequest_rec): Longint;
  * @param cmds The table to search
  * @return The directive definition of the specified directive
  *}
-function ap_find_command(const name: PChar;
+function ap_find_command(const name: PAnsiChar;
                          const cmds: Pcommand_rec): Pcommand_rec;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_command' + LibSuff8;
@@ -1373,7 +1373,7 @@ function ap_find_command(const name: PChar;
  *         *mod will be changed to point to the module containing the
  *         directive.
  *}
-function ap_find_command_in_modules(const cmd_name: PChar;
+function ap_find_command_in_modules(const cmd_name: PAnsiChar;
                                     mod_: PPmodule): Pcommand_rec;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_command_in_modules' + LibSuff8;
@@ -1391,7 +1391,7 @@ function ap_find_command_in_modules(const cmd_name: PChar;
  *}
 function ap_set_config_vectors(server: Pserver_rec;
                                section_vector: Pap_conf_vector_t;
-                               const section: PChar;
+                               const section: PAnsiChar;
                                mod_: Pmodule;
                                pconf: Papr_pool_t): Pointer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -1409,8 +1409,8 @@ function ap_set_config_vectors(server: Pserver_rec;
  typedef
   int ap_HOOK_header_parser_t (request_rec *r);
   void ap_hook_header_parser(ap_HOOK_header_parser_t *pf,
-                             const char * const *aszPre,
-                             const char * const *aszSucc,
+                             const AnsiChar * const *aszPre,
+                             const AnsiChar * const *aszSucc,
                              int nOrder);
 
   int ap_run_header_parser (request_rec *r);
@@ -1419,17 +1419,17 @@ function ap_set_config_vectors(server: Pserver_rec;
 
   struct ap_LINK_header_parser_t {
     ap_HOOK_header_parser_t *pFunc;
-    const char *szName;
-    const char * const *aszPredecessors;
-    const char * const *aszSuccessors;
+    const AnsiChar *szName;
+    const AnsiChar * const *aszPredecessors;
+    const AnsiChar * const *aszSuccessors;
     int nOrder;
   } ap_LINK_header_parser_t;
 *)
 type
   ap_HOOK_header_parser_t = function(r: Prequest_rec): Longint; cdecl;
   procedure ap_hook_header_parser(pf: ap_HOOK_header_parser_t;
-                                  const aszPre: PPChar;
-                                  const aszSucc: PPChar;
+                                  const aszPre: PPAnsiChar;
+                                  const aszSucc: PPAnsiChar;
                                   nOrder: Longint);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_header_parser' + LibSuff16;
@@ -1457,18 +1457,18 @@ type
   typedef
    int ap_HOOK_pre_config_t (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp);
 
-   void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+   void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
 
    int ap_run_pre_config (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp);
 
    apr_array_header_t * ap_hook_get_pre_config(void);
 
-   struct ap_LINK_pre_config_t { ap_HOOK_pre_config_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_pre_config_t;
+   struct ap_LINK_pre_config_t { ap_HOOK_pre_config_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_pre_config_t;
 *)
 type
    ap_HOOK_pre_config_t = function(pconf, plog, ptemp: Papr_pool_t): Longint; cdecl;
 
-   procedure ap_hook_pre_config(pf: ap_HOOK_pre_config_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Longint);
+   procedure ap_hook_pre_config(pf: ap_HOOK_pre_config_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Longint);
      {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
      external LibHTTPD name LibNamePrefix + 'ap_hook_pre_config' + LibSuff16;
 
@@ -1494,17 +1494,17 @@ type
 //                                  apr_pool_t *ptemp, server_rec *s))
 (*macro expanded:
    int ap_HOOK_check_config_t (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s);
-   void ap_hook_check_config(ap_HOOK_check_config_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+   void ap_hook_check_config(ap_HOOK_check_config_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
 
    int ap_run_check_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s);
 
    apr_array_header_t * ap_hook_get_check_config(void);
 
-   struct ap_LINK_check_config_t { ap_HOOK_check_config_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_check_config_t;
+   struct ap_LINK_check_config_t { ap_HOOK_check_config_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_check_config_t;
 *)
 type
    ap_HOOK_check_config_t = function(pconf, plog, ptemp: Papr_pool_t; s: Pserver_rec): Longint; cdecl;
-   procedure ap_hook_check_config(pf: ap_HOOK_check_config_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Longint);
+   procedure ap_hook_check_config(pf: ap_HOOK_check_config_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Longint);
      {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
      external LibHTTPD name LibNamePrefix + 'ap_hook_check_config' + LibSuff16;
 
@@ -1531,16 +1531,16 @@ type
 //AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))
 (*macro expanded:
    void ap_HOOK_test_config_t (apr_pool_t *pconf, server_rec *s);
-   void ap_hook_test_config(ap_HOOK_test_config_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+   void ap_hook_test_config(ap_HOOK_test_config_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
    void ap_run_test_config (apr_pool_t *pconf, server_rec *s);
    apr_array_header_t * ap_hook_get_test_config(void);
 
-   typedef struct ap_LINK_test_config_t { ap_HOOK_test_config_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_test_config_t;
+   typedef struct ap_LINK_test_config_t { ap_HOOK_test_config_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_test_config_t;
 *)
 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);
+  procedure ap_hook_test_config(pf: ap_HOOK_test_config_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_test_config' + LibSuff16;
 
@@ -1567,16 +1567,16 @@ type
 (*macro expanded:
   int ap_HOOK_post_config_t (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s);
 
-  void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+  void ap_hook_post_config(ap_HOOK_post_config_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
   int ap_run_post_config (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s);
   apr_array_header_t * ap_hook_get_post_config(void);
 
-  struct ap_LINK_post_config_t { ap_HOOK_post_config_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_post_config_t;
+  struct ap_LINK_post_config_t { ap_HOOK_post_config_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_post_config_t;
 *)
 type
   ap_HOOK_post_config_t = function(pconf, plog, ptemp: Papr_pool_t; s: Pserver_rec): Longint; cdecl;
 
-  procedure ap_hook_post_config(pf: ap_HOOK_post_config_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_post_config(pf: ap_HOOK_post_config_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_post_config' + LibSuff16;
 
@@ -1603,16 +1603,16 @@ type
 (*macro expanded:
   int ap_HOOK_open_logs_t (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s);
 
-  void ap_hook_open_logs(ap_HOOK_open_logs_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+  void ap_hook_open_logs(ap_HOOK_open_logs_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
   int ap_run_open_logs (apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s);
   apr_array_header_t * ap_hook_get_open_logs(void);
 
-  struct ap_LINK_open_logs_t { ap_HOOK_open_logs_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_open_logs_t;
+  struct ap_LINK_open_logs_t { ap_HOOK_open_logs_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_open_logs_t;
 *)
 type
   ap_HOOK_open_logs_t = function(pconf, plog, ptemp: Papr_pool_t; s: Pserver_rec): Longint; cdecl;
 
-  procedure ap_hook_open_logs(pf: ap_HOOK_open_logs_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_open_logs(pf: ap_HOOK_open_logs_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_open_logs' + LibSuff16;
 
@@ -1635,16 +1635,16 @@ type
 (*macro expanded:
   void ap_HOOK_child_init_t (apr_pool_t *pchild, server_rec *s);
 
-  void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+  void ap_hook_child_init(ap_HOOK_child_init_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
   void ap_run_child_init (apr_pool_t *pchild, server_rec *s);
   apr_array_header_t * ap_hook_get_child_init(void);
 
-  struct ap_LINK_child_init_t { ap_HOOK_child_init_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_child_init_t;
+  struct ap_LINK_child_init_t { ap_HOOK_child_init_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_child_init_t;
 *)
 type
   ap_HOOK_child_init_t = procedure(pchild: Papr_pool_t; s: Pserver_rec); cdecl;
 
-  procedure ap_hook_child_init(pf: ap_HOOK_child_init_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_child_init(pf: ap_HOOK_child_init_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_child_init' + LibSuff16;
 
@@ -1667,16 +1667,16 @@ type
 (*macro expanded:
     int ap_HOOK_handler_t (request_rec *r);
 
-    void ap_hook_handler(ap_HOOK_handler_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+    void ap_hook_handler(ap_HOOK_handler_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
     int ap_run_handler (request_rec *r);
     apr_array_header_t * ap_hook_get_handler(void);
 
-    struct ap_LINK_handler_t { ap_HOOK_handler_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_handler_t;
+    struct ap_LINK_handler_t { ap_HOOK_handler_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_handler_t;
 *)
 type
   ap_HOOK_handler_t = function(r: Prequest_rec): Longint; cdecl;
 
-  procedure ap_hook_handler(pf: ap_HOOK_handler_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_handler(pf: ap_HOOK_handler_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_handler' + LibSuff16;
 
@@ -1705,16 +1705,16 @@ type
 (*macro expanded:
   int ap_HOOK_quick_handler_t (request_rec *r, int lookup_uri);
 
-  void ap_hook_quick_handler(ap_HOOK_quick_handler_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+  void ap_hook_quick_handler(ap_HOOK_quick_handler_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
   int ap_run_quick_handler (request_rec *r, int lookup_uri);
   apr_array_header_t * ap_hook_get_quick_handler(void);
 
-  struct ap_LINK_quick_handler_t { ap_HOOK_quick_handler_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_quick_handler_t;
+  struct ap_LINK_quick_handler_t { ap_HOOK_quick_handler_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_quick_handler_t;
 *)
 type
   ap_HOOK_quick_handler_t = function(r: Prequest_rec; lookup_uri: Longint): Longint; cdecl;
 
-  procedure ap_hook_quick_handler(pf: ap_HOOK_quick_handler_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_quick_handler(pf: ap_HOOK_quick_handler_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_quick_handler' + LibSuff16;
 
@@ -1737,16 +1737,16 @@ type
 (*macro expanded:
   void ap_HOOK_optional_fn_retrieve_t (void);
 
-  void ap_hook_optional_fn_retrieve(ap_HOOK_optional_fn_retrieve_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+  void ap_hook_optional_fn_retrieve(ap_HOOK_optional_fn_retrieve_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
   void ap_run_optional_fn_retrieve (void);
   apr_array_header_t * ap_hook_get_optional_fn_retrieve(void);
 
-  struct ap_LINK_optional_fn_retrieve_t { ap_HOOK_optional_fn_retrieve_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_optional_fn_retrieve_t;
+  struct ap_LINK_optional_fn_retrieve_t { ap_HOOK_optional_fn_retrieve_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_optional_fn_retrieve_t;
 *)
 type
   ap_HOOK_optional_fn_retrieve_t = procedure; cdecl;
 
-  procedure ap_hook_optional_fn_retrieve(pf: ap_HOOK_optional_fn_retrieve_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+  procedure ap_hook_optional_fn_retrieve(pf: ap_HOOK_optional_fn_retrieve_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_optional_fn_retrieve' + LibSuff16;
 

+ 58 - 58
packages/httpd24/src/http_core.inc

@@ -158,8 +158,8 @@ function ap_allow_overrides(r: Prequest_rec): Integer;
  * something like that, it'll screw you.  But it's back-compatible...
  * @return The document root
  *}
-//AP_DECLARE(const char *) ap_document_root(request_rec *r);
-function ap_document_root(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_document_root(request_rec *r);
+function ap_document_root(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_document_root' + LibSuff4;
 
@@ -187,8 +187,8 @@ function ap_document_root(r: Prequest_rec): PChar;
  *        string is returned
  * @return The remote hostname
  *}
-//AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
-function ap_get_remote_host(conn: Pconn_rec; dir_config: Pointer; _type: Integer; str_is_ip: PInteger): PChar;
+//AP_DECLARE(const AnsiChar *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
+function ap_get_remote_host(conn: Pconn_rec; dir_config: Pointer; _type: Integer; str_is_ip: PInteger): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_remote_host' + LibSuff16;
 
@@ -198,8 +198,8 @@ function ap_get_remote_host(conn: Pconn_rec; dir_config: Pointer; _type: Integer
  * @param r The current request
  * @return The user logged in to the client machine
  *}
-//AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r);
-function ap_get_remote_logname(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_get_remote_logname(request_rec *r);
+function ap_get_remote_logname(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_remote_logname' + LibSuff4;
 
@@ -213,8 +213,8 @@ function ap_get_remote_logname(r: Prequest_rec): PChar;
  * @param r The current request
  * @return A fully qualified URL
  *}
-//AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r);
-function ap_construct_url(p: Papr_pool_t; const uri: PChar; r: Prequest_rec): PChar;
+//AP_DECLARE(AnsiChar *) ap_construct_url(apr_pool_t *p, const AnsiChar *uri, request_rec *r);
+function ap_construct_url(p: Papr_pool_t; const uri: PAnsiChar; r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_construct_url' + LibSuff12;
 
@@ -223,8 +223,8 @@ function ap_construct_url(p: Papr_pool_t; const uri: PChar; r: Prequest_rec): PC
  * @param r The current request
  * @return the server name
  *}
-//AP_DECLARE(const char *) ap_get_server_name(request_rec *r);
-function ap_get_server_name(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_get_server_name(request_rec *r);
+function ap_get_server_name(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_server_name' + LibSuff4;
 
@@ -235,8 +235,8 @@ function ap_get_server_name(r: Prequest_rec): PChar;
  * @param r The current request
  * @return the server name
  *}
-//AP_DECLARE(const char *) ap_get_server_name_for_url(request_rec *r);
-function ap_get_server_name_for_url(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_get_server_name_for_url(request_rec *r);
+function ap_get_server_name_for_url(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_server_name_for_url' + LibSuff4;
 
@@ -277,8 +277,8 @@ function ap_get_limit_xml_body(r: Prequest_rec): apr_size_t;
  * @param string The custom response.  This can be a static string, a file
  *               or a URL
  *}
-//AP_DECLARE(void) ap_custom_response(request_rec *r, int status, const char *string);
-procedure ap_custom_response(r: Prequest_rec; status: Integer; const string_: PChar);
+//AP_DECLARE(void) ap_custom_response(request_rec *r, int status, const AnsiChar *string);
+procedure ap_custom_response(r: Prequest_rec; status: Integer; const string_: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_custom_response' + LibSuff12;
 
@@ -297,8 +297,8 @@ function ap_is_recursion_limit_exceeded(const r: Prequest_rec): Integer;
  * @param name The define to check for
  * @return 1 if defined, 0 otherwise
  *}
-//AP_DECLARE(int) ap_exists_config_define(const char *name);
-function ap_exists_config_define(const name: PChar): Integer;
+//AP_DECLARE(int) ap_exists_config_define(const AnsiChar *name);
+function ap_exists_config_define(const name: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_exists_config_define' + LibSuff4;
 //* FIXME! See STATUS about how */
@@ -324,7 +324,7 @@ type
     //** Where the require line is in the config file. */
     method_mask: apr_int64_t;
     //** The complete string from the command line */
-    requirement: PChar;
+    requirement: PAnsiChar;
  end;
 
 {**
@@ -332,8 +332,8 @@ type
  * @param r The current request
  * @return The authorization required
  *}
-//AP_DECLARE(const char *) ap_auth_type(request_rec *r);
-function ap_auth_type(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_auth_type(request_rec *r);
+function ap_auth_type(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_auth_type' + LibSuff4;
 
@@ -342,8 +342,8 @@ function ap_auth_type(r: Prequest_rec): PChar;
  * @param r The current request
  * @return The current authorization realm
  *}
-//AP_DECLARE(const char *) ap_auth_name(request_rec *r);
-function ap_auth_name(r: Prequest_rec): PChar;
+//AP_DECLARE(const AnsiChar *) ap_auth_name(request_rec *r);
+function ap_auth_name(r: Prequest_rec): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_auth_name' + LibSuff4;
 
@@ -428,14 +428,14 @@ type
     {** Custom response strings registered via ap_custom_response(),
      * or NULL; check per-dir config if nothing found here
      *}
-    response_code_strings: PPChar; {* from ap_custom_response(), not from
+    response_code_strings: PPAnsiChar; {* from ap_custom_response(), not from
                                     * ErrorDocument
                                     *}
 
     {** per-request document root of the server. This allows mass vhosting
      * modules better compatibility with some scripts. Normally the
      * context_* info should be used instead *}
-    document_root: PChar;
+    document_root: PAnsiChar;
 
     {*
      * more fine-grained context information which is set by modules like
@@ -444,11 +444,11 @@ type
     {** the context root directory on disk for the current resource,
      *  without trailing slash
      *}
-    context_document_root: PChar;
+    context_document_root: PAnsiChar;
     {** the URI prefix that corresponds to the context_document_root directory,
      *  without trailing slash
      *}
-    context_prefix: PChar;
+    context_prefix: PAnsiChar;
 
     {** There is a script processor installed on the output filter chain,
      * so it needs the default_handler to deliver a (script) file into
@@ -508,14 +508,14 @@ function ap_register_request_note: apr_size_t;
    external LibHTTPD name LibNamePrefix + 'ap_get_request_note' + LibSuff8;
 
 type
-//typedef unsigned char allow_options_t;
+//typedef unsigned AnsiChar allow_options_t;
   allow_options_t = cuchar;
 //typedef unsigned int overrides_t;
   overrides_t = cuchar;
 
 {*
  * Bits of info that go into making an ETag for a file
- * document.  Why a long?  Because char historically
+ * document.  Why a long?  Because AnsiChar historically
  * proved too short for Options, and int can be different
  * sizes on different platforms.
  *}
@@ -584,7 +584,7 @@ type
  *}
   core_dir_config = record
     //** path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
-    d: PChar;
+    d: PAnsiChar;
     //** the number of slashes in d */
     d_components: Cardinal;
 
@@ -603,11 +603,11 @@ type
 
     {* Custom response config. These can contain text or a URL to redirect to.
      * if response_code_strings is NULL then there are none in the config,
-     * if it's not null then it's allocated to sizeof(char*)*RESPONSE_CODES.
+     * if it's not null then it's allocated to sizeof(AnsiChar*)*RESPONSE_CODES.
      * This lets us do quick merges in merge_core_dir_configs().
      *}
 
-    response_code_strings: PPChar;{* from ErrorDocument, not from
+    response_code_strings: PPAnsiChar;{* from ErrorDocument, not from
                                    * ap_custom_response() *}
 
     //* Hostname resolution etc */       {fpc -> consts are moved up}
@@ -639,7 +639,7 @@ type
 //#define ADD_DEFAULT_CHARSET_ON    (1)
 //#define ADD_DEFAULT_CHARSET_UNSET (2)
 //    unsigned add_default_charset : 2;
-    add_default_charset_name: PChar;
+    add_default_charset_name: PAnsiChar;
 
     //* System Resource Control */
 {$ifdef RLIMIT_CPU}
@@ -666,7 +666,7 @@ type
     mime_type,                 //* forced with ForceType  */
     handler,                   //* forced with SetHandler */
     output_filters,            //* forced with SetOutputFilters */
-    input_filters: PChar;      //* forced with SetInputFilters */
+    input_filters: PAnsiChar;      //* forced with SetInputFilters */
     accept_path_info: Integer; //* forced with AcceptPathInfo */
 
     {*
@@ -741,17 +741,17 @@ const
 type
   core_server_config = record
 
-    gprof_dir: PChar;
+    gprof_dir: PAnsiChar;
 
     {* Name translations --- we want the core to be able to do *something*
      * so it's at least a minimally functional web server on its own (and
      * can be tested that way).  But let's keep it to the bare minimum:
      *}
-    ap_document_root: PChar;
+    ap_document_root: PAnsiChar;
 
     //* Access control */
 
-    access_name: PChar;
+    access_name: PAnsiChar;
     sec_dir: Papr_array_header_t;
     sec_url: Papr_array_header_t;
 
@@ -759,7 +759,7 @@ type
     redirect_limit,          //* maximum number of internal redirects */
     subreq_limit: Integer;   //* maximum nesting level of subrequests */
 
-    protocol: PChar;
+    protocol: PAnsiChar;
     accf_map: Papr_table_t;
 
     //* array of ap_errorlog_format_item for error log format string */
@@ -790,8 +790,8 @@ type
 //AP_CORE_DECLARE(void) ap_add_per_dir_conf(server_rec *s, void *dir_config);
 //AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config);
 //AP_CORE_DECLARE(void) ap_add_file_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
-//AP_CORE_DECLARE(const char *) ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
-//AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
+//AP_CORE_DECLARE(const AnsiChar *) ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
+//AP_CORE_DECLARE_NONSTD(const AnsiChar *) ap_limit_section(cmd_parms *cmd, void *dummy, const AnsiChar *arg);
 
 //* Core filters; not exported. */
 //apr_status_t ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
@@ -800,8 +800,8 @@ type
 //apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b);
 
 
-//AP_DECLARE(const char*) ap_get_server_protocol(server_rec* s);
-//AP_DECLARE(void) ap_set_server_protocol(server_rec* s, const char* proto);
+//AP_DECLARE(const AnsiChar*) ap_get_server_protocol(server_rec* s);
+//AP_DECLARE(void) ap_set_server_protocol(server_rec* s, const AnsiChar* proto);
 
 //typedef struct core_output_filter_ctx core_output_filter_ctx_t;
 type
@@ -841,7 +841,7 @@ type
   ap_HOOK_insert_network_bucket_t = function(c: Pconn_rec; bb: Papr_bucket_brigade; socket: Papr_socket_t): apr_status_t; cdecl;
 
 procedure ap_hook_insert_network_bucket(pf: ap_HOOK_insert_network_bucket_t;
-                                 const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+                                 const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_insert_network_bucket' + LibSuff16;
 
@@ -859,14 +859,14 @@ type
 
   ap_mgmt_value = record
     case Integer of
-     0: (s_value: PChar);
+     0: (s_value: PAnsiChar);
      1: (i_value: cLong);
      2: (h_value: Papr_hash_t);
   end;
 
   ap_mgmt_item_t = record
-    description: PChar;
-    name: PChar;
+    description: PAnsiChar;
+    name: PAnsiChar;
     vtype: ap_mgmt_type_e;
     v: ap_mgmt_value;
   end;
@@ -891,12 +891,12 @@ type
  * @ingroup hooks
  *}
 //AP_DECLARE_HOOK(int, get_mgmt_items,
-//                (apr_pool_t *p, const char * val, apr_hash_t *ht))
+//                (apr_pool_t *p, const AnsiChar * val, apr_hash_t *ht))
 type
-  ap_HOOK_get_mgmt_items_t = function(p: Papr_pool_t; const val: PChar; ht: Papr_hash_t): Integer; cdecl;
+  ap_HOOK_get_mgmt_items_t = function(p: Papr_pool_t; const val: PAnsiChar; ht: Papr_hash_t): Integer; cdecl;
 
 procedure ap_hook_get_mgmt_items(pf: ap_HOOK_get_mgmt_items_t;
-                                 const aszPre: PPChar; const aszSucc: PPChar; nOrder: Integer);
+                                 const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_get_mgmt_items' + LibSuff16;
 
@@ -947,7 +947,7 @@ type
     pool: Papr_pool_t;
 
     //** name of source file where the log message was produced, NULL if N/A. */
-    file_: PChar;
+    file_: PAnsiChar;
     //** line number in the source file, 0 if N/A */
     line: Integer;
 
@@ -965,7 +965,7 @@ type
     startup: Integer;
 
     //** message format */
-    format: PChar;
+    format: PAnsiChar;
   end; {ap_errorlog_info}
 
 {**
@@ -976,10 +976,10 @@ type
  * and destroy a sub-pool.
  *}
 //typedef int ap_errorlog_handler_fn_t(const ap_errorlog_info *info,
-//                                     const char *arg, char *buf, int buflen);
+//                                     const AnsiChar *arg, AnsiChar *buf, int buflen);
 type
 ap_errorlog_handler_fn_t = function(const info: Pap_errorlog_info;
-                                    const arg: PChar; buf: PChar; buflen: Integer):Integer; cdecl;
+                                    const arg: PAnsiChar; buf: PAnsiChar; buflen: Integer):Integer; cdecl;
 {**
  * Register external errorlog handler
  * @param p config pool to use
@@ -987,10 +987,10 @@ ap_errorlog_handler_fn_t = function(const info: Pap_errorlog_info;
  * @param handler the handler function
  * @param flags flags (reserved, set to 0)
  *}
-//AP_DECLARE(void) ap_register_errorlog_handler(apr_pool_t *p, char *tag,
+//AP_DECLARE(void) ap_register_errorlog_handler(apr_pool_t *p, AnsiChar *tag,
 //                                              ap_errorlog_handler_fn_t *handler,
 //                                              int flags);
-procedure ap_register_errorlog_handler(p: Papr_pool_t; tag: PChar;
+procedure ap_register_errorlog_handler(p: Papr_pool_t; tag: PAnsiChar;
                                        handler: ap_errorlog_handler_fn_t;
                                        flags: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -1017,7 +1017,7 @@ type
     //** ap_errorlog_handler function */
     func: ap_errorlog_handler_fn_t;
     //** argument passed to item in {} */
-    arg: PChar;
+    arg: PAnsiChar;
     //** a combination of the AP_ERRORLOG_* flags */
     flags: cuint;
     //** only log item if the message's log level is higher than this */
@@ -1035,7 +1035,7 @@ type
  *          Use a subpool if necessary.
  *}
 //AP_DECLARE_HOOK(void, error_log, (const ap_errorlog_info *info,
-//                                  const char *errstr))
+//                                  const AnsiChar *errstr))
 
 //AP_CORE_DECLARE(void) ap_register_log_hooks(apr_pool_t *p);
 //AP_CORE_DECLARE(void) ap_register_config_hooks(apr_pool_t *p);
@@ -1045,7 +1045,7 @@ type
  * ident lookups with mod_ident
  *}
 
-//APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup,
+//APR_DECLARE_OPTIONAL_FN(const AnsiChar *, ap_ident_lookup,
 //                        (request_rec *r));
 
 {* ----------------------------------------------------------------------
@@ -1054,8 +1054,8 @@ type
  *}
 
 //APR_DECLARE_OPTIONAL_FN(int, authz_some_auth_required, (request_rec *r));
-//APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_type, (request_rec *r));
-//APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_name, (request_rec *r));
+//APR_DECLARE_OPTIONAL_FN(const AnsiChar *, authn_ap_auth_type, (request_rec *r));
+//APR_DECLARE_OPTIONAL_FN(const AnsiChar *, authn_ap_auth_name, (request_rec *r));
 
 {* ----------------------------------------------------------------------
  *

+ 50 - 50
packages/httpd24/src/http_log.inc

@@ -268,7 +268,7 @@ procedure ap_open_stderr_log(p: Papr_pool_t);
  * @param p The pool to allocate out of
  * @param file Name of the file to log stderr output
  *}
-function ap_replace_stderr_log(p: Papr_pool_t; file_: PChar): apr_status_t;
+function ap_replace_stderr_log(p: Papr_pool_t; file_: PAnsiChar): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_replace_stderr_log' + LibSuff8;
 
@@ -330,9 +330,9 @@ function ap_replace_stderr_log(p: Papr_pool_t; file_: PChar): apr_status_t;
  * untrusted data.
  *}
 (*#ifdef DOXYGEN
-AP_DECLARE(void) ap_log_error(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_error(const AnsiChar *file, int line, int module_index,
                               int level, apr_status_t status,
-                              const server_rec *s, const char *fmt, ...);
+                              const server_rec *s, const AnsiChar *fmt, ...);
 #else
 #ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
@@ -345,19 +345,19 @@ AP_DECLARE(void) ap_log_error(const char *file, int line, int module_index,
 #else
 #define ap_log_error ap_log_error_
 #endif
-AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_error_(const AnsiChar *file, int line, int module_index,
                                int level, apr_status_t status,
-                               const server_rec *s, const char *fmt, ...)
+                               const server_rec *s, const AnsiChar *fmt, ...)
                               __attribute__((format(printf,7,8)));
 #endif
 *)
-procedure ap_log_error(const file_: PChar;
+procedure ap_log_error(const file_: PAnsiChar;
                        line,
                        module_index,        //extra parameter from Apache 2.3.x
                        level: Integer;
                        status: apr_status_t;
                        const s: Pserver_rec;
-                       const fmt: PChar;
+                       const fmt: PAnsiChar;
                        fmt_args: array of const); cdecl;
   external LibHTTPD name 'ap_log_error' + LibSuff_;
 
@@ -383,9 +383,9 @@ procedure ap_log_error(const file_: PChar;
  * untrusted data.
  *}
 (*#ifdef DOXYGEN
-AP_DECLARE(void) ap_log_perror(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_perror(const AnsiChar *file, int line, int module_index,
                                int level, apr_status_t status, apr_pool_t *p,
-                               const char *fmt, ...);
+                               const AnsiChar *fmt, ...);
 #else
 #if defined(AP_HAVE_C99) && defined(APLOG_MAX_LOGLEVEL)
 /* need additional step to expand APLOG_MARK first */
@@ -397,15 +397,15 @@ AP_DECLARE(void) ap_log_perror(const char *file, int line, int module_index,
 #else
 #define ap_log_perror ap_log_perror_
 #endif
-AP_DECLARE(void) ap_log_perror_(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_perror_(const AnsiChar *file, int line, int module_index,
                                 int level, apr_status_t status, apr_pool_t *p,
-                                const char *fmt, ...)
+                                const AnsiChar *fmt, ...)
                                __attribute__((format(printf,7,8)));
 #endif
 *)
-procedure ap_log_perror(const file_: PChar; line, module_index, level: Integer;
+procedure ap_log_perror(const file_: PAnsiChar; line, module_index, level: Integer;
                         status: apr_status_t; p: Papr_pool_t;
-                        const fmt: PChar; fmt_args: array of const);
+                        const fmt: PAnsiChar; fmt_args: array of const);
    {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    external LibHTTPD name 'ap_log_perror' + LibSuff_;
 
@@ -431,9 +431,9 @@ procedure ap_log_perror(const file_: PChar; line, module_index, level: Integer;
  * untrusted data.
  *}
 (*#ifdef DOXYGEN
-AP_DECLARE(void) ap_log_rerror(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_rerror(const AnsiChar *file, int line, int module_index,
                                int level, apr_status_t status,
-                               const request_rec *r, const char *fmt, ...);
+                               const request_rec *r, const AnsiChar *fmt, ...);
 #else
 #ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
@@ -445,15 +445,15 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int module_index,
 #else
 #define ap_log_rerror ap_log_rerror_
 #endif
-AP_DECLARE(void) ap_log_rerror_(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_rerror_(const AnsiChar *file, int line, int module_index,
                                 int level, apr_status_t status,
-                                const request_rec *r, const char *fmt, ...)
+                                const request_rec *r, const AnsiChar *fmt, ...)
                                 __attribute__((format(printf,7,8)));
 #endif
 *)
-procedure ap_log_rerror(const file_: PChar; line, module_index, level: Integer;
+procedure ap_log_rerror(const file_: PAnsiChar; line, module_index, level: Integer;
                         status: apr_status_t; const r: Prequest_rec;
-                        const fmt: PChar; fmt_args: array of const);
+                        const fmt: PAnsiChar; fmt_args: array of const);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name 'ap_log_rerror_' + LibSuff_;
 
@@ -481,9 +481,9 @@ procedure ap_log_rerror(const file_: PChar; line, module_index, level: Integer;
  * untrusted data.
  *}
 (*#ifdef DOXYGEN
-AP_DECLARE(void) ap_log_cerror(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_cerror(const AnsiChar *file, int line, int module_index,
                                int level, apr_status_t status,
-                               const conn_rec *c, const char *fmt, ...);
+                               const conn_rec *c, const AnsiChar *fmt, ...);
 #else
 #ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
@@ -495,15 +495,15 @@ AP_DECLARE(void) ap_log_cerror(const char *file, int line, int module_index,
 #else
 #define ap_log_cerror ap_log_cerror_
 #endif
-AP_DECLARE(void) ap_log_cerror_(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_cerror_(const AnsiChar *file, int line, int module_index,
                                 int level, apr_status_t status,
-                                const conn_rec *c, const char *fmt, ...)
+                                const conn_rec *c, const AnsiChar *fmt, ...)
                                 __attribute__((format(printf,7,8)));
 #endif
 *)
-procedure ap_log_cerror(const file_: PChar; line, module_index, level: Integer;
+procedure ap_log_cerror(const file_: PAnsiChar; line, module_index, level: Integer;
                         status: apr_status_t; const c: Pconn_rec;
-                        const fmt: PChar; fmt_args: array of const);
+                        const fmt: PAnsiChar; fmt_args: array of const);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name 'ap_log_cerror' + LibSuff_;
 
@@ -533,10 +533,10 @@ procedure ap_log_cerror(const file_: PChar; line, module_index, level: Integer;
  * untrusted data.
  *}
 (*#ifdef DOXYGEN
-AP_DECLARE(void) ap_log_cserror(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_cserror(const AnsiChar *file, int line, int module_index,
                                 int level, apr_status_t status,
                                 const conn_rec *c, const server_rec *s,
-                                const char *fmt, ...);
+                                const AnsiChar *fmt, ...);
 #else
 #ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
@@ -549,16 +549,16 @@ AP_DECLARE(void) ap_log_cserror(const char *file, int line, int module_index,
 #else
 #define ap_log_cserror ap_log_cserror_
 #endif
-AP_DECLARE(void) ap_log_cserror_(const char *file, int line, int module_index,
+AP_DECLARE(void) ap_log_cserror_(const AnsiChar *file, int line, int module_index,
                                  int level, apr_status_t status,
                                  const conn_rec *c, const server_rec *s,
-                                 const char *fmt, ...)
+                                 const AnsiChar *fmt, ...)
                              __attribute__((format(printf,8,9)));
 #endif
 *)
-procedure ap_log_cserror(const file_: PChar; line, module_index, level: Integer;
+procedure ap_log_cserror(const file_: PAnsiChar; line, module_index, level: Integer;
                          status: apr_status_t; const c: Pconn_rec;
-                         const s: Pserver_rec; const fmt: PChar; fmt_args: array of const);
+                         const s: Pserver_rec; const fmt: PAnsiChar; fmt_args: array of const);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name 'ap_log_cserror' + LibSuff_;
 
@@ -588,8 +588,8 @@ procedure ap_log_command_line(p: Papr_pool_t; s: Pserver_rec);
  * @param fname The name of the file to log to.  If the filename is not
  * absolute then it is assumed to be relative to ServerRoot.
  *}
-//AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname);
-procedure ap_log_pid(p: Papr_pool_t; const fname: PChar);
+//AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const AnsiChar *fname);
+procedure ap_log_pid(p: Papr_pool_t; const fname: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_log_pid' + LibSuff8;
 
@@ -599,8 +599,8 @@ procedure ap_log_pid(p: Papr_pool_t; const fname: PChar);
  * @param fname The name of the pid file to remove.  If the filename is not
  * absolute then it is assumed to be relative to ServerRoot.
  *}
-//AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *fname);
-procedure ap_remove_pid(p: Papr_pool_t; const fname: PChar);
+//AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const AnsiChar *fname);
+procedure ap_remove_pid(p: Papr_pool_t; const fname: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_remove_pid' + LibSuff8;
 
@@ -611,8 +611,8 @@ procedure ap_remove_pid(p: Papr_pool_t; const fname: PChar);
  * absolute then it is assumed to be relative to ServerRoot.
  * @param mypid Pointer to pid_t (valid only if return APR_SUCCESS)
  *}
-//AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename, pid_t *mypid);
-function ap_read_pid(p: Papr_pool_t; const filename: PChar; mypid: Ppid_t): apr_status_t;
+//AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const AnsiChar *filename, pid_t *mypid);
+function ap_read_pid(p: Papr_pool_t; const filename: PAnsiChar; mypid: Ppid_t): apr_status_t;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_read_pid' + LibSuff12;
 
@@ -634,7 +634,7 @@ type
       read_fd, write_fd: Papr_file_t;
   {$ifdef AP_HAVE_RELIABLE_PIPED_LOGS}
       //** The name of the program the logging process is running */
-      program_: PChar;
+      program_: PAnsiChar;
       //** The pid of the logging process */
       pid: Papr_proc_t;
       //** How to reinvoke program when it must be replaced */
@@ -651,8 +651,8 @@ type
  * @note The log program is invoked as @p APR_PROGRAM_ENV,
  *      @see ap_open_piped_log_ex to modify this behavior
  *}
-//AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program);
-function ap_open_piped_log(p: Papr_pool_t; const program_: PChar): Ppiped_log;
+//AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const AnsiChar *program);
+function ap_open_piped_log(p: Papr_pool_t; const program_: PAnsiChar): Ppiped_log;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_open_piped_log' + LibSuff8;
 
@@ -664,10 +664,10 @@ function ap_open_piped_log(p: Papr_pool_t; const program_: PChar): Ppiped_log;
  * @return The piped log structure
  *}
 //AP_DECLARE(piped_log *) ap_open_piped_log_ex(apr_pool_t *p,
-//                                             const char *program,
+//                                             const AnsiChar *program,
 //                                             apr_cmdtype_e cmdtype);
 function ap_open_piped_log_ex(p: Papr_pool_t;
-                              const program_: PChar;
+                              const program_: PAnsiChar;
                               cmdtype: apr_cmdtype_e): Ppiped_log;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_open_piped_log_ex' + LibSuff12;
@@ -710,26 +710,26 @@ procedure ap_piped_log_write_fd(pl: Ppiped_log);
  * @return OK or DECLINE
  *}
 //AP_DECLARE_HOOK(int, generate_log_id,
-//                (const conn_rec *c, const request_rec *r, const char **id))
+//                (const conn_rec *c, const request_rec *r, const AnsiChar **id))
 (*macro expanded:
-  int ap_HOOK_generate_log_id_t (const conn_rec *c, const request_rec *r, const char **id);
+  int ap_HOOK_generate_log_id_t (const conn_rec *c, const request_rec *r, const AnsiChar **id);
 
-  void ap_hook_generate_log_id(ap_HOOK_generate_log_id_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
-  int ap_run_generate_log_id (const conn_rec *c, const request_rec *r, const char **id);
+  void ap_hook_generate_log_id(ap_HOOK_generate_log_id_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
+  int ap_run_generate_log_id (const conn_rec *c, const request_rec *r, const AnsiChar **id);
   apr_array_header_t * ap_hook_get_generate_log_id(void);
 
-  typedef struct ap_LINK_generate_log_id_t { ap_HOOK_generate_log_id_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_generate_log_id_t;
+  typedef struct ap_LINK_generate_log_id_t { ap_HOOK_generate_log_id_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_generate_log_id_t;
 *)
 type
   ap_HOOK_generate_log_id_t = function(const c: Pconn_rec;
                                        const r: Prequest_rec;
-                                       const id: PPChar): Longint; cdecl;
+                                       const id: PPAnsiChar): Longint; cdecl;
 
-  procedure ap_hook_generate_log_id(pf: ap_hook_generate_log_id_t; const aszPre: PPChar; const aszSucc: PPChar; nOrder: Longint);
+  procedure ap_hook_generate_log_id(pf: ap_hook_generate_log_id_t; const aszPre: PPAnsiChar; const aszSucc: PPAnsiChar; nOrder: Longint);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_generate_log_id' + LibSuff16;
 
-  function ap_run_generate_log_id(const c: Pconn_rec; const r: Prequest_rec; const id: PPChar): Longint;
+  function ap_run_generate_log_id(const c: Pconn_rec; const r: Prequest_rec; const id: PPAnsiChar): Longint;
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_run_generate_log_id' + LibSuff12;
 

+ 79 - 79
packages/httpd24/src/http_protocol.inc

@@ -43,19 +43,19 @@ typedef
   void ap_HOOK_insert_error_filter_t (request_rec *r);
 
   void ap_hook_insert_error_filter(ap_HOOK_insert_error_filter_t *pf,
-                                   const char * const *aszPre,
-                                   const char * const *aszSucc,
+                                   const AnsiChar * const *aszPre,
+                                   const AnsiChar * const *aszSucc,
                                    int nOrder);
   void ap_run_insert_error_filter (request_rec *r);
   apr_array_header_t * ap_hook_get_insert_error_filter(void);
 
-  typedef struct ap_LINK_insert_error_filter_t { ap_HOOK_insert_error_filter_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_insert_error_filter_t;
+  typedef struct ap_LINK_insert_error_filter_t { ap_HOOK_insert_error_filter_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_insert_error_filter_t;
 *)
 type
   ap_HOOK_insert_error_filter_t = procedure(r: Prequest_rec); cdecl;
 
 procedure ap_hook_insert_error_filter(pf: ap_HOOK_insert_error_filter_t;
-                                      const aszPre, aszSucc: PPChar;
+                                      const aszPre, aszSucc: PPAnsiChar;
                                       nOrder: Integer);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_hook_insert_error_filter' + LibSuff16;
@@ -184,9 +184,9 @@ function ap_rationalize_mtime(r: Prequest_rec; mtime: apr_time_t): apr_time_t;
  * @param type The content type
  * @return The content-type
  *}
-//AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
-//                                              const char *type);
-function ap_make_content_type(r: Prequest_rec; type_: PChar): PChar;
+//AP_DECLARE(const AnsiChar *) ap_make_content_type(request_rec *r,
+//                                              const AnsiChar *type);
+function ap_make_content_type(r: Prequest_rec; type_: PAnsiChar): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_make_content_type' + LibSuff8;
 
@@ -207,8 +207,8 @@ procedure ap_setup_make_content_type(pool: Papr_pool_t);
  *                   again in as short an interval.
  * @return The entity tag
  *}
-//AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
-function ap_make_etag(r: Prequest_rec; force_weak: Integer): PChar;
+//AP_DECLARE(AnsiChar *) ap_make_etag(request_rec *r, int force_weak);
+function ap_make_etag(r: Prequest_rec; force_weak: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_make_etag' + LibSuff8;
 
@@ -301,8 +301,8 @@ function ap_send_mmap(mm: Papr_mmap_t;
  * @param methname The name of the new method to register.
  * @return         Ab int value representing an offset into a bitmask.
  *}
-//AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname);
-function ap_method_register(p: Papr_pool_t; methname: PChar): Integer;
+//AP_DECLARE(int) ap_method_register(apr_pool_t *p, const AnsiChar *methname);
+function ap_method_register(p: Papr_pool_t; methname: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_register' + LibSuff8;
 
@@ -357,8 +357,8 @@ procedure ap_copy_method_list(dest, src: Pap_method_list_t);
  * @param   l       Pointer to a method list, such as r->allowed_methods.
  * @return  1 if method is in the list, otherwise 0
  *}
-//AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
-function ap_method_in_list(l: Pap_method_list_t; const method: PChar): Integer;
+//AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const AnsiChar *method);
+function ap_method_in_list(l: Pap_method_list_t; const method: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_in_list' + LibSuff8;
 
@@ -370,8 +370,8 @@ function ap_method_in_list(l: Pap_method_list_t; const method: PChar): Integer;
  * @param   l       Pointer to a method list, such as r->allowed_methods.
  * @return  None.
  *}
-//AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
-procedure ap_method_list_add(l: Pap_method_list_t; const method: PChar);
+//AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const AnsiChar *method);
+procedure ap_method_list_add(l: Pap_method_list_t; const method: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_list_add' + LibSuff8;
 
@@ -383,8 +383,8 @@ procedure ap_method_list_add(l: Pap_method_list_t; const method: PChar);
  * @return  None.
  *}
 //AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
-//                                       const char *method);
-procedure ap_method_list_remove(l: Pap_method_list_t; const method: PChar);
+//                                       const AnsiChar *method);
+procedure ap_method_list_remove(l: Pap_method_list_t; const method: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_list_remove' + LibSuff8;
 
@@ -406,8 +406,8 @@ procedure ap_clear_method_list(l: Pap_method_list_t);
  * @warning This function must be called to set r->content_type in order
  * for the AddOutputFilterByType directive to work correctly.
  *}
-//AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct);
-procedure ap_set_content_type(r: Prequest_rec; const ct: PChar);
+//AP_DECLARE(void) ap_set_content_type(request_rec *r, const AnsiChar *ct);
+procedure ap_set_content_type(r: Prequest_rec; const ct: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_set_content_type' + LibSuff8;
 
@@ -454,7 +454,7 @@ function ap_rwrite(const buf: Pointer; nbyte: Integer; r: Prequest_rec): Integer
  * @return The number of bytes sent
  * @note ap_rputs may be implemented as macro or inline function
  *}
-//static APR_INLINE int ap_rputs(const char *str, request_rec *r)
+//static APR_INLINE int ap_rputs(const AnsiChar *str, request_rec *r)
 //{
 //    return ap_rwrite(str, strlen(str), r);
 //}
@@ -477,8 +477,8 @@ function ap_rvputs(r: Prequest_rec; params: array of const): Integer; cdecl;
  * @param vlist The arguments to use to fill out the format string
  * @return The number of bytes sent
  *}
-//AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
-function ap_vrprintf(r: Prequest_rec; const fmt: PChar; vlist: va_list): Integer;
+//AP_DECLARE(int) ap_vrprintf(request_rec *r, const AnsiChar *fmt, va_list vlist);
+function ap_vrprintf(r: Prequest_rec; const fmt: PAnsiChar; vlist: va_list): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_vrprintf' + LibSuff12;
 
@@ -489,10 +489,10 @@ function ap_vrprintf(r: Prequest_rec; const fmt: PChar; vlist: va_list): Integer
  * @param ... The arguments to use to fill out the format string
  * @return The number of bytes sent
  *}
-//AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
+//AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const AnsiChar *fmt,...)
 //                                __attribute__((format(printf,2,3)));
 function ap_rprintf(r: Prequest_rec;
-                    const fmt: PChar; params: array of const): Integer; cdecl;
+                    const fmt: PAnsiChar; params: array of const): Integer; cdecl;
   external LibHTTPD name 'ap_rprintf';
 
 {**
@@ -523,8 +523,8 @@ function ap_index_of_response(status: Integer): Integer;
  * @param status The HTTP status code
  * @return The Status-Line
  *}
-//AP_DECLARE(const char *) ap_get_status_line(int status);
-function ap_get_status_line(status: Integer): PChar;
+//AP_DECLARE(const AnsiChar *) ap_get_status_line(int status);
+function ap_get_status_line(status: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_status_line' + LibSuff4;
 
@@ -568,8 +568,8 @@ function ap_should_client_block(r: Prequest_rec): Integer;
  * @return Number of bytes inserted into the buffer.  When done reading, 0
  *         if EOF, or -1 if there was an error
  *}
-//AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
-function ap_get_client_block(r: Prequest_rec; buffer: PChar; bufsiz: apr_size_t): cLong;
+//AP_DECLARE(long) ap_get_client_block(request_rec *r, AnsiChar *buffer, apr_size_t bufsiz);
+function ap_get_client_block(r: Prequest_rec; buffer: PAnsiChar; bufsiz: apr_size_t): cLong;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_client_block' + LibSuff12;
 
@@ -621,27 +621,27 @@ procedure ap_note_digest_auth_failure(r: Prequest_rec);
  * @param auth_type the configured auth_type
  * @return OK, DECLINED
  *}
-//AP_DECLARE_HOOK(int, note_auth_failure, (request_rec *r, const char *auth_type))
+//AP_DECLARE_HOOK(int, note_auth_failure, (request_rec *r, const AnsiChar *auth_type))
 (*macro expanded:
   typedef
-    int ap_HOOK_note_auth_failure_t (request_rec *r, const char *auth_type);
+    int ap_HOOK_note_auth_failure_t (request_rec *r, const AnsiChar *auth_type);
 
-    void ap_hook_note_auth_failure(ap_HOOK_note_auth_failure_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
-    int ap_run_note_auth_failure (request_rec *r, const char *auth_type);
+    void ap_hook_note_auth_failure(ap_HOOK_note_auth_failure_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
+    int ap_run_note_auth_failure (request_rec *r, const AnsiChar *auth_type);
     apr_array_header_t * ap_hook_get_note_auth_failure(void);
 
-  typedef struct ap_LINK_note_auth_failure_t { ap_HOOK_note_auth_failure_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_note_auth_failure_t;
+  typedef struct ap_LINK_note_auth_failure_t { ap_HOOK_note_auth_failure_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_note_auth_failure_t;
 *)
 type
   ap_HOOK_note_auth_failure_t = procedure(r: Prequest_rec); cdecl;
 
 procedure ap_hook_note_auth_failure(pf: ap_HOOK_note_auth_failure_t;
-                                            const aszPre, aszSucc: PPChar;
+                                            const aszPre, aszSucc: PPAnsiChar;
                                             nOrder: Integer);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_HOOK_note_auth_failure' + LibSuff16;
 
-procedure ap_run_note_auth_failure(r: Prequest_rec; auth_type: PChar);
+procedure ap_run_note_auth_failure(r: Prequest_rec; auth_type: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_run_note_auth_failure' + LibSuff8;
 
@@ -663,8 +663,8 @@ function ap_hook_get_note_auth_failure: Papr_array_header_t;
  *         it wasn't Basic (in which case, the caller should presumably
  *         decline as well).
  *}
-//AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
-function ap_get_basic_auth_pw(r: Prequest_rec; pw: PPChar): Integer;
+//AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const AnsiChar **pw);
+function ap_get_basic_auth_pw(r: Prequest_rec; pw: PPAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_get_basic_auth_pw' + LibSuff8;
 
@@ -677,8 +677,8 @@ function ap_get_basic_auth_pw(r: Prequest_rec; pw: PPChar): Integer;
  * @param r The current request
  * @param uri The uri to break apart
  *}
-//AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
-procedure ap_parse_uri(r: Prequest_rec; const uri: PChar);
+//AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const AnsiChar *uri);
+procedure ap_parse_uri(r: Prequest_rec; const uri: PAnsiChar);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_parse_uri' + LibSuff8;
 
@@ -692,8 +692,8 @@ procedure ap_parse_uri(r: Prequest_rec; const uri: PChar);
  *         n, if the line is too big to fit in the buffer
  *         -1 for miscellaneous errors
  *}
-//AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
-function ap_getline(s: PChar; n: Integer; r: Prequest_rec; fold: Integer): Integer;
+//AP_DECLARE(int) ap_getline(AnsiChar *s, int n, request_rec *r, int fold);
+function ap_getline(s: PAnsiChar; n: Integer; r: Prequest_rec; fold: Integer): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_getline' + LibSuff16;
 
@@ -720,7 +720,7 @@ function ap_getline(s: PChar; n: Integer; r: Prequest_rec; fold: Integer): Integ
  *         Other errors where appropriate
  *}
 //#if APR_CHARSET_EBCDIC
-//AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
+//AP_DECLARE(apr_status_t) ap_rgetline(AnsiChar **s, apr_size_t n,
 //                                     apr_size_t *read,
 //                                     request_rec *r, int fold,
 //                                     apr_bucket_brigade *bb);
@@ -730,11 +730,11 @@ function ap_getline(s: PChar; n: Integer; r: Prequest_rec; fold: Integer): Integ
 //#endif
 
 {** @see ap_rgetline *}
-//AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
+//AP_DECLARE(apr_status_t) ap_rgetline_core(AnsiChar **s, apr_size_t n,
 //                                          apr_size_t *read,
 //                                          request_rec *r, int fold,
 //                                          apr_bucket_brigade *bb);
-function ap_rgetline_core(s: PPChar; n: apr_size_t;
+function ap_rgetline_core(s: PPAnsiChar; n: apr_size_t;
                           read: Papr_size_t;
                           r: Prequest_rec; fold: Integer;
                           bb: apr_bucket_brigade): apr_status_t;
@@ -747,8 +747,8 @@ function ap_rgetline_core(s: PPChar; n: apr_size_t;
  * @param method A string containing a valid HTTP method
  * @return The method number
  *}
-//AP_DECLARE(int) ap_method_number_of(const char *method);
-function ap_method_number_of(const method: PChar): Integer;
+//AP_DECLARE(int) ap_method_number_of(const AnsiChar *method);
+function ap_method_number_of(const method: PAnsiChar): Integer;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_number_of' + LibSuff4;
 
@@ -759,8 +759,8 @@ function ap_method_number_of(const method: PChar): Integer;
  * @param methnum An integer value corresponding to an internal method number
  * @return The name corresponding to the method number
  *}
-//AP_DECLARE(const char *) ap_method_name_of(apr_pool_t *p, int methnum);
-function ap_method_name_of(p: Papr_pool_t; methnum: Integer): PChar;
+//AP_DECLARE(const AnsiChar *) ap_method_name_of(apr_pool_t *p, int methnum);
+function ap_method_name_of(p: Papr_pool_t; methnum: Integer): PAnsiChar;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_method_name_of' + LibSuff8;
 
@@ -783,21 +783,21 @@ function ap_method_name_of(p: Papr_pool_t; methnum: Integer): PChar;
     void ap_HOOK_pre_read_request_t (request_rec *r, conn_rec *c);
 
     void ap_hook_pre_read_request(ap_HOOK_pre_read_request_t *pf,
-                                  const char * const *aszPre,
-                                  const char * const *aszSucc,
+                                  const AnsiChar * const *aszPre,
+                                  const AnsiChar * const *aszSucc,
                                   int nOrder);
     void ap_run_pre_read_request (request_rec *r,
                                   conn_rec *c);
     apr_array_header_t * ap_hook_get_pre_read_request(void);
 
-  typedef struct ap_LINK_pre_read_request_t { ap_HOOK_pre_read_request_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_pre_read_request_t;
+  typedef struct ap_LINK_pre_read_request_t { ap_HOOK_pre_read_request_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_pre_read_request_t;
 *)
 type
    ap_HOOK_pre_read_request_t = function(r: Prequest_rec): Integer; cdecl;
 
 procedure ap_hook_pre_read_request(pf: ap_HOOK_pre_read_request_t;
-                                    const aszPre: PPChar;
-                                    const aszSucc: PPChar;
+                                    const aszPre: PPAnsiChar;
+                                    const aszSucc: PPAnsiChar;
                                     nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_pre_read_request' + LibSuff16;
@@ -829,20 +829,20 @@ function  ap_hook_get_pre_read_request: Papr_array_header_t;
     int ap_HOOK_post_read_request_t (request_rec *r);
 
     void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf,
-                                   const char * const *aszPre,
-                                   const char * const *aszSucc,
+                                   const AnsiChar * const *aszPre,
+                                   const AnsiChar * const *aszSucc,
                                    int nOrder);
     int ap_run_post_read_request (request_rec *r);
     apr_array_header_t * ap_hook_get_post_read_request(void);
 
-  typedef struct ap_LINK_post_read_request_t { ap_HOOK_post_read_request_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_post_read_request_t;
+  typedef struct ap_LINK_post_read_request_t { ap_HOOK_post_read_request_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_post_read_request_t;
 *)
 type
    ap_HOOK_post_read_request_t = function(r: Prequest_rec): Integer; cdecl;
 
 procedure ap_hook_post_read_request(pf: ap_HOOK_post_read_request_t;
-                                    const aszPre: PPChar;
-                                    const aszSucc: PPChar;
+                                    const aszPre: PPAnsiChar;
+                                    const aszSucc: PPAnsiChar;
                                     nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_post_read_request' + LibSuff16;
@@ -869,20 +869,20 @@ function  ap_hook_get_post_read_request: Papr_array_header_t;
     int ap_HOOK_log_transaction_t (request_rec *r);
 
     void ap_hook_log_transaction(ap_HOOK_log_transaction_t *pf,
-                                 const char * const *aszPre,
-                                 const char * const *aszSucc,
+                                 const AnsiChar * const *aszPre,
+                                 const AnsiChar * const *aszSucc,
                                  int nOrder);
     int ap_run_log_transaction (request_rec *r);
     apr_array_header_t * ap_hook_get_log_transaction(void);
 
-  typedef struct ap_LINK_log_transaction_t { ap_HOOK_log_transaction_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_log_transaction_t;
+  typedef struct ap_LINK_log_transaction_t { ap_HOOK_log_transaction_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_log_transaction_t;
 *)
 type
    ap_HOOK_log_transaction_t = function(r: Prequest_rec): Integer; cdecl;
 
 procedure ap_hook_log_transaction(pf: ap_HOOK_log_transaction_t;
-                                  const aszPre: PPChar;
-                                  const aszSucc: PPChar;
+                                  const aszPre: PPAnsiChar;
+                                  const aszSucc: PPAnsiChar;
                                   nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_log_transaction' + LibSuff16;
@@ -903,23 +903,23 @@ function  ap_hook_get_log_transaction: Papr_array_header_t;
  * @param r The current request
  * @return The http scheme from the request
  *}
-//AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
+//AP_DECLARE_HOOK(const AnsiChar *,http_scheme,(const request_rec *r))
 (*macro expanded:
   typedef
-    const char * ap_HOOK_http_scheme_t (const request_rec *r);
+    const AnsiChar * ap_HOOK_http_scheme_t (const request_rec *r);
 
-    void ap_hook_http_scheme(ap_HOOK_http_scheme_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
-    const char * ap_run_http_scheme (const request_rec *r);
+    void ap_hook_http_scheme(ap_HOOK_http_scheme_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
+    const AnsiChar * ap_run_http_scheme (const request_rec *r);
     apr_array_header_t * ap_hook_get_http_scheme(void);
 
-  typedef struct ap_LINK_http_scheme_t { ap_HOOK_http_scheme_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_http_scheme_t;
+  typedef struct ap_LINK_http_scheme_t { ap_HOOK_http_scheme_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_http_scheme_t;
 *)
 type
    ap_HOOK_http_scheme_t = function(r: Prequest_rec): Integer; cdecl;
 
 procedure ap_hook_http_scheme(pf: ap_HOOK_http_scheme_t;
-                              const aszPre: PPChar;
-                              const aszSucc: PPChar;
+                              const aszPre: PPAnsiChar;
+                              const aszSucc: PPAnsiChar;
                               nOrder: Integer);
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_hook_http_scheme' + LibSuff16;
@@ -944,18 +944,18 @@ function  ap_hook_get_http_scheme: Papr_array_header_t;
   typedef
     apr_port_t ap_HOOK_default_port_t (const request_rec *r);
 
-    void ap_hook_default_port(ap_HOOK_default_port_t *pf, const char * const *aszPre, const char * const *aszSucc, int nOrder);
+    void ap_hook_default_port(ap_HOOK_default_port_t *pf, const AnsiChar * const *aszPre, const AnsiChar * const *aszSucc, int nOrder);
     apr_port_t ap_run_default_port (const request_rec *r);
     apr_array_header_t * ap_hook_get_default_port(void);
 
-  typedef struct ap_LINK_default_port_t { ap_HOOK_default_port_t *pFunc; const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } ap_LINK_default_port_t;
+  typedef struct ap_LINK_default_port_t { ap_HOOK_default_port_t *pFunc; const AnsiChar *szName; const AnsiChar * const *aszPredecessors; const AnsiChar * const *aszSuccessors; int nOrder; } ap_LINK_default_port_t;
 *)
   type
      ap_HOOK_default_port_t = function(r: Prequest_rec): Integer; cdecl;
 
   procedure ap_hook_default_port(pf: ap_HOOK_default_port_t;
-                                 const aszPre: PPChar;
-                                 const aszSucc: PPChar;
+                                 const aszPre: PPAnsiChar;
+                                 const aszSucc: PPAnsiChar;
                                  nOrder: Integer);
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_hook_default_port' + LibSuff16;
@@ -990,7 +990,7 @@ type
     {** The error code *}
     status: Integer;
     {** The error string *}
-    data: PChar;
+    data: PAnsiChar;
   end;
 
 {** @see ap_bucket_type_error *}
@@ -1012,9 +1012,9 @@ type
  * @return The new bucket, or NULL if allocation failed
  *}
 //AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
-//                const char *buf, apr_pool_t *p);
+//                const AnsiChar *buf, apr_pool_t *p);
 function ap_bucket_error_make(b: Papr_bucket; error: Integer;
-                              const buf: PChar; p: Papr_pool_t): Papr_bucket;
+                              const buf: PAnsiChar; p: Papr_pool_t): Papr_bucket;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
   external LibHTTPD name LibNamePrefix + 'ap_bucket_error_make' + LibSuff16;
 
@@ -1026,10 +1026,10 @@ function ap_bucket_error_make(b: Papr_bucket; error: Integer;
  * @param list The bucket allocator from which to allocate the bucket
  * @return The new bucket, or NULL if allocation failed
  *}
-//AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
+//AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const AnsiChar *buf,
 //                                                apr_pool_t *p,
 //                                                apr_bucket_alloc_t *list);
-function ap_bucket_error_create(error: Integer; const buf: PChar;
+function ap_bucket_error_create(error: Integer; const buf: PAnsiChar;
                                 p: Papr_pool_t;
                                 list: Papr_bucket_alloc_t): Papr_bucket;
   {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}

+ 142 - 142
packages/httpd24/src/httpd.inc

@@ -352,7 +352,7 @@ const
         major : Integer;
         minor : Integer;
         patch : Integer;
-        add_string : PChar;
+        add_string : PAnsiChar;
       end;
 
   {*
@@ -371,7 +371,7 @@ const
    * ServerTokens directive.
    * @return The server banner
     }
-  function ap_get_server_banner: PChar;
+  function ap_get_server_banner: PAnsiChar;
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_get_server_revision' + LibSuff0;
 
@@ -382,7 +382,7 @@ const
    * by the ServerTokens directive.
    * @return The server description
     }
-  function ap_get_server_description: PChar;
+  function ap_get_server_description: PAnsiChar;
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_get_server_revision' + LibSuff0;
 
@@ -391,7 +391,7 @@ const
    * @param pconf The pool to allocate the component from
    * @param component The string to add
     }
-  procedure ap_add_version_component(pconf: Papr_pool_t; const component: PChar);
+  procedure ap_add_version_component(pconf: Papr_pool_t; const component: PAnsiChar);
    {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    external LibHTTPD name LibNamePrefix + 'ap_add_version_component' + LibSuff8;
 
@@ -399,7 +399,7 @@ const
    * Get the date a time that the server was built
    * @return The server build time string
     }
-  function ap_get_server_built: PChar;
+  function ap_get_server_built: PAnsiChar;
     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
     external LibHTTPD name LibNamePrefix + 'ap_get_server_built' + LibSuff0;
 
@@ -679,7 +679,7 @@ const
     Phtaccess_result = ^htaccess_result;
     htaccess_result = record
   {* the directory to which this applies  }
-        dir : Pchar;
+        dir : PAnsiChar;
   {* the overrides allowed for the .htaccess file  }
         override : Integer;
   {* the override options allowed for the .htaccess file  }
@@ -712,9 +712,9 @@ const
     {* Configuration pool. Cleared upon restart  }
           pconf : Papr_pool_t;
     {* The program name used to execute the program  }
-          short_name : PChar;
+          short_name : PAnsiChar;
     {* The command line arguments  }
-          argv : PChar;
+          argv : PAnsiChar;
     {* Number of command line arguments passed to the program  }
           argc : Integer;
       end;
@@ -729,7 +729,7 @@ const
 {* The next server in the list  }
       next : Pserver_addr_rec;
 {* The name given in "<VirtualHost>"  }
-      virthost : Pchar;
+      virthost : PAnsiChar;
 {* The bound address, for this server  }
       host_addr : Papr_sockaddr_t;
 {* The bound port, for this server  }
@@ -739,7 +739,7 @@ const
   Pap_logconf = ^ap_logconf;
   ap_logconf = record
 {* The per-module log levels  }
-      module_levels : ^char;
+      module_levels : ^AnsiChar;
 {* The log level for this server  }
       level : longint;
     end;
@@ -758,7 +758,7 @@ const
 { Log files --- note that transfer log is now in the modules...  }
 
 {* The name of the error log  }
-      error_fname : Pchar;
+      error_fname : PAnsiChar;
 {* A file descriptor that references the error log  }
       error_log : Papr_file_t;
 {* The log level configuration  }
@@ -772,25 +772,25 @@ const
 {* MIME type info, etc., before we start checking per-directory info  }
       lookup_defaults : Pap_conf_vector_t;
 {* The name of the server  }
-      defn_name : Pchar;
+      defn_name : PAnsiChar;
 {* The line of the config file that the server was defined on  }
       defn_line_number : dword;
 {* true if this is the virtual server  }
-      is_virtual : char;
+      is_virtual : AnsiChar;
 
 { Information for redirects  }
 
 {* for redirects, etc.  }
       port : apr_port_t;
 {* The server request scheme for redirect responses  }
-      server_scheme : Pchar;
+      server_scheme : PAnsiChar;
 
 { Contact information  }
 
 {* The admin's contact information  }
-      server_admin : Pchar;
+      server_admin : PAnsiChar;
 {* The server hostname  }
-      server_hostname : Pchar;
+      server_hostname : PAnsiChar;
 
 { Transaction handling  }
 
@@ -811,7 +811,7 @@ const
       wild_names : Papr_array_header_t;
 
 {* Pathname for ServerPath  }
-      path : Pchar;
+      path : PAnsiChar;
 {* Length of path  }
       pathlen : Integer;
 
@@ -873,19 +873,19 @@ const
   {* Client's IP address; this is the end-point of the next hop, for the
    *  IP of the request creator, see useragent_ip in request_rec
    }
-        remote_ip {client_ip} : Pchar;               //fpc -> renamed to stay compatible with older apache versions and older fcl-web
+        remote_ip {client_ip} : PAnsiChar;               //fpc -> renamed to stay compatible with older apache versions and older fcl-web
   {* Client's DNS name, if known.  NULL if DNS hasn't been checked,
    *  "" if it has and no address was found.  N.B. Only access this though
    * get_remote_host()  }
-        remote_host : Pchar;
+        remote_host : PAnsiChar;
   {* Only ever set if doing rfc1413 lookups.  N.B. Only access this through
    *  get_remote_logname()  }
-        remote_logname : Pchar;
+        remote_logname : PAnsiChar;
   {* server IP address  }
-        local_ip : Pchar;
+        local_ip : PAnsiChar;
   {* used for ap_get_server_name when UseCanonicalName is set to DNS
    *  (ignores setting of HostnameLookups)  }
-        local_host : Pchar;
+        local_host : PAnsiChar;
   {* ID of this connection; unique at any point in time  }
         id : clong;
   {* Config vector containing pointers to connections per-server
@@ -928,7 +928,7 @@ const
   {* Id to identify this connection in error log. Set when the first
    *  error log entry for this connection is generated.
    }
-        log_id : Pchar;
+        log_id : PAnsiChar;
   {* This points to the current thread being used to process this request,
    * over the lifetime of a request, the value may change. Users of the connection
    * record should not rely upon it staying the same between calls that invole
@@ -959,7 +959,7 @@ const
 
   { Info about the request itself... we begin with stuff that only protocol.c should ever touch...  }
   {* First line of request  }
-        the_request : Pchar;
+        the_request : PAnsiChar;
   {* HTTP/0.9, "simple" request (e.g. GET /foo\n w/no headers)  }
         assbackwards : Integer;
   {* A proxy request (calculated during post_read_request/translate_name)
@@ -972,13 +972,13 @@ const
   {* Protocol version number of protocol; 1.1 = 1001  }
         proto_num : Integer;
   {* Protocol string, as given to us, or HTTP/0.9  }
-        protocol : Pchar;
+        protocol : PAnsiChar;
   {* Host, as set by full URI or Host:  }
-        hostname : Pchar;
+        hostname : PAnsiChar;
   {* Time when the request started  }
         request_time : apr_time_t;
   {* Status line, if set by script  }
-        status_line : Pchar;
+        status_line : PAnsiChar;
   {* Status line  }
         status : Integer;
   { Request method, two ways; also, protocol, etc..  Outside of protocol.c,
@@ -987,7 +987,7 @@ const
   {* M_GET, M_POST, etc.  }
         method_number : Integer;
   {* Request method (eg. GET, HEAD, POST, etc.)  }
-        method : Pchar;
+        method : PAnsiChar;
 
   {*
    *  'allowed' is a bitvector of the allowed methods.
@@ -1022,7 +1022,7 @@ const
         mtime : apr_time_t;
   { HTTP/1.1 connection-level features  }
   {* The Range: header  }
-        range : Pchar;
+        range : PAnsiChar;
   {* The "real" content length  }
         clength : apr_off_t;
   {* sending chunked transfer-coding  }
@@ -1074,36 +1074,36 @@ const
   * they should not be modified in place.
   }
   {* The content-type for the current request  }
-        content_type : Pchar;	{ Break these out --- we dispatch on 'em  }
+        content_type : PAnsiChar;	{ Break these out --- we dispatch on 'em  }
   {* The handler string that we use to call a handler function  }
-        handler : Pchar;	{ What we *really* dispatch on  }
+        handler : PAnsiChar;	{ What we *really* dispatch on  }
   {* How to encode the data  }
-        content_encoding : Pchar;
+        content_encoding : PAnsiChar;
   {* Array of strings representing the content languages  }
         content_languages : Papr_array_header_t;
   {* variant list validator (if negotiated)  }
-        vlist_validator : Pchar;
+        vlist_validator : PAnsiChar;
   {* If an authentication check was made, this gets set to the user name.  }
-        user : Pchar;
+        user : PAnsiChar;
   {* If an authentication check was made, this gets set to the auth type.  }
-        ap_auth_type : Pchar;
+        ap_auth_type : PAnsiChar;
 
   { What object is being requested (either directly, or via include
        * or content-negotiation mapping).
         }
   {* The URI without any parsing performed  }
-        unparsed_uri : Pchar;
+        unparsed_uri : PAnsiChar;
   {* The path portion of the URI, or "/" if no path provided  }
-        uri : Pchar;
+        uri : PAnsiChar;
   {* The filename on disk corresponding to this response  }
-        filename : Pchar;
+        filename : PAnsiChar;
   { XXX: What does this mean? Please define "canonicalize" -aaron  }
   {* The true filename, we canonicalize r->filename if these don't match  }
-        canonical_filename : Pchar;
+        canonical_filename : PAnsiChar;
   {* The PATH_INFO extracted from this request  }
-        path_info : Pchar;
+        path_info : PAnsiChar;
   {* The QUERY_ARGS extracted from this request  }
-        args : Pchar;
+        args : PAnsiChar;
 
   {*
    * Flag for the handler to accept or reject path_info on
@@ -1132,7 +1132,7 @@ const
   {* Id to identify request in access and error log. Set when the first
    *  error log entry for this request is generated.
    }
-        log_id : Pchar;
+        log_id : PAnsiChar;
   {*
    * A linked list of the .htaccess configuration directives
    * accessed by this request.
@@ -1167,7 +1167,7 @@ const
    * This is the address that originated the request.
    }
         useragent_addr : Papr_sockaddr_t;
-        useragent_ip : Pchar;
+        useragent_ip : PAnsiChar;
       end;
 
   {*
@@ -1211,7 +1211,7 @@ const
    * @note For resources that do not map to the file system or for very complex
    * mappings, this information may still be wrong.
     }
-function ap_context_document_root(r: Prequest_rec): PChar;
+function ap_context_document_root(r: Prequest_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_context_document_root' + LibSuff4;
 
@@ -1220,7 +1220,7 @@ function ap_context_document_root(r: Prequest_rec): PChar;
    * maps to the context_document_root on disk.
    * @param r The request
     }
-function ap_context_prefix(r: Prequest_rec): PChar;
+function ap_context_prefix(r: Prequest_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_context_prefix' + LibSuff4;
 
@@ -1232,7 +1232,7 @@ function ap_context_prefix(r: Prequest_rec): PChar;
    * @note If one of prefix of document_root is NULL, the corrsponding
    * property will not be changed.
     }
-procedure ap_set_context_info(r: Prequest_rec; const prefix, document_root: PChar);
+procedure ap_set_context_info(r: Prequest_rec; const prefix, document_root: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_set_context_info' + LibSuff12;
 
@@ -1241,7 +1241,7 @@ procedure ap_set_context_info(r: Prequest_rec; const prefix, document_root: PCha
    * @param r The request
    * @param document_root the document root for the request.
     }
-procedure ap_set_document_root(r: Prequest_rec; const document_root: PChar);
+procedure ap_set_document_root(r: Prequest_rec; const document_root: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_set_document_root' + LibSuff8;
 
@@ -1252,7 +1252,7 @@ procedure ap_set_document_root(r: Prequest_rec; const document_root: PChar);
    * @param intype The field to examine
    * @return A copy of the field minus any parameters
     }
-function ap_field_noparam(p: Papr_pool_t; const intype: PChar): PChar;
+function ap_field_noparam(p: Papr_pool_t; const intype: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_field_noparam' + LibSuff8;
 
@@ -1264,14 +1264,14 @@ function ap_field_noparam(p: Papr_pool_t; const intype: PChar): PChar;
    * @param gmt Convert the time for GMT?
    * @return The string that represents the specified time
     }
-function ap_ht_time(p: Papr_pool_t; t: apr_time_t; const fmt: PChar; gmt: Integer): PChar;
+function ap_ht_time(p: Papr_pool_t; t: apr_time_t; const fmt: PAnsiChar; gmt: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_ht_time' + LibSuff20;
 
 
-  { String handling. The *_nc variants allow you to use non-const char **s as
-     arguments (unfortunately C won't automatically convert a char ** to a const
-     char **)  }
+  { String handling. The *_nc variants allow you to use non-const AnsiChar **s as
+     arguments (unfortunately C won't automatically convert a AnsiChar ** to a const
+     AnsiChar **)  }
   {*
    * Get the characters until the first occurance of a specified character
    * @param p The pool to allocate memory from
@@ -1279,7 +1279,7 @@ function ap_ht_time(p: Papr_pool_t; t: apr_time_t; const fmt: PChar; gmt: Intege
    * @param stop The character to stop at
    * @return A copy of the characters up to the first stop character
     }
-function ap_getword(p: Papr_pool_t; const line: PPChar; stop: Char): PChar;
+function ap_getword(p: Papr_pool_t; const line: PPAnsiChar; stop: AnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword' + LibSuff12;
 
@@ -1289,9 +1289,9 @@ function ap_getword(p: Papr_pool_t; const line: PPChar; stop: Char): PChar;
    * @param line The string to get the characters from
    * @param stop The character to stop at
    * @return A copy of the characters up to the first stop character
-   * @note This is the same as ap_getword(), except it doesn't use const char **.
+   * @note This is the same as ap_getword(), except it doesn't use const AnsiChar **.
     }
-function ap_getword_nc(p: Papr_pool_t; line: PPChar; stop: Char): PChar;
+function ap_getword_nc(p: Papr_pool_t; line: PPAnsiChar; stop: AnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_nc' + LibSuff12;
 
@@ -1302,7 +1302,7 @@ function ap_getword_nc(p: Papr_pool_t; line: PPChar; stop: Char): PChar;
    * @param line The string to traverse
    * @return The first word in the line
     }
-function ap_getword_white(p: Papr_pool_t; const line: PPChar): PChar;
+function ap_getword_white(p: Papr_pool_t; const line: PPAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_white' + LibSuff8;
 
@@ -1312,9 +1312,9 @@ function ap_getword_white(p: Papr_pool_t; const line: PPChar): PChar;
    * @param p The pool to allocate memory from
    * @param line The string to traverse
    * @return The first word in the line
-   * @note The same as ap_getword_white(), except it doesn't use const char**
+   * @note The same as ap_getword_white(), except it doesn't use const AnsiChar**
     }
-function ap_getword_white_nc(p: Papr_pool_t; line: PPChar): PChar;
+function ap_getword_white_nc(p: Papr_pool_t; line: PPAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_white_nc' + LibSuff8;
 
@@ -1326,7 +1326,7 @@ function ap_getword_white_nc(p: Papr_pool_t; line: PPChar): PChar;
    * @return A copy of all caracters after the first occurance of the specified
    *         character
     }
-function ap_getword_nulls(p: Papr_pool_t; const line: PPChar; stop: Char): PChar;
+function ap_getword_nulls(p: Papr_pool_t; const line: PPAnsiChar; stop: AnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_nulls' + LibSuff12;
 
@@ -1337,9 +1337,9 @@ function ap_getword_nulls(p: Papr_pool_t; const line: PPChar; stop: Char): PChar
    * @param stop The character to start at
    * @return A copy of all caracters after the first occurance of the specified
    *         character
-   * @note The same as ap_getword_nulls(), except it doesn't use const char **.
+   * @note The same as ap_getword_nulls(), except it doesn't use const AnsiChar **.
     }
-function ap_getword_nulls_nc(p: Papr_pool_t; line: PPChar; stop: Char): PChar;
+function ap_getword_nulls_nc(p: Papr_pool_t; line: PPAnsiChar; stop: AnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_nulls_nc' + LibSuff12;
 
@@ -1349,7 +1349,7 @@ function ap_getword_nulls_nc(p: Papr_pool_t; line: PPChar; stop: Char): PChar;
    * @param line The line to traverse
    * @return A copy of the string
     }
-function ap_getword_conf(p: Papr_pool_t; const line: PPChar): PChar;
+function ap_getword_conf(p: Papr_pool_t; const line: PPAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_conf' + LibSuff8;
 
@@ -1358,9 +1358,9 @@ function ap_getword_conf(p: Papr_pool_t; const line: PPChar): PChar;
    * @param p The pool to allocate from
    * @param line The line to traverse
    * @return A copy of the string
-   * @note The same as ap_getword_conf(), except it doesn't use const char **.
+   * @note The same as ap_getword_conf(), except it doesn't use const AnsiChar **.
     }
-function ap_getword_conf_nc(p: Papr_pool_t; line: PPChar): PChar;
+function ap_getword_conf_nc(p: Papr_pool_t; line: PPAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getword_conf_nc' + LibSuff8;
 
@@ -1374,8 +1374,8 @@ function ap_getword_conf_nc(p: Papr_pool_t; line: PPChar): PChar;
    * @param word The string to check
    * @return The string with the replaced environment variables
     }
-//AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
-function ap_resolve_env(p: Papr_pool_t; const word_: PChar): PChar;
+//AP_DECLARE(const AnsiChar *) ap_resolve_env(apr_pool_t *p, const AnsiChar * word);
+function ap_resolve_env(p: Papr_pool_t; const word_: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_resolve_env' + LibSuff8;
 
@@ -1388,8 +1388,8 @@ function ap_resolve_env(p: Papr_pool_t; const word_: PChar): PChar;
    * address of field is shifted to the next non-comma, non-whitespace
    * character.  len is the length of the item excluding any beginning whitespace.
     }
-//AP_DECLARE(const char *) ap_size_list_item(const char **field, int *len);
-function ap_size_list_item(const field: PPChar; len: PInteger): PChar;
+//AP_DECLARE(const AnsiChar *) ap_size_list_item(const AnsiChar **field, int *len);
+function ap_size_list_item(const field: PPAnsiChar; len: PInteger): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_size_list_item' + LibSuff8;
 
@@ -1403,7 +1403,7 @@ function ap_size_list_item(const field: PPChar; len: PInteger): PChar;
    *         item (or NULL if none) and the address pointed to by field is
    *         shifted to the next non-comma, non-whitespace.
     }
-function ap_get_list_item(p: Papr_pool_t; const field: PPChar): PChar;
+function ap_get_list_item(p: Papr_pool_t; const field: PPAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_get_list_item' + LibSuff8;
 
@@ -1415,7 +1415,7 @@ function ap_get_list_item(p: Papr_pool_t; const field: PPChar): PChar;
    * @param tok The token to search for
    * @return 1 if found, 0 if not found.
     }
-function ap_find_list_item(p: Papr_pool_t; const line, tok: PChar): Integer;
+function ap_find_list_item(p: Papr_pool_t; const line, tok: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_list_item' + LibSuff12;
 
@@ -1429,7 +1429,7 @@ function ap_find_list_item(p: Papr_pool_t; const line, tok: PChar): Integer;
    * @param accept_white Is it delimited by whitespace
    * @return the token
     }
-function ap_get_token(p: Papr_pool_t; const accept_line: PPChar; accept_white: Integer): PChar;
+function ap_get_token(p: Papr_pool_t; const accept_line: PPAnsiChar; accept_white: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_get_token' + LibSuff12;
 
@@ -1440,7 +1440,7 @@ function ap_get_token(p: Papr_pool_t; const accept_line: PPChar; accept_white: I
    * @param tok The token to find
    * @return 1 if the token is found, 0 otherwise
     }
-function ap_find_token(p: Papr_pool_t; const line, tok: PChar): Integer;
+function ap_find_token(p: Papr_pool_t; const line, tok: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_token' + LibSuff12;
 
@@ -1451,7 +1451,7 @@ function ap_find_token(p: Papr_pool_t; const line, tok: PChar): Integer;
    * @param tok The token to find
    * @return 1 if the token is found, 0 otherwise
     }
-function ap_find_last_token(p: Papr_pool_t; const line, tok: PChar): Integer;
+function ap_find_last_token(p: Papr_pool_t; const line, tok: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_find_last_token' + LibSuff12;
 
@@ -1460,7 +1460,7 @@ function ap_find_last_token(p: Papr_pool_t; const line, tok: PChar): Integer;
    * @param u The string to check
    * @return 1 if URI, 0 otherwise
     }
-function ap_is_url(const u: PChar): Integer;
+function ap_is_url(const u: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_is_url' + LibSuff4;
 
@@ -1469,7 +1469,7 @@ function ap_is_url(const u: PChar): Integer;
    * @param url The string to unescape
    * @return 0 on success, non-zero otherwise
     }
-function ap_unescape_all(url: PChar): Integer;
+function ap_unescape_all(url: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_unescape_all' + LibSuff4;
 
@@ -1478,7 +1478,7 @@ function ap_unescape_all(url: PChar): Integer;
    * @param url The url to unescape
    * @return 0 on success, non-zero otherwise
     }
-function ap_unescape_url(url: PChar): Integer;
+function ap_unescape_url(url: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_unescape_url' + LibSuff4;
 
@@ -1488,7 +1488,7 @@ function ap_unescape_url(url: PChar): Integer;
    * @param decode_slashes Whether or not slashes should be decoded
    * @return 0 on success, non-zero otherwise
     }
-function ap_unescape_url_keep2f(url: PChar; decode_slashes: Integer): Integer;
+function ap_unescape_url_keep2f(url: PAnsiChar; decode_slashes: Integer): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_unescape_url_keep2f' + LibSuff8;
 
@@ -1497,7 +1497,7 @@ function ap_unescape_url_keep2f(url: PChar; decode_slashes: Integer): Integer;
    * @param query The query to unescape
    * @return 0 on success, non-zero otherwise
     }
-function ap_unescape_urlencoded(query: PChar): Integer;
+function ap_unescape_urlencoded(query: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_unescape_urlencoded' + LibSuff4;
 
@@ -1505,7 +1505,7 @@ function ap_unescape_urlencoded(query: PChar): Integer;
    * Convert all double slashes to single slashes
    * @param name The string to convert
     }
-procedure ap_no2slash(name: PChar);
+procedure ap_no2slash(name: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_no2slash' + LibSuff4;
 
@@ -1514,7 +1514,7 @@ procedure ap_no2slash(name: PChar);
    * any leading ../ or /../ substrings.
    * @param name the file name to parse
     }
-procedure ap_getparents(name: PChar);
+procedure ap_getparents(name: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_getparents' + LibSuff4;
 
@@ -1524,7 +1524,7 @@ procedure ap_getparents(name: PChar);
    * @param s The path to convert
    * @return The converted URL
     }
-function ap_escape_path_segment(p: Papr_pool_t; const s: PChar): PChar;
+function ap_escape_path_segment(p: Papr_pool_t; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_path_segment' + LibSuff8;
 
@@ -1534,7 +1534,7 @@ function ap_escape_path_segment(p: Papr_pool_t; const s: PChar): PChar;
    * @param s The path to convert
    * @return The converted URL (c)
     }
-function ap_escape_path_segment_buffer(c: PChar; const s: PChar): PChar;
+function ap_escape_path_segment_buffer(c: PAnsiChar; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_path_segment_buffer' + LibSuff8;
 
@@ -1546,7 +1546,7 @@ function ap_escape_path_segment_buffer(c: PChar; const s: PChar): PChar;
    *        with a '/' in it (and thus does not prefix "./")
    * @return The converted URL
     }
-function ap_os_escape_path(p: Papr_pool_t; const path: PChar; partial: Integer): PChar;
+function ap_os_escape_path(p: Papr_pool_t; const path: PAnsiChar; partial: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_os_escape_path' + LibSuff12;
 
@@ -1556,7 +1556,7 @@ function ap_os_escape_path(p: Papr_pool_t; const path: PChar; partial: Integer):
   { argument types are unknown }
   { return type might be wrong }   
 //#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
-function ap_escape_uri(ppool: Papr_pool_t; const path: PChar) : PChar;  
+function ap_escape_uri(ppool: Papr_pool_t; const path: PAnsiChar) : PAnsiChar;  
 
 {*
  * Escape a string as application/x-www-form-urlencoded
@@ -1564,7 +1564,7 @@ function ap_escape_uri(ppool: Papr_pool_t; const path: PChar) : PChar;
  * @param s The path to convert
  * @return The converted URL
   }
-function ap_escape_urlencoded(p: Papr_pool_t; const s: PChar): PChar;
+function ap_escape_urlencoded(p: Papr_pool_t; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_urlencoded' + LibSuff8;
 
@@ -1574,7 +1574,7 @@ function ap_escape_urlencoded(p: Papr_pool_t; const s: PChar): PChar;
  * @param s The path to convert
  * @return The converted URL (c)
   }
-function ap_escape_urlencoded_buffer(c: PChar; const s: PChar): PChar;
+function ap_escape_urlencoded_buffer(c: PAnsiChar; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_urlencoded_buffer' + LibSuff8;
 
@@ -1585,7 +1585,7 @@ function ap_escape_urlencoded_buffer(c: PChar; const s: PChar): PChar;
  * @return The escaped string
   }
 //#define ap_escape_html(p,s) ap_escape_html2(p,s,0)
-function ap_escape_html(p: Papr_pool_t; const s: PChar) : PChar;
+function ap_escape_html(p: Papr_pool_t; const s: PAnsiChar) : PAnsiChar;
 
 {*
  * Escape an html string
@@ -1594,7 +1594,7 @@ function ap_escape_html(p: Papr_pool_t; const s: PChar) : PChar;
  * @param toasc Whether to escape all non-ASCII chars to \&\#nnn;
  * @return The escaped string
   }
-function ap_escape_html2(p: Papr_pool_t; const s: PChar; toasc: Integer): PChar;
+function ap_escape_html2(p: Papr_pool_t; const s: PAnsiChar; toasc: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_html2' + LibSuff12;
 
@@ -1604,7 +1604,7 @@ function ap_escape_html2(p: Papr_pool_t; const s: PChar; toasc: Integer): PChar;
  * @param str The string to escape
  * @return The escaped string
   }
-function ap_escape_logitem(p: Papr_pool_t; const str: PChar): PChar;
+function ap_escape_logitem(p: Papr_pool_t; const str: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_logitem' + LibSuff8;
 
@@ -1615,7 +1615,7 @@ function ap_escape_logitem(p: Papr_pool_t; const str: PChar): PChar;
  * @param buflen The buffer size for the escaped string (including "\0")
  * @return The len of the escaped string (always < maxlen)
   }
-function ap_escape_errorlog_item(dest: PChar; const source: PChar;
+function ap_escape_errorlog_item(dest: PAnsiChar; const source: PAnsiChar;
  buflen: apr_size_t): apr_size_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_errorlog_item' + LibSuff12;
@@ -1628,8 +1628,8 @@ function ap_escape_errorlog_item(dest: PChar; const source: PChar;
  * @param r The current request
  * @return The server's hostname
   }
-function ap_construct_server(p: Papr_pool_t; const hostname: PChar;
- port: apr_port_t; const r: Prequest_rec): PChar;
+function ap_construct_server(p: Papr_pool_t; const hostname: PAnsiChar;
+ port: apr_port_t; const r: Prequest_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_construct_server' + LibSuff16;
 
@@ -1639,7 +1639,7 @@ function ap_construct_server(p: Papr_pool_t; const hostname: PChar;
  * @param s The command to escape
  * @return The escaped shell command
   }
-function ap_escape_shell_cmd(p: Papr_pool_t; const s: PChar): PChar;
+function ap_escape_shell_cmd(p: Papr_pool_t; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_shell_cmd' + LibSuff8;
 
@@ -1648,7 +1648,7 @@ function ap_escape_shell_cmd(p: Papr_pool_t; const s: PChar): PChar;
  * @param path The path to count
  * @return The number of directories
   }
-function ap_count_dirs(const path: PChar): Integer;
+function ap_count_dirs(const path: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_count_dirs' + LibSuff4;
 
@@ -1663,7 +1663,7 @@ function ap_count_dirs(const path: PChar): Integer;
  * @note on platforms with drive letters, n = 0 returns the "/" root,
  * whereas n = 1 returns the "d:/" root.  On all other platforms, n = 0
  * returns the empty string.   }
-function ap_make_dirstr_prefix(d: PChar; const s: PChar; n: Integer): PChar;
+function ap_make_dirstr_prefix(d: PAnsiChar; const s: PAnsiChar; n: Integer): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_make_dirstr_prefix' + LibSuff12;
 
@@ -1674,7 +1674,7 @@ function ap_make_dirstr_prefix(d: PChar; const s: PChar; n: Integer): PChar;
  * @param s The file to get the parent of
  * @return A copy of the file's parent directory
   }
-function ap_make_dirstr_parent(p: Papr_pool_t; const s: PChar): PChar;
+function ap_make_dirstr_parent(p: Papr_pool_t; const s: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_make_dirstr_parent' + LibSuff8;
 
@@ -1690,7 +1690,7 @@ function ap_make_dirstr_parent(p: Papr_pool_t; const s: PChar): PChar;
  * names that need to remain canonical, unless you are merging an apr_dir_read
  * path and returned filename.  Otherwise, the result is not canonical.
   }
-function ap_make_full_path(a: Papr_pool_t; const dir, f: PChar): PChar;
+function ap_make_full_path(a: Papr_pool_t; const dir, f: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_make_full_path' + LibSuff12;
 
@@ -1702,7 +1702,7 @@ function ap_make_full_path(a: Papr_pool_t; const dir, f: PChar): PChar;
  * multiple forms of absolute paths.  This only reports if the path is absolute
  * in a canonical sense.
   }
-function ap_os_is_path_absolute(p: Papr_pool_t; const dir: PChar): Integer;
+function ap_os_is_path_absolute(p: Papr_pool_t; const dir: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_os_is_path_absolute' + LibSuff8;
 
@@ -1713,7 +1713,7 @@ function ap_os_is_path_absolute(p: Papr_pool_t; const dir: PChar): Integer;
  * @param str The string to check
  * @return 1 if the string has wildcards, 0 otherwise
   }
-function ap_is_matchexp(const str: PChar): Integer;
+function ap_is_matchexp(const str: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_is_matchexp' + LibSuff4;
 
@@ -1723,7 +1723,7 @@ function ap_is_matchexp(const str: PChar): Integer;
  * @param expected The pattern to match against
  * @return 0 if the two strings match, 1 otherwise
   }
-function ap_strcmp_match(const str, expected: PChar): Integer;
+function ap_strcmp_match(const str, expected: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_strcmp_match' + LibSuff8;
 
@@ -1734,7 +1734,7 @@ function ap_strcmp_match(const str, expected: PChar): Integer;
  * @param expected The pattern to match against
  * @return 0 if the two strings match, 1 otherwise
   }
-function ap_strcasecmp_match(const str, expected: PChar): Integer;
+function ap_strcasecmp_match(const str, expected: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_strcasecmp_match' + LibSuff8;
 
@@ -1745,7 +1745,7 @@ function ap_strcasecmp_match(const str, expected: PChar): Integer;
  * @return A pointer to the beginning of the substring
  * @remark See apr_strmatch() for a faster alternative
   }
-function ap_strcasestr(const s1, s2: PChar): PChar;
+function ap_strcasestr(const s1, s2: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_strcasestr' + LibSuff8;
 
@@ -1755,7 +1755,7 @@ function ap_strcasestr(const s1, s2: PChar): PChar;
  * @param prefix The prefix to strip away
  * @return A pointer relative to bigstring after prefix
   }
-function ap_stripprefix(const bigstring, prefix: PChar): PChar;
+function ap_stripprefix(const bigstring, prefix: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_stripprefix' + LibSuff8;
 
@@ -1765,7 +1765,7 @@ function ap_stripprefix(const bigstring, prefix: PChar): PChar;
  * @param bufcoded The encoded string
  * @return The decoded string
   }
-function ap_pbase64decode(p: Papr_pool_t; const bufcoded: PChar): PChar;
+function ap_pbase64decode(p: Papr_pool_t; const bufcoded: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pbase64decode' + LibSuff8;
 
@@ -1775,8 +1775,8 @@ function ap_pbase64decode(p: Papr_pool_t; const bufcoded: PChar): PChar;
  * @param string The plaintext string
  * @return The encoded string
   }
-//AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
-function ap_pbase64encode(p: Papr_pool_t; string_: PChar): PChar;
+//AP_DECLARE(AnsiChar *) ap_pbase64encode(apr_pool_t *p, AnsiChar *string);
+function ap_pbase64encode(p: Papr_pool_t; string_: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pbase64encode' + LibSuff8;
 
@@ -1793,7 +1793,7 @@ function ap_pbase64encode(p: Papr_pool_t; string_: PChar): PChar;
  *   @li REG_NEWLINE  - Match-any-character operators don't match new-line
  * @return The compiled regular expression
   }
-function ap_pregcomp(p: Papr_pool_t; const pattern: PChar; cflags: Integer): Pap_regex_t;
+function ap_pregcomp(p: Papr_pool_t; const pattern: PAnsiChar; cflags: Integer): Pap_regex_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pregcomp' + LibSuff12;
 
@@ -1821,11 +1821,11 @@ procedure ap_pregfree(p: Papr_pool_t; reg: Pap_regex_t);
  * @param pmatch the pmatch array returned from ap_pregex
  * @return The substituted string, or NULL on error
   }
-//AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
-//                              const char *source, apr_size_t nmatch,
+//AP_DECLARE(AnsiChar *) ap_pregsub(apr_pool_t *p, const AnsiChar *input,
+//                              const AnsiChar *source, apr_size_t nmatch,
 //                              ap_regmatch_t pmatch[]);
-function ap_pregsub(p: Papr_pool_t; const input, source: PChar;
- nmatch: apr_size_t; pmatch: array of ap_regmatch_t): PChar;
+function ap_pregsub(p: Papr_pool_t; const input, source: PAnsiChar;
+ nmatch: apr_size_t; pmatch: array of ap_regmatch_t): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pregsub' + LibSuff20;
 
@@ -1843,12 +1843,12 @@ function ap_pregsub(p: Papr_pool_t; const input, source: PChar;
  * @param maxlen the maximum string length to return, 0 for unlimited
  * @return The substituted string, or NULL on error
   }
-//AP_DECLARE(apr_status_t) ap_pregsub_ex(apr_pool_t *p, char **result,
-//                                       const char *input, const char *source,
+//AP_DECLARE(apr_status_t) ap_pregsub_ex(apr_pool_t *p, AnsiChar **result,
+//                                       const AnsiChar *input, const AnsiChar *source,
 //                                       apr_size_t nmatch,
 //                                       ap_regmatch_t pmatch[],
 //                                       apr_size_t maxlen);
-function ap_pregsub_ex(p: Papr_pool_t; result_: PPChar; const input, source: PChar;
+function ap_pregsub_ex(p: Papr_pool_t; result_: PPAnsiChar; const input, source: PAnsiChar;
                                        nmatch: apr_size_t;
                                        pmatch: array of ap_regmatch_t;
                                        maxlen: apr_size_t): apr_status_t;
@@ -1860,7 +1860,7 @@ function ap_pregsub_ex(p: Papr_pool_t; result_: PPChar; const input, source: PCh
  * but nothing else because ;parameter=foo values are case sensitive.
  * @param s The content-type to convert to lowercase
   }
-procedure ap_content_type_tolower(s: PChar);
+procedure ap_content_type_tolower(s: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_content_type_tolower' + LibSuff4;
 
@@ -1868,7 +1868,7 @@ procedure ap_content_type_tolower(s: PChar);
  * convert a string to all lowercase
  * @param s The string to convert to lowercase
   }
-procedure ap_str_tolower(s: PChar);
+procedure ap_str_tolower(s: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_str_tolower' + LibSuff4;
 
@@ -1876,7 +1876,7 @@ procedure ap_str_tolower(s: PChar);
  * convert a string to all uppercase
  * @param s The string to convert to uppercase
   }
-procedure ap_str_toupper(s: PChar);
+procedure ap_str_toupper(s: PAnsiChar);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_str_toupper' + LibSuff4;
 
@@ -1887,8 +1887,8 @@ procedure ap_str_toupper(s: PChar);
  * @param c The character to search for
  * @return The index of the first occurrence of c in str
   }
-//AP_DECLARE(int) ap_ind(const char *str, char c);        /* Sigh... */
-function ap_ind(const str: PChar; c: Char): Integer;
+//AP_DECLARE(int) ap_ind(const AnsiChar *str, AnsiChar c);        /* Sigh... */
+function ap_ind(const str: PAnsiChar; c: AnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_ind' + LibSuff8;
 
@@ -1899,7 +1899,7 @@ function ap_ind(const str: PChar; c: Char): Integer;
  * @param c The character to search for
  * @return The index of the first occurrence of c in str
   }
-function ap_rind(const str: PChar; c: Char): Integer;
+function ap_rind(const str: PAnsiChar; c: AnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_rind' + LibSuff8;
 
@@ -1909,7 +1909,7 @@ function ap_rind(const str: PChar; c: Char): Integer;
  * @param instring The string to search for &quot;
  * @return A copy of the string with escaped quotes
   }
-function ap_escape_quotes(p: Papr_pool_t; const instring: PChar): PChar;
+function ap_escape_quotes(p: Papr_pool_t; const instring: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_escape_quotes' + LibSuff8;
 
@@ -1923,7 +1923,7 @@ function ap_escape_quotes(p: Papr_pool_t; const instring: PChar): PChar;
  * @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;
+function ap_append_pid(p: Papr_pool_t; const string_, delim: PAnsiChar): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_append_pid' + LibSuff12;
 
@@ -1945,9 +1945,9 @@ function ap_append_pid(p: Papr_pool_t; const string_, delim: PChar): PChar;
  * in timeout_parameter.
  * @return Status value indicating whether the parsing was successful or not.
   }
-function ap_timeout_parameter_parse(const timeout_parameter: PChar;
+function ap_timeout_parameter_parse(const timeout_parameter: PAnsiChar;
                                     timeout: Papr_interval_time_t;
-                                    const default_time_unit: PChar): apr_status_t;
+                                    const default_time_unit: PAnsiChar): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_timeout_parameter_parse' + LibSuff12;
 
@@ -1971,8 +1971,8 @@ function ap_request_has_body(r: Prequest_rec): Integer;
  * @param  dest cleaned up, allocated string
  * @return Status value indicating whether the cleaning was successful or not.
   }
-function ap_pstr2_alnum(p: Papr_pool_t; const src: PChar;
-                                        const dest: PPChar): apr_status_t;
+function ap_pstr2_alnum(p: Papr_pool_t; const src: PAnsiChar;
+                                        const dest: PPAnsiChar): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pstr2_alnum' + LibSuff12;
 
@@ -1985,7 +1985,7 @@ function ap_pstr2_alnum(p: Papr_pool_t; const src: PChar;
  * @param  dest cleaned up, pre-allocated string
  * @return Status value indicating whether the cleaning was successful or not.
   }
-function ap_str2_alnum(const src: PChar; dest: PChar): apr_status_t;
+function ap_str2_alnum(const src: PAnsiChar; dest: PAnsiChar): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_str2_alnum' + LibSuff8;
 
@@ -1993,7 +1993,7 @@ function ap_str2_alnum(const src: PChar; dest: PChar): apr_status_t;
  * Structure to store the contents of an HTTP form of the type
  * application/x-www-form-urlencoded.
  *
- * Currently it contains the name as a char* of maximum length
+ * Currently it contains the name as a AnsiChar* of maximum length
  * HUGE_STRING_LEN, and a value in the form of a bucket brigade
  * of arbitrary length.
   }
@@ -2001,7 +2001,7 @@ function ap_str2_alnum(const src: PChar; dest: PChar): apr_status_t;
 
 type
   ap_form_pair_t = record
-      name : PChar;
+      name : PAnsiChar;
       value : Papr_bucket_brigade;
     end;
 {*
@@ -2030,7 +2030,7 @@ function ap_parse_form_data(r: Prequest_rec; f: Pap_filter_t;
  * @param name The name of the object to check
  * @return 1 if it is a directory, 0 otherwise
   }
-function ap_is_rdirectory(p: Papr_pool_t; const name: PChar): Integer;
+function ap_is_rdirectory(p: Papr_pool_t; const name: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_is_rdirectory' + LibSuff8;
 
@@ -2040,15 +2040,15 @@ function ap_is_rdirectory(p: Papr_pool_t; const name: PChar): Integer;
  * @param name The name of the object to check
  * @return 1 if it is a directory, 0 otherwise
   }
-function ap_is_directory(p: Papr_pool_t; const name: PChar): Integer;
+function ap_is_directory(p: Papr_pool_t; const name: PAnsiChar): Integer;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_is_directory' + LibSuff8;
 
 //#ifdef _OSD_POSIX
-//extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
+//extern int os_init_job_environment(server_rec *s, const AnsiChar *user_name, int one_process);
 //#endif /* _OSD_POSIX */
 //{$ifdef _OSD_POSIX}
-//function os_init_job_environment(s:Pserver_rec; const user_name:Pchar; one_process:integer):integer;cdecl;
+//function os_init_job_environment(s:Pserver_rec; const user_name:PAnsiChar; one_process:integer):integer;cdecl;
 //{$endif} { _OSD_POSIX  }
 
 {*
@@ -2056,7 +2056,7 @@ function ap_is_directory(p: Papr_pool_t; const name: PChar): Integer;
  * @param p The pool to allocate from
  * @return A copy of the local host name
   }
-//char *ap_get_local_host(apr_pool_t *p);
+//AnsiChar *ap_get_local_host(apr_pool_t *p);
 
 {*
  * Log an assertion to the error log
@@ -2064,7 +2064,7 @@ function ap_is_directory(p: Papr_pool_t; const name: PChar): Integer;
  * @param szFile The file the assertion is in
  * @param nLine The line the assertion is defined on
   }
-procedure ap_log_assert(const szExp, szFile: PChar; nLine: Integer);
+procedure ap_log_assert(const szExp, szFile: PAnsiChar; nLine: Integer);
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_log_assert' + LibSuff12;
 
@@ -2117,7 +2117,7 @@ extern int raise_sigstop_flags;
  * @param r The request_rec
  * @return HTML describing the server, allocated in @a r's pool.
   }
-function ap_psignature(const prefix: PChar; r: Prequest_rec): PChar;
+function ap_psignature(const prefix: PAnsiChar; r: Prequest_rec): PAnsiChar;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_psignature' + LibSuff8;
 
@@ -2142,12 +2142,12 @@ function ap_psignature(const prefix: PChar; r: Prequest_rec): PChar;
    }
 {#include <string.h>
 
-AP_DECLARE(char *) ap_strchr(char *s, int c);
-AP_DECLARE(const char *) ap_strchr_c(const char *s, int c);
-AP_DECLARE(char *) ap_strrchr(char *s, int c);
-AP_DECLARE(const char *) ap_strrchr_c(const char *s, int c);
-AP_DECLARE(char *) ap_strstr(char *s, const char *c);
-AP_DECLARE(const char *) ap_strstr_c(const char *s, const char *c);
+AP_DECLARE(AnsiChar *) ap_strchr(AnsiChar *s, int c);
+AP_DECLARE(const AnsiChar *) ap_strchr_c(const AnsiChar *s, int c);
+AP_DECLARE(AnsiChar *) ap_strrchr(AnsiChar *s, int c);
+AP_DECLARE(const AnsiChar *) ap_strrchr_c(const AnsiChar *s, int c);
+AP_DECLARE(AnsiChar *) ap_strstr(AnsiChar *s, const AnsiChar *c);
+AP_DECLARE(const AnsiChar *) ap_strstr_c(const AnsiChar *s, const AnsiChar *c);
 
 #ifdef AP_DEBUG
 

+ 21 - 19
packages/httpd24/src/httpd24.pas

@@ -45,7 +45,9 @@
 unit httpd24;
 
 {$ifdef fpc}
-  {$mode delphi}{$H+}
+  {$mode delphi}
+  {$modeswitch unicodestrings-}
+  {$H-}
 {$endif}
 {$ifdef Unix}
   {$PACKRECORDS C}
@@ -246,15 +248,15 @@ var
     function APR_BUCKET_IS_MMAP(e: Papr_bucket): boolean;
   {$ENDIF}
   function APR_BUCKET_IS_POOL(e: Papr_bucket): boolean;
-  function apr_bucket_read(e: Papr_bucket; const str: PPChar; len: Papr_size_t;
+  function apr_bucket_read(e: Papr_bucket; const str: PPAnsiChar; len: Papr_size_t;
     block: apr_read_type_e): apr_status_t;
 
-  function AP_INIT_TAKE1(directive: Pchar; const take1func : ttake1func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec;
-  function AP_INIT_TAKE2(directive: Pchar; const take2func: ttake2func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec;
-  function AP_INIT_TAKE3(directive: Pchar; const take3func: ttake3func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec;
+  function AP_INIT_TAKE1(directive: PAnsiChar; const take1func : ttake1func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec;
+  function AP_INIT_TAKE2(directive: PAnsiChar; const take2func: ttake2func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec;
+  function AP_INIT_TAKE3(directive: PAnsiChar; const take3func: ttake3func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec;
 
 implementation
   { Internal representation for a HTTP protocol number, e.g., HTTP/1.1 }
@@ -327,12 +329,12 @@ implementation
     end;
   end;
 
-  function ap_escape_uri(ppool: Papr_pool_t; const path: PChar) : PChar;  
+  function ap_escape_uri(ppool: Papr_pool_t; const path: PAnsiChar) : PAnsiChar;  
   begin
     ap_escape_uri:=ap_os_escape_path(ppool,path,1);
   end;
 
-  function ap_escape_html(p: Papr_pool_t; const s: PChar) : PChar;
+  function ap_escape_html(p: Papr_pool_t; const s: PAnsiChar) : PAnsiChar;
   begin
     ap_escape_html:=ap_escape_html2(p,s,0);
   end;
@@ -429,14 +431,14 @@ implementation
     APR_BUCKET_NEXT(e)^.link.prev := APR_BUCKET_PREV(e);
   end;
 
-  function apr_bucket_read(e: Papr_bucket; const str: PPChar; len: Papr_size_t;
+  function apr_bucket_read(e: Papr_bucket; const str: PPAnsiChar; len: Papr_size_t;
     block: apr_read_type_e): apr_status_t; inline;
   begin
     apr_bucket_read := e^.type_^.read(e, str, len, block);
   end;
 
-  function AP_INIT_TAKE1(directive: Pchar; const take1func: ttake1func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec; inline;
+  function AP_INIT_TAKE1(directive: PAnsiChar; const take1func: ttake1func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec; inline;
   begin
     with result DO
     begin
@@ -449,8 +451,8 @@ implementation
     end;
   end;
 
-  function AP_INIT_TAKE2(directive: Pchar; const take2func: ttake2func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec; inline;
+  function AP_INIT_TAKE2(directive: PAnsiChar; const take2func: ttake2func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec; inline;
   begin
     with result DO
     begin
@@ -463,8 +465,8 @@ implementation
     end;
   end;
 
-  function AP_INIT_TAKE3(directive: Pchar; const take3func: ttake3func;
-    mconfig: Pointer; where: Integer; help: Pchar): command_rec; inline;
+  function AP_INIT_TAKE3(directive: PAnsiChar; const take3func: ttake3func;
+    mconfig: Pointer; where: Integer; help: PAnsiChar): command_rec; inline;
   begin
     with result DO
     begin
@@ -486,7 +488,7 @@ implementation
     mod_.version := MODULE_MAGIC_NUMBER_MAJOR;
     mod_.minor_version := MODULE_MAGIC_NUMBER_MINOR;
     mod_.module_index := -1;
-  //  mod_.name: PChar;
+  //  mod_.name: PAnsiChar;
     mod_.dynamic_load_handle := nil;
     mod_.next := nil;
     mod_.magic := MODULE_MAGIC_COOKIE;
@@ -499,7 +501,7 @@ implementation
     mod_.version := MODULE_MAGIC_NUMBER_MAJOR;
     mod_.minor_version := MODULE_MAGIC_NUMBER_MINOR;
     mod_.module_index := -1;
-  //  mod_.name: PChar;
+  //  mod_.name: PAnsiChar;
     mod_.dynamic_load_handle := nil;
     mod_.next := nil;
     mod_.magic := MODULE_MAGIC_COOKIE;

+ 3 - 3
packages/httpd24/src/util_cfgtree.inc

@@ -44,10 +44,10 @@ type
  *}
 ap_directive_t = record
     {** The current directive *}
-    directive: PChar;
+    directive: PAnsiChar;
     {** The arguments for the current directive, stored as a space
      *  separated list *}
-    args: PChar;
+    args: PAnsiChar;
     {** The next directive node in the tree *}
     next: Pap_directive_t;
     {** The first child node of this directive *}
@@ -60,7 +60,7 @@ ap_directive_t = record
 
     {* ### these may go away in the future, but are needed for now *}
     {** The name of the file this directive was found in *}
-    filename: PChar;
+    filename: PAnsiChar;
     {** The line number the directive was on *}
     line_num: Integer;
 

+ 12 - 12
packages/httpd24/src/util_filter.inc

@@ -229,7 +229,7 @@ type
   }
   ap_filter_rec_t = record
   {* The registered name for this filter  }
-        name : Pchar;
+        name : PAnsiChar;
 
   {* The function to call when this filter is invoked.  }
         filter_func : ap_filter_func;
@@ -346,11 +346,11 @@ function ap_pass_brigade(filter: Pap_filter_t;
   }
 //AP_DECLARE(apr_status_t) ap_pass_brigade_fchk(request_rec *r,
 //                                              apr_bucket_brigade *bucket,
-//                                              const char *fmt,
+//                                              const AnsiChar *fmt,
 //                                              ...);
 function ap_pass_brigade_fchk(r: Prequest_rec;
                               bucket: Papr_bucket_brigade;
-                              const fmt: PChar;
+                              const fmt: PAnsiChar;
                               fmt_args: array of const): apr_status_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_pass_brigade_fchk';
@@ -369,7 +369,7 @@ function ap_pass_brigade_fchk(r: Prequest_rec;
  *              ::AP_FTYPE_CONNECTION
  * @see add_input_filter()
   }
-function ap_register_input_filter(const name: PChar;
+function ap_register_input_filter(const name: PAnsiChar;
                                   filter_func: ap_in_filter_func;
                                   filter_init: ap_init_filter_func;
                                   ftype: ap_filter_type): Pap_filter_rec_t;
@@ -377,7 +377,7 @@ function ap_register_input_filter(const name: PChar;
  external LibHTTPD name LibNamePrefix + 'ap_register_input_filter' + LibSuff16;
 
 {* @deprecated @see ap_register_output_filter_protocol  }
-function ap_register_output_filter(const name: PChar;
+function ap_register_output_filter(const name: PAnsiChar;
                                    filter_func: ap_out_filter_func;
                                    filter_init: ap_init_filter_func;
                                    ftype: ap_filter_type): Pap_filter_rec_t;
@@ -405,7 +405,7 @@ function ap_register_output_filter(const name: PChar;
  * @return the filter rec
  * @see ap_add_output_filter()
   }
-function ap_register_output_filter_protocol(const name: PChar;
+function ap_register_output_filter_protocol(const name: PAnsiChar;
                                             filter_func: ap_out_filter_func;
                                             filter_init: ap_init_filter_func;
                                             ftype: ap_filter_type;
@@ -431,7 +431,7 @@ function ap_register_output_filter_protocol(const name: PChar;
  * @param r The request to add this filter for (or NULL if it isn't associated with a request)
  * @param c The connection to add the fillter for
   }
-function ap_add_input_filter(const name: PChar;
+function ap_add_input_filter(const name: PAnsiChar;
                              ctx: Pointer;
                              r: Prequest_rec;
                              c: Pconn_rec): Pap_filter_t;
@@ -459,7 +459,7 @@ function ap_add_input_filter_handle(f: Pap_filter_t;
  *
  * @param name The filter name to look up
   }
-function ap_get_input_filter_handle(const name: PChar): Pap_filter_rec_t;
+function ap_get_input_filter_handle(const name: PAnsiChar): Pap_filter_rec_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_get_input_filter_handle' + LibSuff4;
 
@@ -475,7 +475,7 @@ function ap_get_input_filter_handle(const name: PChar): Pap_filter_rec_t;
  * object r must be passed in to ensure the filter chains are modified
  * correctly.  f->r will still be initialized as NULL in the new filter.
   }
-function ap_add_output_filter(const name: PChar;
+function ap_add_output_filter(const name: PAnsiChar;
                               ctx: Pointer;
                               r: Prequest_rec;
                               c: Pconn_rec): Pap_filter_t;
@@ -507,7 +507,7 @@ function ap_add_output_filter_handle(f: Pap_filter_rec_t;
  *
  * @param name The filter name to look up
   }
-function ap_get_output_filter_handle(const name: PChar): Pap_filter_rec_t;
+function ap_get_output_filter_handle(const name: PAnsiChar): Pap_filter_rec_t;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  external LibHTTPD name LibNamePrefix + 'ap_get_output_filter_handle' + LibSuff4;
 
@@ -633,12 +633,12 @@ function ap_fputstrs(f: Pap_filter_t;
   }
 //AP_DECLARE_NONSTD(apr_status_t) ap_fprintf(ap_filter_t *f,
 //                                           apr_bucket_brigade *bb,
-//                                           const char *fmt,
+//                                           const AnsiChar *fmt,
 //                                           ...)
 //        __attribute__((format(printf,3,4)));
 function ap_fprintf(f: Pap_filter_t;
                     bb: Papr_bucket_brigade;
-                    const fmt: PChar;
+                    const fmt: PAnsiChar;
                     fmt_args: array of const): apr_status_t;
  cdecl; external LibHTTPD name 'ap_fprintf';
 

+ 18 - 18
packages/httpd24/src/util_script.inc

@@ -49,9 +49,9 @@ extern "C" {
  * @param t Apache table of key-value pairs
  * @return An array containing the same key-value pairs suitable for
  *         use with an exec call.
- * @fn char **ap_create_environment(apr_pool_t *p, apr_table_t *t)
+ * @fn AnsiChar **ap_create_environment(apr_pool_t *p, apr_table_t *t)
  */
-AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t);
+AP_DECLARE(AnsiChar **) ap_create_environment(apr_pool_t *p, apr_table_t *t);
 
 /**
  * This "cute" little function comes about because the path info on
@@ -60,9 +60,9 @@ AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t);
  * @param uri The uri we are currently parsing
  * @param path_info The current path info
  * @return The length of the path info
- * @fn int ap_find_path_info(const char *uri, const char *path_info)
+ * @fn int ap_find_path_info(const AnsiChar *uri, const AnsiChar *path_info)
  */
-AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info);
+AP_DECLARE(int) ap_find_path_info(const AnsiChar *uri, const AnsiChar *path_info);
 
 /**
  * Add CGI environment variables required by HTTP/1.1 to the request's
@@ -88,9 +88,9 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r);
  * @param buffer Empty when calling the function.  On output, if there was an
  *               error, the string that cause the error is stored here.
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
- * @fn int ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer)
+ * @fn int ap_scan_script_header_err(request_rec *r, apr_file_t *f, AnsiChar *buffer)
  */
-AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer);
+AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, AnsiChar *buffer);
 
 /**
  * Read headers output from a script, ensuring that the output is valid.  If
@@ -104,7 +104,7 @@ AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *b
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
  */
 AP_DECLARE(int) ap_scan_script_header_err_ex(request_rec *r, apr_file_t *f,
-                                             char *buffer, int module_index);
+                                             AnsiChar *buffer, int module_index);
 
 
 /**
@@ -116,11 +116,11 @@ AP_DECLARE(int) ap_scan_script_header_err_ex(request_rec *r, apr_file_t *f,
  * @param buffer Empty when calling the function.  On output, if there was an
  *               error, the string that cause the error is stored here.
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
- * @fn int ap_scan_script_header_err_brigade(request_rec *r, apr_bucket_brigade *bb, char *buffer)
+ * @fn int ap_scan_script_header_err_brigade(request_rec *r, apr_bucket_brigade *bb, AnsiChar *buffer)
  */
 AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,
                                                   apr_bucket_brigade *bb,
-                                                  char *buffer);
+                                                  AnsiChar *buffer);
 
 /**
  * Read headers output from a script, ensuring that the output is valid.  If
@@ -135,7 +135,7 @@ AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,
  */
 AP_DECLARE(int) ap_scan_script_header_err_brigade_ex(request_rec *r,
                                                      apr_bucket_brigade *bb,
-                                                     char *buffer,
+                                                     AnsiChar *buffer,
                                                      int module_index);
 
 /**
@@ -154,8 +154,8 @@ AP_DECLARE(int) ap_scan_script_header_err_brigade_ex(request_rec *r,
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
  */
 AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
-                                                      char *buffer,
-                                                      const char **termch,
+                                                      AnsiChar *buffer,
+                                                      const AnsiChar **termch,
                                                       int *termarg, ...)
                        AP_FN_ATTR_SENTINEL;
 
@@ -176,9 +176,9 @@ AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
  */
 AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs_ex(request_rec *r,
-                                                         char *buffer,
+                                                         AnsiChar *buffer,
                                                          int module_index,
-                                                         const char **termch,
+                                                         const AnsiChar **termch,
                                                          int *termarg, ...)
                        AP_FN_ATTR_SENTINEL;
 
@@ -195,8 +195,8 @@ AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs_ex(request_rec *r,
  * @param getsfunc_data The place to read from
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
  */
-AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
-                                               int (*getsfunc) (char *, int, void *),
+AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, AnsiChar *buffer,
+                                               int (*getsfunc) (AnsiChar *, int, void *),
                                                void *getsfunc_data);
 
 /**
@@ -212,8 +212,8 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
  * @param module_index The module index to be used for logging
  * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
  */
-AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
-                                        int (*getsfunc) (char *, int, void *),
+AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, AnsiChar *buffer,
+                                        int (*getsfunc) (AnsiChar *, int, void *),
                                         void *getsfunc_data, int module_index);
 }