Added build script that automatically generates a package

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@26 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2006-10-10 21:58:15 +00:00
parent 4ae36cf54e
commit 08f4724da0
5 changed files with 523 additions and 442 deletions

95
httpd/build/build_package.sh Executable file
View File

@ -0,0 +1,95 @@
#!/bin/sh
#
# This script generates packages for the Apache headers for Pascal
#
##################################
# Constants
##################################
PRODUCT="Apache Headers"
VERSION="0.3"
TARGET_DIR="./httpd-$VERSION/"
TARGET_TAR="httpd-$VERSION.tar"
TARGET_ZIP="httpd-$VERSION.zip"
##################################
# Cleans a directory
##################################
CleanDirectory ()
{
rm -rf ${1}*.o
rm -rf ${1}*.ppu
rm -rf ${1}*.bak
rm -rf ${1}*.sh~
}
##################################
# Creates a source package
##################################
SourcePackage ()
{
# Goes to the root directory of the magnifier
cd ..
# Clean up
CleanDirectory ./
CleanDirectory ./build/
CleanDirectory ./httpd_1_3/
CleanDirectory ./httpd_2_0
CleanDirectory ./httpd_2_0/apr/
CleanDirectory ./httpd_2_0/aprutil/
CleanDirectory ./httpd_2_0/apriconv/
CleanDirectory ./httpd_2_2
CleanDirectory ./httpd_2_2/apr/
CleanDirectory ./httpd_2_2/aprutil/
CleanDirectory ./httpd_2_2/apriconv/
# The Subversion directories will be copied
# copies all files to a new temporary directory
cp -r ./ ../httpd-$VERSION/
# Creates the package
cd ..
zip -r $TARGET_ZIP httpd-$VERSION/
# Clean up
rm -rf httpd-$VERSION/
return
}
##################################
# Main section
##################################
echo "========================================================"
echo " Apache headers for Pascal build script"
echo "========================================================"
echo ""
echo " Please select which package you would like to build:"
echo ""
echo " 1 > Source .zip package"
echo " 0 > Exit"
read command
case $command in
1) SourcePackage;;
0) exit 0;;
*) echo "Invalid command"
exit 0;;
esac

View File

@ -198,18 +198,40 @@ type
table_entry_t = table_entry;
{API_EXPORT(table *) ap_make_table(pool *p, int nelts);
API_EXPORT(table *) ap_copy_table(pool *p, const table *);
API_EXPORT(void) ap_clear_table(table *);
API_EXPORT(const char *) ap_table_get(const table *, const char *);
API_EXPORT(void) ap_table_set(table *, const char *name, const char *val);
API_EXPORT(void) ap_table_setn(table *, const char *name, const char *val);
API_EXPORT(void) ap_table_merge(table *, const char *name, const char *more_val);
API_EXPORT(void) ap_table_mergen(table *, const char *name, const char *more_val);
API_EXPORT(void) ap_table_unset(table *, const char *key);
API_EXPORT(void) ap_table_add(table *, const char *name, const char *val);
API_EXPORT(void) ap_table_addn(table *, const char *name, const char *val);
API_EXPORT_NONSTD(void) ap_table_do(int ( *comp) (void *, const char *, const char *),
function ap_make_table(p: Ppool; nelts: cuint): Ptable;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_copy_table(p: Ppool; p1: Ptable): Ptable;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_clear_table(p1: Ptable);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_table_get(const p1: Ptable; const p2: PChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_set(p1: Ptable; const name, val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_setn(p1: Ptable; const name, val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_merge(p1: Ptable; const name, more_val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_mergen(p1: Ptable; const name, more_val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_unset(p1: Ptable; const key: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_add(p1: Ptable; const name, more_val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_table_addn(p1: Ptable; const name, more_val: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{API_EXPORT_NONSTD(void) ap_table_do(int ( *comp) (void *, const char *, const char *),
void *rec, const table *t,...);
API_EXPORT(table * ) ap_overlay_tables(pool *p, const table *overlay, const table *base);
@ -313,43 +335,76 @@ procedure ap_unblock_alarms;
}
{API_EXPORT(FILE *) ap_pfopen(struct pool *, const char *name, const char *fmode);
API_EXPORT(FILE *) ap_pfdopen(struct pool *, int fd, const char *fmode);
API_EXPORT(int) ap_popenf(struct pool *, const char *name, int flg, int mode);
API_EXPORT(int) ap_popenf_ex(struct pool *, const char *name, int flg,
int mode, int domagic);
API_EXPORT(FILE *) ap_pfdopen(struct pool *, int fd, const char *fmode);}
function ap_popenf(p1: Ppool; const name: PChar; flg, mode: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_popenf_ex(p1: Ppool; const name: PChar; flg, mode, domagic: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{API_EXPORT(void) ap_note_cleanups_for_file(pool *, FILE *);
API_EXPORT(void) ap_note_cleanups_for_file_ex(pool *, FILE *, int);}
procedure ap_note_cleanups_for_fd(p1: Ppool; p2: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_note_cleanups_for_fd_ex(p1: Ppool; p2, p3: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(void) ap_note_cleanups_for_file(pool *, FILE *);
API_EXPORT(void) ap_note_cleanups_for_file_ex(pool *, FILE *, int);
API_EXPORT(void) ap_note_cleanups_for_fd(pool *, int);
API_EXPORT(void) ap_note_cleanups_for_fd_ex(pool *, int, int);}
{$ifdef WIN32}
//API_EXPORT(void) ap_note_cleanups_for_h(pool *, HANDLE);
{$endif}
{API_EXPORT(void) ap_kill_cleanups_for_fd(pool *p, int fd);
API_EXPORT(void) ap_note_cleanups_for_socket(pool *, int);
API_EXPORT(void) ap_note_cleanups_for_socket_ex(pool *, int, int);
API_EXPORT(void) ap_kill_cleanups_for_socket(pool *p, int sock);
API_EXPORT(int) ap_psocket(pool *p, int, int, int);
API_EXPORT(int) ap_psocket_ex(pool *p, int, int, int, int);
API_EXPORT(int) ap_pclosesocket(pool *a, int sock);
procedure ap_kill_cleanups_for_fd(p: Ppool; fd: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(regex_t *) ap_pregcomp(pool *p, const char *pattern, int cflags);
API_EXPORT(void) ap_pregfree(pool *p, regex_t * reg);}
procedure ap_note_cleanups_for_socket(p1: Ppool; p2: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_note_cleanups_for_socket_ex(p1: Ppool; p2, p3: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_kill_cleanups_for_socket(p: Ppool; sock: cint);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_psocket(p: Ppool; p2, p3, p4: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_psocket_ex(p: Ppool; p2, p3, p4, p5: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_pclosesocket(a: Ppool; sock: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_pregcomp(p: Ppool; const pattern: PChar; cflags: cint): Pregex_t;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_pregfree(p: Ppool; reg: Pregex_t);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ routines to note closes... file descriptors are constrained enough
* on some systems that we want to support this.
}
{API_EXPORT(int) ap_pfclose(struct pool *, FILE *);
API_EXPORT(int) ap_pclosef(struct pool *, int fd);
#ifdef WIN32
API_EXPORT(int) ap_pcloseh(struct pool *, HANDLE hDevice);
#endif}
//API_EXPORT(int) ap_pfclose(struct pool *, FILE *);
function ap_pclosef(p1: Ppool; fd: cint): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{$ifdef WIN32}
//API_EXPORT(int) ap_pcloseh(struct pool *, HANDLE hDevice);
{$endif}
{ routines to deal with directories }
//API_EXPORT(DIR *) ap_popendir(pool *p, const char *name);
//API_EXPORT(void) ap_pclosedir(pool *p, DIR * d);
function ap_popendir(p: Ppool; const name: PChar): PDIR;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_pclosedir(p: Ppool; d: PDIR);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ ... even child processes (which we may want to wait for,
* or to kill outright, on unexpected termination).
@ -370,13 +425,14 @@ type
kill_only_once { send SIGTERM and then wait }
);
//API_EXPORT(void) ap_note_subprocess(pool *a, pid_t pid,
// enum kill_conditions how);
///API_EXPORT(int) ap_spawn_child(pool *, int (*)(void *, child_info *),
// void *, enum kill_conditions,
// FILE **pipe_in, FILE **pipe_out,
// FILE **pipe_err);
//int ap_close_fd_on_exec(int fd);
procedure ap_note_subprocess(a: Ppool; pid: pid_t; how: kill_conditions);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{API_EXPORT(int) ap_spawn_child(pool *, int (*)(void *, child_info *),
void *, enum kill_conditions,
FILE **pipe_in, FILE **pipe_out,
FILE **pipe_err);
int ap_close_fd_on_exec(int fd);}
{ magic numbers --- min free bytes to consider a free pool block useable,
* and the min amount to allocate if we have to go to malloc() }

View File

@ -73,32 +73,56 @@ const
{ default maximum subrequest nesting level }
AP_DEFAULT_MAX_SUBREQ_DEPTH = 20;
//API_EXPORT(int) ap_allow_options (request_rec *);
//API_EXPORT(int) ap_allow_overrides (request_rec *);
//API_EXPORT(const char *) ap_default_type (request_rec *);
//API_EXPORT(const char *) ap_document_root (request_rec *); { Don't use this! If your request went
// * through a Userdir, or something like
// * that, it'll screw you. But it's
// * back-compatible...
// }
//API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type);
//API_EXPORT(const char *) ap_get_remote_logname(request_rec *r);
function ap_allow_options(r: Prequest_rec): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_allow_overrides(r: Prequest_rec): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_default_type(r: Prequest_rec): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_document_root(r: Prequest_rec): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ Don't use this! If your request went
* through a Userdir, or something like
* that, it'll screw you. But it's
* back-compatible...
}
function ap_get_remote_host(conn: Pconn_rec; dir_config: Pointer; type_: cint): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_remote_logname(r: Prequest_rec): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ Used for constructing self-referencing URLs, and things like SERVER_PORT,
* and SERVER_NAME.
}
{API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, request_rec *r);
API_EXPORT(const char *) ap_get_server_name(request_rec *r);
API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r);
API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string);
API_EXPORT(int) ap_exists_config_define(char *name);
}
function ap_construct_url(p: Ppool; const uri: PChar; r: Prequest_rec): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_server_name(r: Prequest_rec): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_server_port(const r: Prequest_rec): cuint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_limit_req_body(const r: Prequest_rec): culong;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_custom_response(r: Prequest_rec; status: cint; string_: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_exists_config_define(name: PChar): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ Check if the current request is beyond the configured max. number of redirects or subrequests
* @param r The current request
* @return true (is exceeded) or false
}
//API_EXPORT(int) ap_is_recursion_limit_exceeded(const request_rec *r);
function ap_is_recursion_limit_exceeded(const r: Prequest_rec): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{ Authentication stuff. This is one of the places where compatibility
* with the old config files *really* hurts; they don't discriminate at

View File

@ -542,9 +542,9 @@ const
* NB: this is not the whole truth - sometimes \015 and \012 are contained
* in literal (EBCDIC!) strings, so these are not converted but passed.
}
#define CR '\r'
#define LF '\n'
#define CRLF "\r\n"
CR = '\r';
LF = '\n';
CRLF = '\r\n';
#define OS_ASC(c) (os_toascii[c])
{$endif} { CHARSET_EBCDIC }
@ -912,6 +912,10 @@ type
{ more stuff here, like which protocol is bound to the port }
end;
tm = record end;
Ptm = ^tm;
{ Prototypes for utilities... util.c.
}
@ -919,44 +923,93 @@ type
{ Time }
{extern API_VAR_EXPORT const char ap_month_snames[12][4];
extern API_VAR_EXPORT const char ap_day_snames[7][4];
extern API_VAR_EXPORT const char ap_day_snames[7][4];}
function ap_get_gmtoff(tz: Pcint): Ptm;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_time: PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_field_noparam(p: Ppool; const intype: PChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_ht_time(p: Ppool; t: time_t; const fmt: PChar; gmt: cint): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_gm_timestr_822(p: Ppool; t: time_t): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(struct tm *) ap_get_gmtoff(int *tz);
API_EXPORT(char *) ap_get_time(void);
API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype);
API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt);
API_EXPORT(char *) ap_gm_timestr_822(pool *p, time_t t);
}
{ 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 **) }
{API_EXPORT(char * ) ap_getword(pool *p, const char **line, char stop);
API_EXPORT(char * ) ap_getword_nc(pool *p, char **line, char stop);
API_EXPORT(char * ) ap_getword_white(pool *p, const char **line);
API_EXPORT(char * ) ap_getword_white_nc(pool *p, char **line);
API_EXPORT(char * ) ap_getword_nulls(pool *p, const char **line, char stop);
API_EXPORT(char * ) ap_getword_nulls_nc(pool *p, char **line, char stop);
API_EXPORT(char * ) ap_getword_conf(pool *p, const char **line);
API_EXPORT(char * ) ap_getword_conf_nc(pool *p, char **line);
function ap_getword(p: Ppool; const line: PPChar; stop: Char): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(const char *) ap_size_list_item(const char **field, int *len);
API_EXPORT(char *) ap_get_list_item(pool *p, const char **field);
API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok);
function ap_getword_nc(p: Ppool; line: PPChar; stop: Char): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white);
API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok);
API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok);
function ap_getword_white(p: Ppool; const line: PPChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
API_EXPORT(int) ap_is_url(const char *u);
API_EXPORT(int) ap_unescape_url(char *url);
API_EXPORT(void) ap_no2slash(char *name);
API_EXPORT(void) ap_getparents(char *name);
API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *s);
API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial);
#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
API_EXPORT(char *) ap_escape_html(pool *p, const char *s);
API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname,
function ap_getword_white_nc(p: Ppool; line: PPChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_getword_nulls(p: Ppool; const line: PPChar; stop: Char): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_getword_nulls_nc(p: Ppool; line: PPChar; stop: Char): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_getword_conf(p: Ppool; const line: PPChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_getword_conf_nc(p: Ppool; line: PPChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_size_list_item(const field: PPChar; len: Pcint): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_list_item(p: Ppool; const field: PPChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_find_list_item(p: Ppool; const line, tok: PChar): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_get_token(p: Ppool; const accept_line: PPChar; accept_white: cint): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_find_token(p: Ppool; const line, tok: PChar): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_find_last_token(p: Ppool; const line, tok: PChar): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_unescape_url(url: PChar): cint;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_no2slash(name: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
procedure ap_getparents(name: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_escape_path_segment(p: Ppool; const s: PChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
function ap_os_escape_path(p: Ppool; const path: PChar; partial: cint): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
//#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
function ap_escape_html(p: Ppool; const s: PChar): PChar;
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
{API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname,
unsigned port, const request_rec *r);
API_EXPORT(char *) ap_escape_logitem(pool *p, const char *str);
API_EXPORT(size_t) ap_escape_errorlog_item(char *dest, const char *source,
@ -978,18 +1031,18 @@ API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2);
API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded);
API_EXPORT(char *) ap_pbase64encode(pool *p, char *string);
API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded);
API_EXPORT(char *) ap_uuencode(pool *p, char *string);
API_EXPORT(char *) ap_uuencode(pool *p, char *string); }
#if defined(OS2) || defined(WIN32)
API_EXPORT(char *) ap_double_quotes(pool *p, const char *str);
API_EXPORT(char *) ap_caret_escape_args(pool *p, const char *str);
#endif
{$if defined(OS2) or defined(WIN32)}
//API_EXPORT(char *) ap_double_quotes(pool *p, const char *str);
//API_EXPORT(char *) ap_caret_escape_args(pool *p, const char *str);
{$endif}
#ifdef OS2
{$ifdef OS2}
void os2pathname(char *path);
#endif
{$endif}
API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
{API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
size_t nmatch, regmatch_t pmatch[], int eflags);
API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg,
char *errbuf, size_t errbuf_size);
@ -1043,9 +1096,9 @@ type
{ Detach from open configfile_t, calling the close handler }
//API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp);
//#ifdef NEED_STRERROR
{$ifdef NEED_STRERROR}
//char *strerror(int err);
//#endif
{$endif}
{ Misc system hackery }
@ -1067,34 +1120,36 @@ function ap_can_exec(const stat: Pointer): cint;
procedure ap_chdir_file(const file_: PChar);
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
//#ifndef HAVE_CANONICAL_FILENAME
{$ifndef HAVE_CANONICAL_FILENAME}
{
* We can't define these in os.h because of dependence on pool pointer.
}
{#define ap_os_canonical_filename(p,f) (f)
#define ap_os_case_canonical_filename(p,f) (f)
#define ap_os_systemcase_filename(p,f) (f)
#else
API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
#ifdef WIN32
API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
#elif defined(OS2)
API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
#elif defined(NETWARE)
API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
#define ap_os_systemcase_filename(p,f) ap_os_case_canonical_filename(p,f)
#else
#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
#endif
#endi}
#define ap_os_systemcase_filename(p,f) (f)}
{$else}
//API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
{$ifdef WIN32}
//API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
//API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
{$else}{$ifdef OS2}
//API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
//API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
{$else}{$ifdef NETWARE}
//API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
//#define ap_os_systemcase_filename(p,f) ap_os_case_canonical_filename(p,f)
{$else}
//#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
//#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
{$endif}
{$endif}
{$endif}
{$endif}
//#ifdef CHARSET_EBCDIC
{$ifdef CHARSET_EBCDIC}
//API_EXPORT(int) ap_checkconv(struct request_rec *r); { for downloads }
//API_EXPORT(int) ap_checkconv_in(struct request_rec *r); { for uploads }
//#endif {#ifdef CHARSET_EBCDIC}
{$endif} {#ifdef CHARSET_EBCDIC}
{API_EXPORT(char *) ap_get_local_host(pool *);
API_EXPORT(unsigned long) ap_get_virthost_addr(char *hostname, unsigned short *port);
@ -1116,9 +1171,9 @@ extern API_VAR_EXPORT time_t ap_restart_time;}
}
const
LOW_SLACK_LINE = 15;
LOW_SLACK_LINE = 15;
{ #define HIGH_SLACK_LINE 255 }
HIGH_SLACK_LINE = 255;
{
* The ap_slack() function takes a fd, and tries to move it above the indicated
@ -1130,8 +1185,9 @@ const
#define ap_slack(fd,line) (fd)
#else
int ap_slack(int fd, int line);
#define AP_SLACK_LOW 1
#define AP_SLACK_HIGH 2
const
AP_SLACK_LOW = 1;
AP_SLACK_HIGH = 2;
#endif
API_EXPORT(char *) ap_escape_quotes(pool *p, const char *instr);}
@ -1146,8 +1202,7 @@ API_EXPORT(char *) ap_escape_quotes(pool *p, const char *instr);}
{ The optimized timeout code only works if we're not MULTITHREAD and we're
* also not using a scoreboard file
}
{#if !defined (MULTITHREAD) && \
(defined (USE_MMAP_SCOREBOARD) || defined (USE_SHMGET_SCOREBOARD))
{#if !defined (MULTITHREAD) && (defined (USE_MMAP_SCOREBOARD) || defined (USE_SHMGET_SCOREBOARD))
#define OPTIMIZE_TIMEOUTS
#endif}

File diff suppressed because it is too large Load Diff