Re: cvs commit: apache-2.0/src/os/unix iol_socket.c unixd.c
[EMAIL PROTECTED] wrote: rbb 00/01/28 10:02:32 Modified:src/ap ap_hooks.c ap_sha1.c src/helpers build-modules-c.awk src/main buff.c gen_test_char.c http_config.c http_connection.c http_core.c http_main.c http_protocol.c http_request.c http_vhost.c iol_file.c listen.c rfc1413.c util.c util_md5.c util_script.c util_uri.c src/modules/mpm/prefork prefork.c src/modules/standard mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_dir.c mod_echo.c mod_setenvif.c src/os/unix iol_socket.c unixd.c Log: Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is defined correctly in all C files. If its a requirement, shouldn't httpd.h include ap_config.h, rather then requiring module authors to magically know they should do this? Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html Y19100 no-prize winner! http://www.ntk.net/index.cgi?back=2000/now0121.txt
Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h
[EMAIL PROTECTED] wrote: 1.10 +1 -4 apache-2.0/src/lib/apr/locks/unix/locks.h Index: locks.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- locks.h 2000/01/23 01:13:47 1.9 +++ locks.h 2000/01/24 13:59:02 1.10 @@ -88,9 +88,6 @@ #if HAVE_FCNTL_H #include fcntl.h #endif -#ifdef HAVE_STRUCT_UNION_SEMUN -#include sys/sem.h -#endif #if APR_HAS_THREADS #if HAVE_PTHREAD_H @@ -99,7 +96,7 @@ #endif /* End System Headers */ -#ifndef HAVE_STRUCT_UNION_SEMUN +#if !APR_HAVE_UNION_SEMUN APR_USE_SYSVSEM_SERIALIZE /* it makes no sense, but this isn't defined on solaris */ union semun { long val; Que? If you don't include sys/sem.h, then this doesn't compile - why did you remove it? BTW, why are these structures included in the locking structure at all? They're essentially constant static structures, but they currently exist in each lock. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html Y19100 no-prize winner! http://www.ntk.net/index.cgi?back=2000/now0121.txt
Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h
[EMAIL PROTECTED] wrote: -#ifdef HAVE_STRUCT_UNION_SEMUN -#include sys/sem.h -#endif #if APR_HAS_THREADS #if HAVE_PTHREAD_H @@ -99,7 +96,7 @@ #endif /* End System Headers */ -#ifndef HAVE_STRUCT_UNION_SEMUN +#if !APR_HAVE_UNION_SEMUN APR_USE_SYSVSEM_SERIALIZE /* it makes no sense, but this isn't defined on solaris */ union semun { long val; Que? If you don't include sys/sem.h, then this doesn't compile - why did you remove it? If you look about four lines above this,. we include sys/sem.h if it is on the system. The problem was we weren't checking for it. I put the check into configure.in, so we should be including it. I just didn't see a need for sys/sem.h to be included twice. :-) Aha! :-) In which case, it'd make sense to use HAVE_SYS_SEM_H for the other one, too. BTW, why are these structures included in the locking structure at all? They're essentially constant static structures, but they currently exist in each lock. I have no good answer for this. I'll look into it though. :-) Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html Y19100 no-prize winner! http://www.ntk.net/index.cgi?back=2000/now0121.txt
cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c
ben 00/01/22 17:13:48 Modified:src/lib/apr configure.in src/lib/apr/include apr_portable.h src/lib/apr/locks/unix crossproc.c locks.h src/lib/apr/time/unix timestr.c Log: Make interprocess mutexes actually choose, fix semaphore mutexes. Revision ChangesPath 1.46 +37 -38apache-2.0/src/lib/apr/configure.in Index: configure.in === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/configure.in,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- configure.in 2000/01/19 01:14:49 1.45 +++ configure.in 2000/01/23 01:13:44 1.46 @@ -161,43 +161,6 @@ AC_CHECK_DEFINE(LOCK_EX, sys/file.h) AC_CHECK_DEFINE(F_SETLK, fcntl.h) -dnl Checks for libraries. -AC_BEGIN_DECISION([lock implementation method]) -AC_IFALLYES(header:sys/file.h define:LOCK_EX, -AC_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()])) -AC_IFALLYES(header:sys/ipc.h header:sys/sem.h header:sys/file.h dnl -func:semget func:semctl, -AC_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()])) -AC_IFALLYES(header:fcntl.h define:F_SETLK, -AC_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()])) -AC_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl -custom:use_pthread_cross, -AC_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex])) -AC_DECISION_FORCE(USE_FCNTL_SERIALIZE) -AC_END_DECISION -AC_DEFINE_UNQUOTED($ac_decision) - -if test .$ac_decision = .USE_FLOCK_SERIALIZE; then -flockser=1 -else -flockser=0 -fi -if test .$ac_decision = .USE_SYSVSEM_SERIALIZE; then -sysvser=1 -else -sysvser=0 -fi -if test .$ac_decision = .USE_FCNTL_SERIALIZE; then -fcntlser=1 -else -fcntlser=0 -fi -if test .$ac_decision = .USE_PROC_PTHREAD_SERIALIZE; then -procpthreadser=1 -else -procpthreadser=0 -fi - ac_cv_define_READDIR_IS_THREAD_SAFE=no AC_CHECK_LIB(c_r, readdir, AC_DEFINE(READDIR_IS_THREAD_SAFE)) @@ -322,7 +285,7 @@ ],[ union semun arg; semctl(0, 0, 0, arg); -], AC_DEFINE(HAVE_STRUCT_UNION_SEMUN) +], [AC_DEFINE(HAVE_STRUCT_UNION_SEMUN) union_semun=yes] msg=yes,dnl msg=no) AC_MSG_RESULT([$msg]) @@ -352,6 +315,42 @@ AC_SUBST(inet_network) AC_CHECK_FUNCS(gmtime_r localtime_r) + +dnl Checks for libraries. +AC_BEGIN_DECISION([lock implementation method]) +AC_IFALLYES(header:sys/file.h define:LOCK_EX, +AC_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()])) +AC_IFALLYES(header:fcntl.h define:F_SETLK, +AC_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()])) +AC_IFALLYES(custom:union_semun, +AC_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()])) +AC_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl +custom:use_pthread_cross, +AC_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex])) +dnl AC_DECISION_FORCE(USE_FCNTL_SERIALIZE) +AC_END_DECISION +AC_DEFINE_UNQUOTED($ac_decision) + +if test .$ac_decision = .USE_FLOCK_SERIALIZE; then +flockser=1 +else +flockser=0 +fi +if test .$ac_decision = .USE_SYSVSEM_SERIALIZE; then +sysvser=1 +else +sysvser=0 +fi +if test .$ac_decision = .USE_FCNTL_SERIALIZE; then +fcntlser=1 +else +fcntlser=0 +fi +if test .$ac_decision = .USE_PROC_PTHREAD_SERIALIZE; then +procpthreadser=1 +else +procpthreadser=0 +fi dnl Start building stuff from our information AC_SUBST(LDLIBS) 1.19 +3 -0 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- apr_portable.h2000/01/09 20:58:22 1.18 +++ apr_portable.h2000/01/23 01:13:45 1.19 @@ -81,6 +81,9 @@ #if APR_HAVE_PTHREAD_H #include pthread.h #endif +#ifdef HAVE_STRUCT_UNION_SEMUN +#include sys/sem.h +#endif #ifdef WIN32 /* The primitives for Windows types */ 1.11 +7 -5 apache-2.0/src/lib/apr/locks/unix/crossproc.c Index: crossproc.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- crossproc.c 1999/12/03 15:18:27 1.10 +++ crossproc.c 2000/01/23 01:13:46 1.11 @@ -56,12 +56,14 @@ #include locks.h #if defined (USE_SYSVSEM_SERIALIZE) -ap_status_t lock_cleanup(struct lock_t *lock) +ap_status_t lock_cleanup(void *lock_) { +struct lock_t *lock=lock_
Re: cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c
[EMAIL PROTECTED] wrote: src/lib/apr/include apr_portable.h src/lib/apr/locks/unix crossproc.c locks.h src/lib/apr/time/unix timestr.c Log: Make interprocess mutexes actually choose, fix semaphore mutexes. What does this mean? It means don't force them to be always fcntl, i.e. actually use the choice instead of overriding it. Index: apr_portable.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- apr_portable.h 2000/01/09 20:58:22 1.18 +++ apr_portable.h 2000/01/23 01:13:45 1.19 @@ -81,6 +81,9 @@ #if APR_HAVE_PTHREAD_H #include pthread.h #endif +#ifdef HAVE_STRUCT_UNION_SEMUN +#include sys/sem.h +#endif This is bad. We cannot use HAVE_ macros in public header files, because they aren't namepsace protected. It really doesn't matter if we named them ourselves or if autoconf named them for us. Please change this to APR_HAVE_STRUCT_UNION_SEMUN. Sure, but I couldn't figure out where/how that happens/should happen. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html Y19100 no-prize winner! http://www.ntk.net/index.cgi?back=2000/now0121.txt
cvs commit: apache-2.0/src/build buildcheck.sh
ben 00/01/15 07:37:53 Modified:src/build buildcheck.sh Log: We're building Apache, not PHP. Revision ChangesPath 1.2 +6 -6 apache-2.0/src/build/buildcheck.sh Index: buildcheck.sh === RCS file: /export/home/cvs/apache-2.0/src/build/buildcheck.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- buildcheck.sh 2000/01/11 13:10:58 1.1 +++ buildcheck.sh 2000/01/15 15:37:52 1.2 @@ -7,14 +7,14 @@ if test -z $ac_version; then echo buildconf: autoconf not found. echoYou need autoconf version 2.13 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 fi IFS=.; set $ac_version; IFS=' ' if test $1 = 2 -a $2 -lt 13 || test $1 -lt 2; then echo buildconf: autoconf version $ac_version found. echoYou need autoconf version 2.13 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 else echo buildconf: autoconf version $ac_version (ok) @@ -25,14 +25,14 @@ if test $am_version = ; then echo buildconf: automake not found. echoYou need automake version 1.4 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 fi IFS=.; set $am_version; IFS=' ' if test $1 = 1 -a $2 -lt 4 || test $1 -lt 1; then echo buildconf: automake version $am_version found. echoYou need automake version 1.4 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 else echo buildconf: automake version $am_version (ok) @@ -43,7 +43,7 @@ if test $lt_pversion = ; then echo buildconf: libtool not found. echoYou need libtool version 1.3 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 fi lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` @@ -54,7 +54,7 @@ else echo buildconf: libtool version $lt_pversion found. echoYou need libtool version 1.3.3 or newer installed -echoto build PHP from CVS. +echoto build Apache from CVS. exit 1 fi
cvs commit: apache-1.3/src/modules/standard mod_mime.c
ben 00/01/11 06:13:50 Modified:src CHANGES src/include httpd.h src/main http_core.c http_protocol.c http_request.c src/modules/proxy mod_proxy.c mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c src/modules/standard mod_mime.c Log: Don't convert auth to proxy auth when it shouldn't be. Revision ChangesPath 1.1491+4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1490 retrieving revision 1.1491 diff -u -r1.1490 -r1.1491 --- CHANGES 2000/01/10 21:33:06 1.1490 +++ CHANGES 2000/01/11 14:13:37 1.1491 @@ -1,5 +1,9 @@ Changes with Apache 1.3.10 + *) ProxyPass erroneously converted authentication requests to proxy + authentication requests. Fixed. + [Ben Laurie] + *) Reverse a patch which broke HPUX shared builds. Basically we comment out the SHLIB_SUFFIX_NAME=sl line in Configure. [Ryan Bloom] 1.298 +7 -1 apache-1.3/src/include/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache-1.3/src/include/httpd.h,v retrieving revision 1.297 retrieving revision 1.298 diff -u -r1.297 -r1.298 --- httpd.h 1999/12/09 12:05:02 1.297 +++ httpd.h 2000/01/11 14:13:39 1.298 @@ -658,6 +658,12 @@ #include util_uri.h +enum proxyreqtype { +NOT_PROXY=0, +STD_PROXY, +PROXY_PASS +}; + struct request_rec { ap_pool *pool; @@ -681,7 +687,7 @@ char *the_request; /* First line of request, so we can log it */ int assbackwards;/* HTTP/0.9, simple request */ -int proxyreq;/* A proxy request (calculated during +enum proxyreqtype proxyreq;/* A proxy request (calculated during * post_read_request or translate_name) */ int header_only; /* HEAD request, as opposed to GET */ char *protocol; /* Protocol, as given to us, or HTTP/0.9 */ 1.277 +1 -1 apache-1.3/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.276 retrieving revision 1.277 diff -u -r1.276 -r1.277 --- http_core.c 1999/12/21 07:52:55 1.276 +++ http_core.c 2000/01/11 14:13:40 1.277 @@ -2956,7 +2956,7 @@ void *sconf = r-server-module_config; core_server_config *conf = ap_get_module_config(sconf, core_module); -if (r-proxyreq) { +if (r-proxyreq != NOT_PROXY) { return HTTP_FORBIDDEN; } if ((r-uri[0] != '/') strcmp(r-uri, *)) { 1.286 +8 -5 apache-1.3/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.285 retrieving revision 1.286 diff -u -r1.285 -r1.286 --- http_protocol.c 2000/01/04 10:20:39 1.285 +++ http_protocol.c 2000/01/11 14:13:41 1.286 @@ -1162,7 +1162,8 @@ ap_note_auth_failure(r); else ap_table_setn(r-err_headers_out, - r-proxyreq ? Proxy-Authenticate : WWW-Authenticate, + r-proxyreq == STD_PROXY ? Proxy-Authenticate + : WWW-Authenticate, ap_pstrcat(r-pool, Basic realm=\, ap_auth_name(r), \, NULL)); } @@ -1170,7 +1171,8 @@ API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r) { ap_table_setn(r-err_headers_out, - r-proxyreq ? Proxy-Authenticate : WWW-Authenticate, + r-proxyreq == STD_PROXY ? Proxy-Authenticate + : WWW-Authenticate, ap_psprintf(r-pool, Digest realm=\%s\, nonce=\%lu\, ap_auth_name(r), r-request_time)); } @@ -1178,8 +1180,9 @@ API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) { const char *auth_line = ap_table_get(r-headers_in, - r-proxyreq ? Proxy-Authorization - : Authorization); + r-proxyreq == STD_PROXY + ? Proxy-Authorization + : Authorization); const char *t; if (!(t = ap_auth_type(r)) || strcasecmp(t, Basic)) @@ -1352,7 +1355,7 @@ /* mod_proxy is only HTTP/1.0, so avoid sending HTTP/1.1 error response; * kluge around broken browsers when indicated by force-response-1.0
cvs commit: apache-1.3/src/modules/standard mod_actions.c
ben 00/01/11 06:23:04 Modified:src CHANGES src/modules/standard mod_actions.c Log: Make Action work when Location doesn't exist. Submitted by: Manoj Reviewed by: Ben Revision ChangesPath 1.1492+4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1491 retrieving revision 1.1492 diff -u -r1.1491 -r1.1492 --- CHANGES 2000/01/11 14:13:37 1.1491 +++ CHANGES 2000/01/11 14:22:59 1.1492 @@ -1,5 +1,9 @@ Changes with Apache 1.3.10 + *) An Action set for a Location that didn't correspond to a file didn't + work. Fixed. + [Manoj Kasichainula, Ben Laurie] + *) ProxyPass erroneously converted authentication requests to proxy authentication requests. Fixed. [Ben Laurie] 1.33 +0 -5 apache-1.3/src/modules/standard/mod_actions.c Index: mod_actions.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_actions.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- mod_actions.c 1999/12/08 19:01:48 1.32 +++ mod_actions.c 2000/01/11 14:23:03 1.33 @@ -245,11 +245,6 @@ if ((t = ap_table_get(conf-action_types, action ? action : ap_default_type(r { script = t; - if (r-finfo.st_mode == 0) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - File does not exist: %s, r-filename); - return NOT_FOUND; - } } if (script == NULL) {
Re: cvs commit: apache-2.0/src/modules/standard mod_digest.c mod_vhost_alias.c
[EMAIL PROTECTED] wrote: rbb 99/12/31 09:06:16 Modified:src/modules/standard mod_digest.c mod_vhost_alias.c Log: Update these modules to Apache 2.0. Not tested, but they compile again. On that note ... how do you actually get a module into Apache 2.0? I tried to add mod_actions earlier today (./configure --enable-actions) but it didn't seem to result in a server that understood Action. Not sure I'm keen on that method of doing it, anyway. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/lib/apr/lib apr_md5.c
ben 99/12/30 14:18:24 Modified:src/lib/apr/lib apr_md5.c Log: Fix warning. Revision ChangesPath 1.7 +3 -0 apache-2.0/src/lib/apr/lib/apr_md5.c Index: apr_md5.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_md5.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- apr_md5.c 1999/12/19 18:10:01 1.6 +++ apr_md5.c 1999/12/30 22:18:19 1.7 @@ -110,6 +110,9 @@ #ifdef HAVE_CRYPT_H #include crypt.h #endif +#ifdef HAVE_UNISTD_H +#include unistd.h +#endif /* Constants for MD5Transform routine. */
Re: cvs commit: apache-2.0/src/lib/apr Makefile.in
Sascha Schumann wrote: On Wed, Dec 22, 1999 at 06:27:18PM +, Ben Laurie wrote: Sascha Schumann wrote: On Wed, Dec 22, 1999 at 05:52:05PM +, Ben Laurie wrote: Ryan Bloom wrote: On Wed, 22 Dec 1999, Ben Laurie wrote: [EMAIL PROTECTED] wrote: ben 99/12/22 03:46:36 Modified:src/lib/apr Makefile.in Log: We now link on FreeBSD 2.2.x. But somewhere recently we've started to require GNU make. When did that happen? Is it APR or Apache that is requiring GNU make? Diagnosed: its the include stuff. You can't say: -include $(DEP_FILES) in BSD make. You have to include them individually with .include and quotemarks... Does that work with GNU make? include filename is the portable version. Works with GNU, BSD, SysV make. Marvellous. In that case it is automake that is broken. I'm running v1.4. make clean? Yes, that's broken :( Eh? What I mean is that it is automake that is generation the -include directive that does not work with BSD make. So, I can't fix it unless we can fix automake. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr Makefile.in
[EMAIL PROTECTED] wrote: ben 99/12/22 03:46:36 Modified:src/lib/apr Makefile.in Log: We now link on FreeBSD 2.2.x. But somewhere recently we've started to require GNU make. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr Makefile.in
Ryan Bloom wrote: On Wed, 22 Dec 1999, Ben Laurie wrote: [EMAIL PROTECTED] wrote: ben 99/12/22 03:46:36 Modified:src/lib/apr Makefile.in Log: We now link on FreeBSD 2.2.x. But somewhere recently we've started to require GNU make. When did that happen? Is it APR or Apache that is requiring GNU make? Diagnosed: its the include stuff. You can't say: -include $(DEP_FILES) in BSD make. You have to include them individually with .include and quotemarks... Does that work with GNU make? Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr Makefile.in
Sascha Schumann wrote: On Wed, Dec 22, 1999 at 05:52:05PM +, Ben Laurie wrote: Ryan Bloom wrote: On Wed, 22 Dec 1999, Ben Laurie wrote: [EMAIL PROTECTED] wrote: ben 99/12/22 03:46:36 Modified:src/lib/apr Makefile.in Log: We now link on FreeBSD 2.2.x. But somewhere recently we've started to require GNU make. When did that happen? Is it APR or Apache that is requiring GNU make? Diagnosed: its the include stuff. You can't say: -include $(DEP_FILES) in BSD make. You have to include them individually with .include and quotemarks... Does that work with GNU make? include filename is the portable version. Works with GNU, BSD, SysV make. Aha. Thanks. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr Makefile.in
Sascha Schumann wrote: On Wed, Dec 22, 1999 at 05:52:05PM +, Ben Laurie wrote: Ryan Bloom wrote: On Wed, 22 Dec 1999, Ben Laurie wrote: [EMAIL PROTECTED] wrote: ben 99/12/22 03:46:36 Modified:src/lib/apr Makefile.in Log: We now link on FreeBSD 2.2.x. But somewhere recently we've started to require GNU make. When did that happen? Is it APR or Apache that is requiring GNU make? Diagnosed: its the include stuff. You can't say: -include $(DEP_FILES) in BSD make. You have to include them individually with .include and quotemarks... Does that work with GNU make? include filename is the portable version. Works with GNU, BSD, SysV make. Marvellous. In that case it is automake that is broken. I'm running v1.4. Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src buildconf configure.in
[EMAIL PROTECTED] wrote: manoj 99/12/19 17:54:40 Modified:src buildconf configure.in Log: Make Apache's configure script run APR's. OK, but the config.cache should still be removed, surely? Also, BTW, the current version completely fails to build for me (lots of unresolved externals) - what's the current recommended build path? I'm slightly puzzled by what's going on with APR - it seems to build a dozen different libraries, but Apache only seems to use one. What am I missing? Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/src buildconf configure.in
Ryan Bloom wrote: OK, but the config.cache should still be removed, surely? Also, BTW, the current version completely fails to build for me (lots of unresolved externals) - what's the current recommended build path? I'm slightly puzzled by what's going on with APR - it seems to build a dozen different libraries, but Apache only seems to use one. What am I missing? APR hasn't built a dozen different libraries for a long time. We are only building the one libapr.a. Should I send a log? Perhaps there's a step missing in the build? I dunno. I'm confused. What platform are you on? FreeBSD. I have the code working just fine on Linux and Windows. If you are using the prefork MPM, you have to specify LIBS=-lpthread. I let it choose (it chose threaded). If you are on any other platform, you are on your own. I'm _always_ on my own :-) The configure script has basically been written on Linux, and it is assumed it will be modified as we port 2.0. Consider me porting and modifying! Cheers, Ben. -- SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/helpers build-acconfig-header
ben 99/12/19 08:12:38 Modified:src/helpers build-acconfig-header Log: Directory to use wasn't set. Revision ChangesPath 1.2 +2 -0 apache-2.0/src/helpers/build-acconfig-header Index: build-acconfig-header === RCS file: /export/home/cvs/apache-2.0/src/helpers/build-acconfig-header,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build-acconfig-header 1999/11/29 23:45:28 1.1 +++ build-acconfig-header 1999/12/19 16:12:37 1.2 @@ -2,6 +2,8 @@ disclaimer=Do NOT edit - this file is generated by build-acconfig-header +dir=. + # security check - simply overwriting existing files could be harmful if test -w acconfig.h.new ; then echo Please remove acconfig.h.new and rerun this command
cvs commit: apache-2.0/src buildconf
ben 99/12/19 08:36:19 Modified:src buildconf Log: Build APR, too. Revision ChangesPath 1.2 +25 -0 apache-2.0/src/buildconf Index: buildconf === RCS file: /export/home/cvs/apache-2.0/src/buildconf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- buildconf 1999/11/29 23:44:50 1.1 +++ buildconf 1999/12/19 16:36:19 1.2 @@ -105,3 +105,28 @@ echo buildconf: created or modified configure fi +# Now do APR... + +echo buildconf: setting up APR + +cd lib/apr + +mv configure configure.old 2/dev/null +autoconf +if cmp configure.old configure /dev/null 21; then +echo buildconf: keeping configure +mv configure.old configure +else +echo buildconf: created or modified configure +fi + +cd ../.. + +# Now run the configs... + +rm config.cache +./configure + +cd lib/apr +rm config.cache +./configure
Re: cvs commit: apache-1.3/cgi-bin printenv
Marc Slemko wrote: 5. surround values with quotes to allow one to better recognize newlines (as in SERVER_SIGNATURE) and whitespaces and also print newlines as \n and as \ for a more Shell- and C-style syntax. Is it really standard to not display 's normally, but to stick a \ in front of them? I don't see that much. Standard or not, if you are going to do it, you really ought to replace \ with \\, too. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
[EMAIL PROTECTED] wrote: gstein 99/11/26 11:31:23 Modified:src/modules/standard mod_rewrite.c Log: The floating point rounding performed by the ap_snprintf() was throwing off the distribution of the random value. Nah, what threw it off was that it was just plain wrong. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/lib/apr/include apr_general.h
ben 99/11/09 00:53:53 Modified:src/lib/apr/include apr_general.h Log: configure makes sure ssize_t always exists. Revision ChangesPath 1.8 +0 -4 apache-2.0/src/lib/apr/include/apr_general.h Index: apr_general.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_general.h 1999/10/11 01:39:21 1.7 +++ apr_general.h 1999/11/09 08:53:53 1.8 @@ -114,11 +114,7 @@ #endif typedef size_t ap_size_t; -#ifdef ssize_t typedef ssize_tap_ssize_t; -#else -typedef intap_ssize_t; -#endif typedef off_t ap_off_t; typedef struct context_t ap_context_t;
cvs commit: apache-2.0/src/main util_script.c
ben 99/11/09 01:01:18 Modified:src/lib/apr configure.in src/lib/apr/include apr_general.h src/main util_script.c Log: Add printf format for ssize_t. Revision ChangesPath 1.23 +9 -8 apache-2.0/src/lib/apr/configure.in Index: configure.in === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/configure.in,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- configure.in 1999/10/21 21:13:15 1.22 +++ configure.in 1999/11/09 09:01:10 1.23 @@ -41,14 +41,6 @@ # This macro needs to be here in case we are on an AIX box. AC_AIX -dnl Checks for integer size -AC_CHECK_SIZEOF(char, 1) -AC_CHECK_SIZEOF(int, 4) -AC_CHECK_SIZEOF(long, 4) -AC_CHECK_SIZEOF(short, 2) -AC_CHECK_SIZEOF(long double, 12) -AC_CHECK_SIZEOF(long long, 8) - dnl Checks for standard typedefs AC_TYPE_OFF_T AC_TYPE_PID_T @@ -56,6 +48,15 @@ AC_TYPE_UID_T AC_CHECK_TYPE(ssize_t, int) AC_C_INLINE + +dnl Checks for integer size +AC_CHECK_SIZEOF(char, 1) +AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(short, 2) +AC_CHECK_SIZEOF(long double, 12) +AC_CHECK_SIZEOF(long long, 8) +AC_CHECK_SIZEOF(ssize_t, 4) # Use /bin/sh if it exists, otherwise go looking for sh in the path if test .$SH = . -a -f /bin/sh; then 1.9 +8 -0 apache-2.0/src/lib/apr/include/apr_general.h Index: apr_general.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr_general.h 1999/11/09 08:53:53 1.8 +++ apr_general.h 1999/11/09 09:01:14 1.9 @@ -117,6 +117,14 @@ typedef ssize_tap_ssize_t; typedef off_t ap_off_t; +#if SIZEOF_SSIZE_T == SIZEOF_INT +# define APR_SSIZE_T_FMT d +#elif SIZEOF_SSIZE_T == SIZEOF_LONG +# define APR_SSIZE_T_FMT ld +#else +# error Don't know ssize_t printf format +#endif + typedef struct context_t ap_context_t; typedef int ap_signum_t; 1.18 +2 -2 apache-2.0/src/main/util_script.c Index: util_script.c === RCS file: /export/home/cvs/apache-2.0/src/main/util_script.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- util_script.c 1999/10/31 09:26:03 1.17 +++ util_script.c 1999/11/09 09:01:15 1.18 @@ -639,13 +639,13 @@ ap_rputs( 1k, r); } else if (size 1048576) { - ap_rprintf(r, %4ldk, (size + 512) / 1024); + ap_rprintf(r, %4 APR_SSIZE_T_FMT k, (size + 512) / 1024); } else if (size 103809024) { ap_rprintf(r, %4.1fM, size / 1048576.0); } else { - ap_rprintf(r, %4ldM, (size + 524288) / 1048576); + ap_rprintf(r, %4 APR_SSIZE_T_FMT M, (size + 524288) / 1048576); } }
cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
ben 99/11/09 01:33:56 Modified:src/modules/mpm/prefork prefork.c Log: Fix error logging calls (kinda). Revision ChangesPath 1.50 +11 -9 apache-2.0/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- prefork.c 1999/10/24 13:08:29 1.49 +++ prefork.c 1999/11/09 09:33:52 1.50 @@ -202,7 +202,7 @@ } dir = ap_server_root_relative(pconf, buf[0] ? buf : dir); if(mkdir(dir, 0755) 0 errno != EEXIST) { - ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, gprof: error creating directory %s, dir); } } @@ -603,10 +603,11 @@ static void accept_mutex_child_init(ap_context_t *p) { ap_file_t *tempfile; +ap_status_t ret; -ap_open(tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, p); -if (!tempfile) { - ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, +ret=ap_open(tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, p); +if (ret != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_EMERG, ret, server_conf, Child cannot open lock file: %s, ap_lock_fname); clean_child_exit(APEXIT_CHILDINIT); } @@ -620,13 +621,14 @@ static void accept_mutex_init(ap_context_t *p) { ap_file_t *tempfile; +ap_status_t ret; expand_lock_fname(p); unlink(ap_lock_fname); -ap_open(tempfile, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, +ret=ap_open(tempfile, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, APR_UREAD|APR_UWRITE, p); -if (!tempfile) { - ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, +if (ret != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_EMERG, ret, server_conf, Parent cannot open lock file: %s, ap_lock_fname); exit(APEXIT_INIT); } @@ -642,7 +644,7 @@ continue; if (ret 0) { - ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, + ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf, flock: LOCK_EX: Error getting accept lock. Exiting!); clean_child_exit(APEXIT_CHILDFATAL); } @@ -651,7 +653,7 @@ static void accept_mutex_off(void) { if (flock(lock_fd, LOCK_UN) 0) { - ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, + ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf, flock: LOCK_UN: Error freeing accept lock. Exiting!); clean_child_exit(APEXIT_CHILDFATAL); }
cvs commit: apache-1.3/src/main http_request.c
ben 99/11/09 10:02:24 Modified:src/main http_request.c Log: Make sure that an error document that needs auth but hasn't got an auth type still reports a cascaded error. Revision ChangesPath 1.151 +1 -1 apache-1.3/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v retrieving revision 1.150 retrieving revision 1.151 diff -u -r1.150 -r1.151 --- http_request.c1999/10/21 20:44:43 1.150 +++ http_request.c1999/11/09 18:02:19 1.151 @@ -1176,7 +1176,7 @@ case SATISFY_ANY: if (((access_status = ap_check_access(r)) != 0) || !ap_auth_type(r)) { if (!ap_some_auth_required(r)) { -decl_die(access_status, ap_auth_type(r) +decl_die(access_status ? access_status : HTTP_INTERNAL_SERVER_ERROR, ap_auth_type(r) ? check access : perform authentication. AuthType not set!, r); return;
Re: cvs commit: apache-2.0/src/lib/apr/file_io/win32 fileacc.c
[EMAIL PROTECTED] wrote: stoddard99/11/02 06:24:57 Modified:src/lib/apr/file_io/win32 fileacc.c Log: call ap_getfileinfo if the file has not been stat'ed Eek! Can we use statted instead of stated for the member? This is bound to lead to confusion! Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/modules/standard mod_autoindex.c mod_log_config.c
ben 99/10/24 12:24:16 Modified:src/include util_script.h src/lib/apr/file_io/unix readwrite.c src/main buff.c http_protocol.c rfc1413.c util_script.c src/modules/standard mod_autoindex.c mod_log_config.c Log: Size rigour. Revision ChangesPath 1.3 +1 -1 apache-2.0/src/include/util_script.h Index: util_script.h === RCS file: /export/home/cvs/apache-2.0/src/include/util_script.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- util_script.h 1999/08/31 05:32:19 1.2 +++ util_script.h 1999/10/24 19:23:43 1.3 @@ -80,7 +80,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc) (char *, int, void *), void *getsfunc_data); -API_EXPORT(void) ap_send_size(size_t size, request_rec *r); +API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r); API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0, char **env, int shellcmd); 1.14 +1 -1 apache-2.0/src/lib/apr/file_io/unix/readwrite.c Index: readwrite.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- readwrite.c 1999/10/19 11:19:28 1.13 +++ readwrite.c 1999/10/24 19:23:55 1.14 @@ -358,7 +358,7 @@ va_list ap; ap_vformatter_buff_t vbuff; char *buf; -int len; +ap_ssize_t len; buf = malloc(HUGE_STRING_LEN); if (buf == NULL) { 1.11 +6 -3 apache-2.0/src/main/buff.c Index: buff.c === RCS file: /export/home/cvs/apache-2.0/src/main/buff.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- buff.c1999/10/22 22:08:15 1.10 +++ buff.c1999/10/24 19:23:57 1.11 @@ -318,7 +318,8 @@ /* a wrapper around iol_read which checks for errors and EOFs */ static int read_with_errors(BUFF *fb, void *buf, int nbyte) { -int rv, bytes_read; +int rv; +ap_ssize_t bytes_read; rv = iol_read(fb-iol, buf, nbyte, bytes_read); if (rv == APR_SUCCESS bytes_read == 0) { @@ -541,7 +542,8 @@ */ static int writev_with_errors(BUFF *fb, const struct iovec *vec, int nvec) { -int rv, bytes_written; +int rv; +ap_ssize_t bytes_written; rv = iol_writev(fb-iol, vec, nvec, bytes_written); if (rv != APR_SUCCESS) { @@ -687,7 +689,8 @@ */ static int write_with_errors(BUFF *fb, const void *buf, int nbyte) { -int rv, bytes_written; +int rv; +ap_ssize_t bytes_written; rv = iol_write(fb-iol, buf, nbyte, bytes_written); if (rv != APR_SUCCESS) { 1.24 +1 -1 apache-2.0/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/src/main/http_protocol.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- http_protocol.c 1999/10/20 12:49:55 1.23 +++ http_protocol.c 1999/10/24 19:23:58 1.24 @@ -2012,7 +2012,7 @@ char buf[IOBUFSIZE]; long total_bytes_sent = 0; register int w, o; -int n; +ap_ssize_t n; ap_status_t status; if (length == 0) 1.8 +2 -2 apache-2.0/src/main/rfc1413.c Index: rfc1413.c === RCS file: /export/home/cvs/apache-2.0/src/main/rfc1413.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- rfc1413.c 1999/10/24 05:59:18 1.7 +++ rfc1413.c 1999/10/24 19:24:00 1.8 @@ -155,7 +155,7 @@ #endif i = 0; while(i strlen(buffer)) { -int j = strlen(buffer + i); +ap_ssize_t j = strlen(buffer + i); ap_status_t status; status = ap_send(sock, buffer+i, j); if (status != APR_SUCCESS status != APR_EINTR) { @@ -181,7 +181,7 @@ * this allows it to work on both ASCII and EBCDIC machines. */ while((cp = strchr(buffer, '\012')) == NULL i sizeof(buffer) - 1) { -int j = sizeof(buffer) - 1 - i; +ap_ssize_t j = sizeof(buffer) - 1 - i; ap_status_t status; status = ap_recv(sock, buffer+i, j); if (status != APR_SUCCESS status != APR_EINTR) { 1.14 +4 -4 apache-2.0/src/main/util_script.c Index: util_script.c
Re: cvs commit: apache-2.0/src/modules/standard mod_cgi.c
[EMAIL PROTECTED] wrote: stoddard99/10/12 07:45:59 Modified:src/modules/standard mod_cgi.c Log: Fix bug interpreting cgi_child return code. Do some clean-up. Revision ChangesPath 1.8 +6 -16 apache-2.0/src/modules/standard/mod_cgi.c Index: mod_cgi.c === RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_cgi.c 1999/10/12 04:06:58 1.7 +++ mod_cgi.c 1999/10/12 14:45:57 1.8 @@ -295,7 +295,7 @@ char *argv0; }; -static int cgi_child(struct cgi_child_stuff *child_stuff, +static ap_status_t cgi_child(struct cgi_child_stuff *child_stuff, BUFF **script_out, BUFF **script_in, BUFF **script_err) { struct cgi_child_stuff *cld = child_stuff; @@ -308,7 +308,7 @@ ap_procattr_t *procattr; ap_proc_t *procnew; ap_os_proc_t fred; -int rc; +ap_status_t rc = APR_SUCCESS; #ifdef DEBUG_CGI #ifdef OS2 @@ -346,11 +346,6 @@ * NB only ISINDEX scripts get decoded arguments. */ -#ifdef TPF -ap_unblock_alarms(); - -return (0); -#else ap_cleanup_for_exec(); if ((ap_createprocattr_init(procattr, child_context) != APR_SUCCESS) || @@ -363,9 +358,7 @@ /* Something bad happened, tell the world. */ ap_log_rerror(APLOG_MARK, APLOG_ERR, r, couldn't create child process: %s, r-filename); -ap_unblock_alarms(); - -return (-1); +rc = !APR_SUCCESS; Errr, what? If the thing fails, you are supposed to return the error! Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src Configure
ben 99/10/10 05:17:42 Modified:src Configure Log: Always use autoconf if available. Revision ChangesPath 1.10 +1 -1 apache-2.0/src/Configure Index: Configure === RCS file: /export/home/cvs/apache-2.0/src/Configure,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Configure 1999/10/09 20:28:40 1.9 +++ Configure 1999/10/10 12:17:42 1.10 @@ -1725,7 +1725,7 @@ ## Add in the APR library. ## if [ -d ./lib/apr ]; then -if [ ! -f ./lib/apr/configure ]; then +if helpers/PrintPath -s autoconf; then echo + bootstrapping Apache Portable Runtime (APR) (cd lib/apr autoconf autoheader) fi
cvs commit: apache-2.0/src/lib/apr/include .cvsignore
ben 99/10/10 05:19:59 Modified:src/lib/apr/include .cvsignore Log: Ingore autoheader output. Revision ChangesPath 1.2 +1 -0 apache-2.0/src/lib/apr/include/.cvsignore Index: .cvsignore === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore1999/09/10 16:06:59 1.1 +++ .cvsignore1999/10/10 12:19:58 1.2 @@ -1 +1,2 @@ apr_config.h +apr_config.h.in
Re: cvs commit: apache-2.0/src Configure
[EMAIL PROTECTED] wrote: manoj 99/10/09 13:28:41 Modified:src Configure Log: Make Configure run autoheader in the APR directory. Revision ChangesPath 1.9 +1 -1 apache-2.0/src/Configure Index: Configure === RCS file: /home/cvs/apache-2.0/src/Configure,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -u -r1.8 -r1.9 --- Configure 1999/10/01 16:22:48 1.8 +++ Configure 1999/10/09 20:28:40 1.9 @@ -1727,7 +1727,7 @@ if [ -d ./lib/apr ]; then if [ ! -f ./lib/apr/configure ]; then echo + bootstrapping Apache Portable Runtime (APR) -(cd lib/apr autoconf) +(cd lib/apr autoconf autoheader) Ah. This really ought to be triggered by the existence of autoconf, or it doesn't actually help much (after the first time), does it? Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/lib/apr/network_io/unix poll.c
ben 99/10/05 04:13:14 Modified:src/lib/apr/network_io/unix poll.c Log: Use new parameter ordering. Revision ChangesPath 1.8 +1 -2 apache-2.0/src/lib/apr/network_io/unix/poll.c Index: poll.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/network_io/unix/poll.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- poll.c1999/10/04 16:37:11 1.7 +++ poll.c1999/10/05 11:13:09 1.8 @@ -283,8 +283,7 @@ #else/* Use select to mimic poll */ -ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t ** -new) +ap_status_t ap_setup_poll(struct pollfd_t **new, ap_context_t *cont, ap_int32_t num) { (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * num); if ((*new) == NULL) {
cvs commit: apache-2.0/src/modules/standard mod_asis.c
ben 99/10/05 04:57:42 Modified:src/modules/mpm/prefork prefork.c src/modules/standard mod_asis.c Log: Use new parameter orders. Revision ChangesPath 1.37 +2 -2 apache-2.0/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- prefork.c 1999/10/04 16:38:14 1.36 +++ prefork.c 1999/10/05 11:57:40 1.37 @@ -624,8 +624,8 @@ expand_lock_fname(p); unlink(ap_lock_fname); -ap_open(p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, - APR_UREAD|APR_UWRITE, tempfile); +ap_open(tempfile, p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, + APR_UREAD|APR_UWRITE); if (!tempfile) { ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, Parent cannot open lock file: %s, ap_lock_fname); 1.6 +1 -1 apache-2.0/src/modules/standard/mod_asis.c Index: mod_asis.c === RCS file: /export/home/cvs/apache-2.0/src/modules/standard/mod_asis.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_asis.c1999/10/04 16:38:15 1.5 +++ mod_asis.c1999/10/05 11:57:41 1.6 @@ -114,7 +114,7 @@ if (!r-header_only) { ap_off_t zero = 0; ap_seek(f, APR_CUR, zero); - ap_send_fd(thefd, r); + ap_send_fd(f, r); } ap_close(f);
cvs commit: apache-2.0/src/main listen.c
ben 99/09/18 04:48:17 Modified:src/lib/apr/include apr_network_io.h src/lib/apr/network_io/unix sockets.c src/main listen.c Log: Make ap_getipaddr threadsafe. Revision ChangesPath 1.6 +1 -1 apache-2.0/src/lib/apr/include/apr_network_io.h Index: apr_network_io.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apr_network_io.h 1999/09/14 13:37:21 1.5 +++ apr_network_io.h 1999/09/18 11:48:14 1.6 @@ -126,7 +126,7 @@ ap_status_t ap_setport(ap_socket_t *, ap_uint32_t); ap_status_t ap_setipaddr(ap_socket_t *, const char *); ap_status_t ap_getport(ap_socket_t *, ap_uint32_t *); -ap_status_t ap_getipaddr(ap_socket_t *, char **); +ap_status_t ap_getipaddr(char *buf, ap_ssize_t len, const ap_socket_t *sock); ap_status_t ap_setup_poll(ap_context_t *, ap_int32_t, ap_pollfd_t **); ap_status_t ap_poll(ap_pollfd_t *, ap_int32_t *, ap_int32_t); 1.8 +7 -5 apache-2.0/src/lib/apr/network_io/unix/sockets.c Index: sockets.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- sockets.c 1999/09/14 13:37:24 1.7 +++ sockets.c 1999/09/18 11:48:16 1.8 @@ -196,15 +196,17 @@ } /* ***APRDOC - * ap_status_t ap_getipaddr(ap_socket_t *, char **addr) + * ap_status_t ap_getipaddr(char *addr, int len, const ap_socket_t *) *Return the IP address associated with an apr socket. - * arg 1) The socket to use - * arg 2) The IP address associated with the socket. + * arg 1) A buffer for the IP address associated with the socket. + * arg 2) The total length of the buffer (including terminating NUL) + * arg 3) The socket to use */ -ap_status_t ap_getipaddr(struct socket_t *sock, char **addr) +ap_status_t ap_getipaddr(char *addr, ap_ssize_t len, + const struct socket_t *sock) { char *temp = inet_ntoa(sock-addr-sin_addr); -*addr=temp; +ap_cpystrn(addr,temp,len-1); return APR_SUCCESS; } 1.8 +2 -2 apache-2.0/src/main/listen.c Index: listen.c === RCS file: /export/home/cvs/apache-2.0/src/main/listen.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- listen.c 1999/09/08 14:15:43 1.7 +++ listen.c 1999/09/18 11:48:17 1.8 @@ -153,13 +153,13 @@ { ap_listen_rec **walk; ap_listen_rec *new; -char *oldaddr; +char oldaddr[17]; unsigned int oldport; /* see if we've got an old listener for this address:port */ for (walk = old_listeners; *walk; walk = (*walk)-next) { ap_getport((*walk)-sd, oldport); -ap_getipaddr((*walk)-sd, oldaddr); + ap_getipaddr(oldaddr,sizeof oldaddr,(*walk)-sd); if (!strcmp(oldaddr, addr) port == oldport) { /* re-use existing record */ new = *walk;
Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c
Ryan Bloom wrote: -if ((*new)-filedes 0 (*new)-filehand == NULL) { +if ((*new)-filedes 0 || (*new)-filehand == NULL) { (*new)-filedes = -1; (*new)-eof_hit = 1; return errno; This is wrong. This says that we NEVER open the file correctly. This is because we only ever set one of the two options, either the filedes or the filehand, NEVER both. Yeah but filedes == 0 when you use filehand (which is possibly a bug). We are checking for the error condition, not the successful case. Either the filedes or the filehand WILL be not set after each open. I have serious doubts that the code even works anymore. If it does, it is only because we aren't checking return code properly. OK, well it didn't work before, and it now does _when_ it is using filehand. I agree this it is still broken, though, but less so than before. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/lib/apr/lib apr_fnmatch.c apr_pools.c apr_snprintf.c
ben 99/09/12 03:52:18 Modified:src/lib/apr/file_io/unix filedup.c open.c readwrite.c src/lib/apr/include apr_lib.h src/lib/apr/lib apr_fnmatch.c apr_pools.c apr_snprintf.c Log: Fix warnings. Revision ChangesPath 1.2 +2 -0 apache-2.0/src/lib/apr/file_io/unix/filedup.c Index: filedup.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/filedup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- filedup.c 1999/08/17 15:59:36 1.1 +++ filedup.c 1999/09/12 10:52:13 1.2 @@ -86,6 +86,8 @@ case O_RDWR: buf_oflags = r+; break; + default: + return APR_BADARG; } (*new_file)-filehand = freopen(old_file-fname, buf_oflags, old_file-filehand); 1.9 +1 -3 apache-2.0/src/lib/apr/file_io/unix/open.c Index: open.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- open.c1999/09/11 20:42:58 1.8 +++ open.c1999/09/12 10:52:14 1.9 @@ -106,7 +106,6 @@ ap_status_t ap_open(ap_context_t *cont, const char *fname, ap_int32_t flag, ap_fileperms_t perm, struct file_t **new) { int oflags = 0; -struct stat info; mode_t mode = get_fileperms(perm); char *buf_oflags; @@ -266,7 +265,6 @@ */ ap_status_t ap_eof(ap_file_t *fptr) { -char ch; if (fptr-buffered) { if (feof(fptr-filehand) == 0) { return APR_SUCCESS; @@ -276,6 +274,6 @@ if (fptr-eof_hit == 1) { return APR_EOF; } -APR_SUCCESS; +return APR_SUCCESS; } 1.7 +0 -2 apache-2.0/src/lib/apr/file_io/unix/readwrite.c Index: readwrite.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- readwrite.c 1999/09/11 15:48:46 1.6 +++ readwrite.c 1999/09/12 10:52:14 1.7 @@ -194,8 +194,6 @@ */ ap_status_t ap_ungetc(ap_file_t *thefile, char ch) { -ssize_t rv; - if (thefile-buffered) { if (ungetc(ch, thefile-filehand) == ch) { thefile-stated = 0; 1.8 +2 -2 apache-2.0/src/lib/apr/include/apr_lib.h Index: apr_lib.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_lib.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_lib.h 1999/09/08 18:04:10 1.7 +++ apr_lib.h 1999/09/12 10:52:16 1.8 @@ -399,8 +399,8 @@ */ /*#ifdef TPF*/ -#define ap_block_alarms() (0) -#define ap_unblock_alarms() (0) +#define ap_block_alarms() +#define ap_unblock_alarms() /*#else API_EXPORT(void) ap_block_alarms(void); API_EXPORT(void) ap_unblock_alarms(void); 1.3 +3 -0 apache-2.0/src/lib/apr/lib/apr_fnmatch.c Index: apr_fnmatch.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_fnmatch.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- apr_fnmatch.c 1999/08/31 05:32:34 1.2 +++ apr_fnmatch.c 1999/09/12 10:52:17 1.3 @@ -48,6 +48,9 @@ #include apr_fnmatch.h #include apr_lib.h #include string.h +#ifdef HAVE_CTYPE_H +# include ctype.h +#endif #define EOS '\0' 1.9 +1 -1 apache-2.0/src/lib/apr/lib/apr_pools.c Index: apr_pools.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr_pools.c 1999/09/08 19:56:21 1.8 +++ apr_pools.c 1999/09/12 10:52:17 1.9 @@ -802,7 +802,6 @@ blok = a-last; first_avail = blok-h.first_avail; -new_first_avail; if (reqsize = 0) { return NULL; @@ -1174,6 +1173,7 @@ API_EXPORT_NONSTD(ap_status_t) ap_null_cleanup(void *data) { /* do nothing cleanup routine */ +return APR_SUCCESS; } /* 1.2 +3 -0 apache-2.0/src/lib/apr/lib/apr_snprintf.c Index: apr_snprintf.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_snprintf.c,v retrieving revision 1.1 retrieving revision 1.2 diff
cvs commit: apache-2.0/src/lib/apr/file_io/unix readwrite.c
ben 99/09/12 03:54:37 Modified:src/lib/apr/file_io/unix readwrite.c Log: Detect EOF correctly, fix a couple of minor warnings. Revision ChangesPath 1.8 +10 -4 apache-2.0/src/lib/apr/file_io/unix/readwrite.c Index: readwrite.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- readwrite.c 1999/09/12 10:52:14 1.7 +++ readwrite.c 1999/09/12 10:54:37 1.8 @@ -217,9 +217,14 @@ ssize_t rv; if (thefile-buffered) { -if ((*ch) = fgetc(thefile-filehand)) { -return APR_SUCCESS; -} +int r; + + r=fgetc(thefile-filehand); + if(r != EOF) + { + *ch=(char)r; + return APR_SUCCESS; + } if (feof(thefile-filehand)) { return APR_EOF; } @@ -245,7 +250,6 @@ ap_status_t ap_puts(ap_file_t *thefile, char *str) { ssize_t rv; -int i = 0; int len; if (thefile-buffered) { @@ -320,6 +324,7 @@ return APR_SUCCESS; } +#if 0 /* not currently used */ static int printf_flush(ap_vformatter_buff_t *vbuff) { /* I would love to print this stuff out to the file, but I will @@ -327,6 +332,7 @@ */ return -1; } +#endif API_EXPORT(int) ap_fprintf(struct file_t *fptr, const char *format, ...) {
cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
ben 99/09/11 03:26:00 Modified:src/modules/mpm/prefork prefork.c Log: Make prefork compile on FreeBSD. Revision ChangesPath 1.34 +13 -5 apache-2.0/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- prefork.c 1999/09/08 14:15:49 1.33 +++ prefork.c 1999/09/11 10:25:59 1.34 @@ -590,9 +590,11 @@ static int lock_fd = -1; -static void accept_mutex_cleanup(void *foo) +static ap_status_t accept_mutex_cleanup(void *foo) { unlink(ap_lock_fname); + +return APR_SUCCESS; } /* @@ -601,13 +603,15 @@ */ static void accept_mutex_child_init(ap_context_t *p) { +ap_file_t *tempfile; -lock_fd = ap_popenf(p, ap_lock_fname, O_WRONLY, 0600); -if (lock_fd == -1) { +ap_open(p, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, tempfile); +if (!tempfile) { ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, Child cannot open lock file: %s, ap_lock_fname); clean_child_exit(APEXIT_CHILDINIT); } +ap_get_os_file(tempfile, lock_fd); } /* @@ -616,14 +620,18 @@ */ static void accept_mutex_init(ap_context_t *p) { +ap_file_t *tempfile; + expand_lock_fname(p); unlink(ap_lock_fname); -lock_fd = ap_popenf(p, ap_lock_fname, O_CREAT | O_WRONLY | O_EXCL, 0600); -if (lock_fd == -1) { +ap_open(p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, + APR_UREAD|APR_UWRITE, tempfile); +if (!tempfile) { ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, Parent cannot open lock file: %s, ap_lock_fname); exit(APEXIT_INIT); } +ap_get_os_file(tempfile, lock_fd); ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup); }
Re: cvs commit: apache-2.0/src/modules/mpm/mpmt_pthread acceptlock.c scoreboard.c
[EMAIL PROTECTED] wrote: -lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600); +ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, tempfile); +ap_get_os_file(tempfile, *lock_fd[i]); Que? *lock_fd[i]? Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/src/main http_main.c
ben 99/09/11 12:52:28 Modified:src/main http_main.c Log: Really get rid of unused options. Revision ChangesPath 1.6 +1 -1 apache-2.0/src/main/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache-2.0/src/main/http_main.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- http_main.c 1999/08/31 05:32:58 1.5 +++ http_main.c 1999/09/11 19:52:27 1.6 @@ -277,7 +277,7 @@ ap_setup_prelinked_modules(); -while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLR:th)) != -1) { +while ((c = getopt(argc, argv, C:c:d:f:vVlLth)) != -1) { char **new; switch (c) { case 'c':
cvs commit: apache-2.0/src Makefile.tmpl
ben 99/09/11 13:42:24 Modified:src Makefile.tmpl Log: Build APR automatically. Revision ChangesPath 1.7 +4 -1 apache-2.0/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/src/Makefile.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.tmpl 1999/09/10 16:06:53 1.6 +++ Makefile.tmpl 1999/09/11 20:42:19 1.7 @@ -28,7 +28,10 @@ @echo ++ If not, you will at least have to touch '@@Configuration@@'. @false -$(TARGET): $(EXTRA_DEPS) $(SUBTARGET) +apr: + cd lib/apr; make + +$(TARGET): apr $(EXTRA_DEPS) $(SUBTARGET) target_static: subdirs modules.o $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c
ben 99/09/11 13:42:58 Modified:src/lib/apr/file_io/unix open.c Log: Test for open failure correctly. Revision ChangesPath 1.8 +1 -1 apache-2.0/src/lib/apr/file_io/unix/open.c Index: open.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- open.c1999/09/07 21:24:37 1.7 +++ open.c1999/09/11 20:42:58 1.8 @@ -168,7 +168,7 @@ } } -if ((*new)-filedes 0 (*new)-filehand == NULL) { +if ((*new)-filedes 0 || (*new)-filehand == NULL) { (*new)-filedes = -1; (*new)-eof_hit = 1; return errno;
cvs commit: apache-2.0/src/modules/standard mod_negotiation.c
ben 99/09/11 15:14:12 Modified:src/modules/standard mod_negotiation.c Log: Use return status instead of character value for EOF. Revision ChangesPath 1.5 +3 -2 apache-2.0/src/modules/standard/mod_negotiation.c Index: mod_negotiation.c === RCS file: /export/home/cvs/apache-2.0/src/modules/standard/mod_negotiation.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_negotiation.c 1999/09/08 14:15:55 1.4 +++ mod_negotiation.c 1999/09/11 22:14:11 1.5 @@ -678,8 +678,9 @@ * so that we will pick up the blank line the next time 'round. */ -while (c != EOF c != '\n' ap_isspace(c)) { -ap_getc(map, c); +while (c != '\n' ap_isspace(c)) { +if(ap_getc(map, c) != APR_SUCCESS) + break; } ap_ungetc(map, c);
cvs commit: apache-2.0/src/main http_core.c http_protocol.c
ben 99/09/11 15:14:43 Modified:src/include http_protocol.h src/main http_core.c http_protocol.c Log: Fix warnings. Revision ChangesPath 1.5 +2 -1 apache-2.0/src/include/http_protocol.h Index: http_protocol.h === RCS file: /export/home/cvs/apache-2.0/src/include/http_protocol.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_protocol.h 1999/09/08 14:15:40 1.4 +++ http_protocol.h 1999/09/11 22:14:35 1.5 @@ -173,7 +173,8 @@ /* Sending a byterange */ API_EXPORT(int) ap_set_byterange(request_rec *r); -API_EXPORT(int) ap_each_byterange(request_rec *r, long *offset, long *length); +API_EXPORT(int) ap_each_byterange(request_rec *r, ap_off_t *offset, + long *length); /* Support for the Basic authentication protocol. Note that there's * nothing that prevents these from being in mod_auth.c, except that other 1.12 +2 -1 apache-2.0/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/src/main/http_core.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- http_core.c 1999/09/08 14:15:42 1.11 +++ http_core.c 1999/09/11 22:14:36 1.12 @@ -2624,7 +2624,8 @@ ap_send_mmap(mm, r, 0, r-finfo.st_size); } else { - long offset, length; + ap_off_t offset; + long length; while (ap_each_byterange(r, offset, length)) { ap_send_mmap(mm, r, offset, length); } 1.15 +6 -4 apache-2.0/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/src/main/http_protocol.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- http_protocol.c 1999/09/08 14:15:43 1.14 +++ http_protocol.c 1999/09/11 22:14:37 1.15 @@ -122,8 +122,8 @@ return (*start 0 || *end clength - 1); } -static int internal_byterange(int, long *, request_rec *, const char **, long *, - long *); +static int internal_byterange(int, long *, request_rec *, const char **, + ap_off_t *, long *); API_EXPORT(int) ap_set_byterange(request_rec *r) { @@ -198,7 +198,8 @@ return 1; } -API_EXPORT(int) ap_each_byterange(request_rec *r, long *offset, long *length) +API_EXPORT(int) ap_each_byterange(request_rec *r, ap_off_t *offset, + long *length) { return internal_byterange(1, NULL, r, r-range, offset, length); } @@ -214,7 +215,8 @@ * when done. */ static int internal_byterange(int realreq, long *tlength, request_rec *r, - const char **r_range, long *offset, long *length) + const char **r_range, ap_off_t *offset, + long *length) { long range_start, range_end; char *range;
cvs commit: apache-2.0/mpm/src/lib/apr/network_io/unix poll.c
ben 99/08/18 08:54:19 Modified:mpm/src/lib/apr config.status mpm/src/lib/apr/include apr_config.h mpm/src/lib/apr/network_io/unix poll.c Log: Use sys/time.h to get timeval. Correct typo. Revision ChangesPath 1.3 +57 -95apache-2.0/mpm/src/lib/apr/Attic/config.status 1.3 +13 -10apache-2.0/mpm/src/lib/apr/include/Attic/apr_config.h 1.3 +6 -3 apache-2.0/mpm/src/lib/apr/network_io/unix/poll.c Index: poll.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/lib/apr/network_io/unix/poll.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- poll.c1999/08/18 13:33:28 1.2 +++ poll.c1999/08/18 15:54:18 1.3 @@ -60,6 +60,9 @@ #ifdef HAVE_ERRNO_H #include errno.h #endif +#ifdef HAVE_SYS_TIME_H +#include sys/time.h +#endif #ifdef HAVE_POLL/* We can just use poll to do our socket polling. */ @@ -396,13 +399,13 @@ ap_status_t ap_remove_poll_socket(struct pollfd_t *aprset, struct socket_t *sock, ap_int16_t events) { -if (event APR_POLLIN) { +if (events APR_POLLIN) { FD_CLR(sock-socketdes, aprset-read); } -if (event APR_POLLPRI) { +if (events APR_POLLPRI) { FD_CLR(sock-socketdes, aprset-read); } -if (event APR_POLLOUT) { +if (events APR_POLLOUT) { FD_CLR(sock-socketdes, aprset-write); } return APR_SUCCESS;
cvs commit: apache-2.0 emacs-style
ben 99/08/15 14:55:19 Modified:.emacs-style Log: Get case indent right. Revision ChangesPath 1.2 +1 -0 apache-2.0/emacs-style Index: emacs-style === RCS file: /export/home/cvs/apache-2.0/emacs-style,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- emacs-style 1999/08/01 15:20:53 1.1 +++ emacs-style 1999/08/15 21:55:19 1.2 @@ -5,5 +5,6 @@ (c-set-offset 'statement-block-intro' ++) (c-set-offset 'substatement' ++) (c-set-offset 'brace-list-intro' ++) + (c-set-offset 'statement-case-intro' ++) ))) (setq c++-mode-hook c-mode-hook)
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/08/01 07:43:32 Modified:mpm/src/include http_config.h mpm/src/main http_config.c http_core.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision ChangesPath 1.14 +3 -2 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- http_config.h 1999/08/01 14:12:29 1.13 +++ http_config.h 1999/08/01 14:43:22 1.14 @@ -211,7 +211,6 @@ * (see also mod_so). */ -void (*post_config)(pool *pconf, pool *plog, pool *ptemp, server_rec *); void (*child_init)(pool *pchild, server_rec *); void *(*create_dir_config) (pool *p, char *dir); @@ -374,8 +373,10 @@ /* Hooks */ DECLARE_HOOK(int,header_parser,(request_rec *)) DECLARE_HOOK(void,pre_config,(pool *pconf,pool *plog,pool *ptemp)) +DECLARE_HOOK(void,post_config, + (pool *pconf,pool *plog,pool *ptemp,server_rec *s)) DECLARE_HOOK(void,open_logs, - (pool *pconf, pool *plog, pool *ptemp, server_rec *s)) + (pool *pconf,pool *plog,pool *ptemp,server_rec *s)) #ifdef __cplusplus } 1.18 +5 -5 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- http_config.c 1999/08/01 14:12:30 1.17 +++ http_config.c 1999/08/01 14:43:23 1.18 @@ -84,12 +84,16 @@ HOOK_STRUCT( HOOK_LINK(header_parser) HOOK_LINK(pre_config) + HOOK_LINK(post_config) HOOK_LINK(open_logs) ) IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) IMPLEMENT_HOOK_VOID(pre_config,(pool *pconf,pool *plog,pool *ptemp), (pconf,plog,ptemp)) +IMPLEMENT_HOOK_VOID(post_config, + (pool *pconf, pool *plog, pool *ptemp, server_rec *s), + (pconf,plog,ptemp,s)) IMPLEMENT_HOOK_VOID(open_logs, (pool *pconf, pool *plog, pool *ptemp, server_rec *s), (pconf,plog,ptemp,s)) @@ -1446,11 +1450,7 @@ void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s) { -module *m; - -for (m = top_module; m; m = m-next) - if (m-post_config) - (*m-post_config) (pconf, plog, ptemp, s); +ap_run_post_config(pconf,plog,ptemp,s); build_method_shortcuts(); init_handlers(pconf); } 1.15 +0 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- http_core.c 1999/08/01 14:12:30 1.14 +++ http_core.c 1999/08/01 14:43:23 1.15 @@ -2650,7 +2650,6 @@ API_VAR_EXPORT module core_module = { STANDARD20_MODULE_STUFF, -NULL,/* post_config */ NULL,/* child_init */ create_core_dir_config, /* create per-directory config structure */ merge_core_dir_configs, /* merge per-directory config structures */ 1.23 +0 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- prefork.c 1999/08/01 14:12:31 1.22 +++ prefork.c 1999/08/01 14:43:24 1.23 @@ -3084,7 +3084,6 @@ module MODULE_VAR_EXPORT mpm_prefork_module = { STANDARD20_MODULE_STUFF, -NULL,/* post_config */ NULL,/* child_init */ NULL,/* create per-directory config structure */ NULL,/* merge per-directory config structures */ 1.12 +0 -1 apache-2.0/mpm/src/modules/standard/mod_access.c Index: mod_access.c === RCS file: /export/home/cvs/apache-2.0/mpm
cvs commit: apache-2.0 emacs-style
ben 99/08/01 08:20:53 Added: .emacs-style Log: Set up emacs for the Apache Style Guide. Revision ChangesPath 1.1 apache-2.0/emacs-style Index: emacs-style === (add-hook 'c-mode-hook (function (lambda () (c-set-offset 'inclass' ++) (c-set-offset 'defun-block-intro' ++) (c-set-offset 'statement-block-intro' ++) (c-set-offset 'substatement' ++) (c-set-offset 'brace-list-intro' ++) ))) (setq c++-mode-hook c-mode-hook)
cvs commit: apache-2.0/mpm/src/ap ap_hooks.c
ben 99/08/01 13:26:31 Modified:mpm/src/ap ap_hooks.c Log: Reformat according to style guide. Revision ChangesPath 1.4 +54 -65apache-2.0/mpm/src/ap/ap_hooks.c Index: ap_hooks.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/ap_hooks.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ap_hooks.c1999/07/19 06:50:10 1.3 +++ ap_hooks.c1999/08/01 20:26:31 1.4 @@ -8,53 +8,51 @@ /* NB: This must echo the LINK_##name structure */ typedef struct -{ +{ void (*dummy)(void *); const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; -} TSortData; +} TSortData; typedef struct tsort_ -{ +{ void *pData; int nPredecessors; struct tsort_ **ppPredecessors; struct tsort_ *pNext; -} TSort; +} TSort; static int crude_order(const void *a_,const void *b_) -{ +{ const TSortData *a=a_; const TSortData *b=b_; return a-nOrder-b-nOrder; -} +} static TSort *prepare(pool *p,TSortData *pItems,int nItems) -{ +{ TSort *pData=ap_palloc(p,nItems*sizeof *pData); int n; - + qsort(pItems,nItems,sizeof *pItems,crude_order); -for(n=0 ; n nItems ; ++n) - { +for(n=0 ; n nItems ; ++n) { pData[n].nPredecessors=0; pData[n].ppPredecessors=ap_palloc(p,nItems*sizeof *pData[n].ppPredecessors); pData[n].pNext=NULL; pData[n].pData=pItems[n]; - } +} -for(n=0 ; n nItems ; ++n) - { +for(n=0 ; n nItems ; ++n) { int i,k; for(i=0 ; pItems[n].aszPredecessors pItems[n].aszPredecessors[i] ; ++i) for(k=0 ; k nItems ; ++k) - if(!strcmp(pItems[k].szName,pItems[n].aszPredecessors[i])) - { + if(!strcmp(pItems[k].szName,pItems[n].aszPredecessors[i])) { int l; + for(l=0 ; l pData[n].nPredecessors ; ++l) if(pData[n].ppPredecessors[l] == pData[k]) goto got_it; @@ -62,12 +60,12 @@ ++pData[n].nPredecessors; got_it: break; - } + } for(i=0 ; pItems[n].aszSuccessors pItems[n].aszSuccessors[i] ; ++i) for(k=0 ; k nItems ; ++k) - if(!strcmp(pItems[k].szName,pItems[n].aszSuccessors[i])) - { + if(!strcmp(pItems[k].szName,pItems[n].aszSuccessors[i])) { int l; + for(l=0 ; l pData[k].nPredecessors ; ++l) if(pData[k].ppPredecessors[l] == pData[n]) goto got_it2; @@ -75,29 +73,27 @@ ++pData[k].nPredecessors; got_it2: break; - } - } + } +} return pData; -} +} static TSort *tsort(TSort *pData,int nItems) -{ +{ int nTotal; TSort *pHead=NULL; TSort *pTail=NULL; -for(nTotal=0 ; nTotal nItems ; ++nTotal) - { +for(nTotal=0 ; nTotal nItems ; ++nTotal) { int n,i,k; - for(n=0 ; ; ++n) - { + for(n=0 ; ; ++n) { if(n == nItems) assert(0); /* // we have a loop... */ if(!pData[n].pNext !pData[n].nPredecessors) break; - } + } if(pTail) pTail-pNext=pData[n]; else @@ -106,18 +102,17 @@ pTail-pNext=pTail; /* // fudge it so it looks linked */ for(i=0 ; i nItems ; ++i) for(k=0 ; pData[i].ppPredecessors[k] ; ++k) - if(pData[i].ppPredecessors[k] == pData[n]) - { + if(pData[i].ppPredecessors[k] == pData[n]) { --pData[i].nPredecessors; break; - } - } + } +} pTail-pNext=NULL; /* // unfudge the tail */ return pHead; -} +} static array_header *sort_hook(array_header *pHooks,const char *szName) -{ +{ pool *p=ap_make_sub_pool(g_pHookPool); TSort *pSort; array_header *pNew; @@ -128,29 +123,28 @@ pNew=ap_make_array(g_pHookPool,pHooks-nelts,sizeof(TSortData)); if(g_bDebugHooks) printf(Sorting %s:,szName); -for(n=0 ; pSort ; pSort=pSort-pNext,++n) - { +for(n=0 ; pSort ; pSort=pSort-pNext,++n) { TSortData *pHook; assert(n pHooks-nelts); pHook=ap_push_array(pNew); memcpy(pHook,pSort-pData,sizeof *pHook); if(g_bDebugHooks) printf( %s,pHook-szName
cvs commit: apache-2.0/mpm/src/main http_config.c http_connection.c http_protocol.c http_request.c
ben 99/07/31 02:31:28 Modified:mpm/src/include ap_hooks.h mpm/src/main http_config.c http_connection.c http_protocol.c http_request.c Log: Break out the hook implementations into three kinds, thus avoiding null macro arguments. Gates made me do it! Revision ChangesPath 1.10 +55 -18apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ap_hooks.h1999/07/27 21:16:36 1.9 +++ ap_hooks.h1999/07/31 09:31:17 1.10 @@ -21,7 +21,7 @@ #define HOOK_LINK(name) \ array_header *link_##name; -#define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,term1,term2,rv_final) \ +#define IMPLEMENT_HOOK_BASE(name) \ void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre, \ const char * const *aszSucc,int nOrder) \ { \ @@ -39,37 +39,74 @@ pHook-szName=g_szCurrentHookName; \ if(g_bDebugHooks) \ ap_show_hook(#name,aszPre,aszSucc); \ -} \ -ret ap_run_##name args \ +} + +/* RUN_ALL runs to the first one to return other than ok or decline + RUN_FIRST runs to the first one to return other than decline + VOID runs all +*/ + +#define IMPLEMENT_HOOK_VOID(name,args_decl,args_use) \ +IMPLEMENT_HOOK_BASE(name) \ +void ap_run_##name args_decl \ +{ \ +LINK_##name *pHook; \ +int n; \ +\ +if(!_hooks.link_##name) \ + return; \ +\ +pHook=(LINK_##name *)_hooks.link_##name-elts; \ +for(n=0 ; n _hooks.link_##name-nelts ; ++n) \ + pHook[n].pFunc args_use; \ +} + +/* FIXME: note that this returns ok when nothing is run. I suspect it should + really return decline, but that breaks Apache currently - Ben +*/ +#define IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \ +IMPLEMENT_HOOK_BASE(name) \ +ret ap_run_##name args_decl \ { \ LINK_##name *pHook; \ int n; \ -rv_decl \ +ret rv; \ \ if(!_hooks.link_##name) \ - return rv_final; \ + return ok; \ \ pHook=(LINK_##name *)_hooks.link_##name-elts; \ for(n=0 ; n _hooks.link_##name-nelts ; ++n) \ { \ - sv pHook[n].pFunc args2; \ + rv=pHook[n].pFunc args_use; \ \ - if(term1 (!run_all || term2)) \ + if(rv != ok rv != decline) \ return rv; \ } \ -return rv_final; \ +return ok; \ } -/* RUN_ALL runs to the first one to return other than ok or decline - RUN_FIRST runs to the first one to return other than ok -*/ -#define RUN_ALL 1 -#define RUN_FIRST0 - -#define IMPLEMENT_HOOK(ret,name,args,args2,run_all,ok,decline) \ - IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != decline,r_ != ok,run_all ? ok : decline) -#define IMPLEMENT_VOID_HOOK(name,args,args2) \ - IMPLEMENT_HOOK_BASE(voidname,args,args2,RUN_ALL,1,0,) +#define IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \ +IMPLEMENT_HOOK_BASE(name) \ +ret ap_run_##name args_decl \ +{ \ +LINK_##name *pHook; \ +int n; \ +ret rv; \ +\ +if(!_hooks.link_##name) \ + return decline; \ +\ +pHook=(LINK_##name *)_hooks.link_##name-elts; \ +for(n=0 ; n _hooks.link_##name-nelts ; ++n) \ + { \ + rv=pHook[n].pFunc args_use; \ +\ + if(rv != decline) \ + return rv; \ + } \ +return decline; \ +} /* Hook orderings */ #define HOOK_REALLY_FIRST(-10) 1.16 +2 -2 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- http_config.c 1999/07/27 21:16:38 1.15 +++ http_config.c 1999/07/31 09:31:20 1.16 @@ -86,8 +86,8 @@ HOOK_LINK(pre_config) ) -IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) -IMPLEMENT_VOID_HOOK(pre_config,(pool *pconf,pool *plog,pool *ptemp), +IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) +IMPLEMENT_HOOK_VOID(pre_config,(pool *pconf,pool *plog,pool *ptemp), (pconf,plog,ptemp)) DEF_Explain 1.14 +2 -2 apache-2.0/mpm/src/main/http_connection.c Index: http_connection.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_connection.c,v retrieving revision 1.13 retrieving revision 1.14
Re: cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
[EMAIL PROTECTED] wrote: manoj 99/07/29 13:06:20 Modified:mpm/src/modules/mpm/dexter dexter.c mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c Log: Use Ben Hyde's warning fix on two other MPMs. Tch! Ben Laurie! Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/mpm/src/modules/mpm/prefork prefork.c
ben 99/07/27 06:31:21 Modified:mpm/src/modules/mpm/prefork prefork.c Log: Fix a warning. Revision ChangesPath 1.20 +1 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- prefork.c 1999/07/27 12:05:04 1.19 +++ prefork.c 1999/07/27 13:31:20 1.20 @@ -2872,7 +2872,7 @@ { static int restart_num = 0; -one_process = getenv(ONE_PROCESS); +one_process = !!getenv(ONE_PROCESS); /* sigh, want this only the second time around */ if (restart_num++ == 1) {
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/27 14:16:53 Modified:mpm/src/include ap_hooks.h http_config.h mpm/src/main http_config.c http_connection.c http_core.c http_main.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook (I won't be upset if someone else wants to do some!). Revision ChangesPath 1.9 +2 -2 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ap_hooks.h1999/07/22 19:17:15 1.8 +++ ap_hooks.h1999/07/27 21:16:36 1.9 @@ -68,8 +68,8 @@ #define IMPLEMENT_HOOK(ret,name,args,args2,run_all,ok,decline) \ IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != decline,r_ != ok,run_all ? ok : decline) -#define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \ - IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,1,0,) +#define IMPLEMENT_VOID_HOOK(name,args,args2) \ + IMPLEMENT_HOOK_BASE(voidname,args,args2,RUN_ALL,1,0,) /* Hook orderings */ #define HOOK_REALLY_FIRST(-10) 1.12 +1 -2 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- http_config.h 1999/07/27 12:04:59 1.11 +++ http_config.h 1999/07/27 21:16:36 1.12 @@ -211,7 +211,6 @@ * (see also mod_so). */ -void (*pre_config)(pool *pconf, pool *plog, pool *ptemp); void (*open_logs)(pool *pconf, pool *plog, pool *ptemp, server_rec *); void (*post_config)(pool *pconf, pool *plog, pool *ptemp, server_rec *); void (*child_init)(pool *pchild, server_rec *); @@ -333,7 +332,6 @@ void ap_setup_prelinked_modules(void); void ap_show_directives(void); void ap_show_modules(void); -void ap_pre_config_hook(pool *pconf, pool *plog, pool *ptemp); server_rec *ap_read_config(pool *conf_pool, pool *temp_pool, const char *config_name); void ap_open_logs_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s); void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s); @@ -375,6 +373,7 @@ /* Hooks */ DECLARE_HOOK(int,header_parser,(request_rec *)) +DECLARE_HOOK(void,pre_config,(pool *pconf,pool *plog,pool *ptemp)) #endif 1.15 +5 -11 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- http_config.c 1999/07/27 12:05:00 1.14 +++ http_config.c 1999/07/27 21:16:38 1.15 @@ -83,8 +83,13 @@ HOOK_STRUCT( HOOK_LINK(header_parser) + HOOK_LINK(pre_config) ) +IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) +IMPLEMENT_VOID_HOOK(pre_config,(pool *pconf,pool *plog,pool *ptemp), + (pconf,plog,ptemp)) + DEF_Explain / @@ -362,8 +367,6 @@ return run_method(r, offsets_into_method_ptrs.access_checker, 1); } -IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) - /* Auth stuff --- anything that defines one of these will presumably * want to define something for the other. Note that check_auth is * separate from check_access to make catching some config errors easier. @@ -1435,15 +1438,6 @@ if (m-create_dir_config) ap_set_module_config(s-lookup_defaults, m, (*m-create_dir_config)(p, NULL)); -} - -void ap_pre_config_hook(pool *pconf, pool *plog, pool *ptemp) -{ -module *m; - -for (m = top_module; m; m = m-next) - if (m-pre_config) - (*m-pre_config) (pconf, plog, ptemp); } void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s) 1.13 +1 -1 apache-2.0/mpm/src/main/http_connection.c Index: http_connection.c === RCS file: /export/home/cvs/apache-2.0/mpm
cvs commit: apache-2.0/mpm/src/modules/mpm/prefork prefork.c
ben 99/07/25 06:58:59 Modified:mpm/src/modules/mpm/prefork prefork.c Log: Good grief! How hard is it to try _all_ the elements in a list? Revision ChangesPath 1.17 +4 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- prefork.c 1999/07/24 18:38:55 1.16 +++ prefork.c 1999/07/25 13:58:58 1.17 @@ -2061,6 +2061,7 @@ struct sockaddr sa_client; ap_listen_rec *lr; ap_listen_rec *last_lr; +ap_listen_rec *first_lr; pool *ptrans; conn_rec *current_conn; ap_iol *iol; @@ -2160,7 +2161,8 @@ else { lr = last_lr-next; } - while (lr != last_lr) { + first_lr=lr; + do { if (!lr) { lr = ap_listeners; } @@ -2168,6 +2170,7 @@ goto got_listener; lr = lr-next; } + while (lr != first_lr); continue; got_listener: last_lr = lr;
cvs commit: apache-2.0/mpm/src/modules/mpm/prefork prefork.c
ben 99/07/25 07:03:17 Modified:mpm/src/modules/mpm/prefork prefork.c Log: Make sure we terminate. Revision ChangesPath 1.18 +7 -3 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- prefork.c 1999/07/25 13:58:58 1.17 +++ prefork.c 1999/07/25 14:03:16 1.18 @@ -2160,17 +2160,21 @@ } else { lr = last_lr-next; + if (!lr) + lr = ap_listeners; } first_lr=lr; do { - if (!lr) { - lr = ap_listeners; - } if (FD_ISSET(lr-fd, main_fds)) goto got_listener; lr = lr-next; + if (!lr) + lr = ap_listeners; } while (lr != first_lr); + /* FIXME: if we get here, something bad has happened, and we're +probably gonna spin forever. + */ continue; got_listener: last_lr = lr;
cvs commit: apache-2.0/mpm/src/main http_core.c http_protocol.c util.c
ben 99/07/25 07:24:03 Modified:mpm/src/include http_protocol.h httpd.h mpm/src/main http_core.c http_protocol.c util.c Log: Add some more hooks. Revision ChangesPath 1.4 +2 -0 apache-2.0/mpm/src/include/http_protocol.h Index: http_protocol.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_protocol.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_protocol.h 1999/07/17 10:35:34 1.3 +++ http_protocol.h 1999/07/25 14:24:00 1.4 @@ -225,6 +225,8 @@ */ DECLARE_HOOK(int,post_read_request,(request_rec *)) DECLARE_HOOK(int,log_transaction,(request_rec *)) +DECLARE_HOOK(const char *,http_method,(const request_rec *)) +DECLARE_HOOK(unsigned short,default_port,(const request_rec *)) #ifdef __cplusplus } 1.9 +2 -2 apache-2.0/mpm/src/include/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/httpd.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- httpd.h 1999/07/19 05:17:49 1.8 +++ httpd.h 1999/07/25 14:24:00 1.9 @@ -140,8 +140,8 @@ #define DEFAULT_HTTP_PORT80 #define DEFAULT_HTTPS_PORT 443 #define ap_is_default_port(port,r) ((port) == ap_default_port(r)) -#define ap_http_method(r)http -#define ap_default_port(r) DEFAULT_HTTP_PORT +#define ap_http_method(r)ap_run_http_method(r) +#define ap_default_port(r) ap_run_default_port(r) /* - Default user name and group name running standalone -- */ /* --- These may be specified as numbers by placing a # before a number --- */ 1.11 +8 -0 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- http_core.c 1999/07/24 18:38:48 1.10 +++ http_core.c 1999/07/25 14:24:01 1.11 @@ -2630,11 +2630,19 @@ ap_open_logs(s, pconf); } +static const char *core_method(const request_rec *r) +{ return http; } + +static unsigned short core_port(const request_rec *r) +{ return DEFAULT_HTTP_PORT; } + static void register_hooks() { ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST); ap_hook_process_connection(ap_process_http_connection,NULL,NULL, HOOK_REALLY_LAST); +ap_hook_http_method(core_method,NULL,NULL,HOOK_REALLY_LAST); +ap_hook_default_port(core_port,NULL,NULL,HOOK_REALLY_LAST); /* FIXME: I suspect we can eliminate the need for these - Ben */ ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); } 1.13 +5 -0 apache-2.0/mpm/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- http_protocol.c 1999/07/17 10:35:41 1.12 +++ http_protocol.c 1999/07/25 14:24:01 1.13 @@ -78,6 +78,8 @@ HOOK_STRUCT( HOOK_LINK(post_read_request) HOOK_LINK(log_transaction) + HOOK_LINK(http_method) + HOOK_LINK(default_port) ); #define SET_BYTES_SENT(r) \ @@ -2691,3 +2693,6 @@ IMPLEMENT_HOOK(int,post_read_request,(request_rec *r),(r),RUN_ALL,OK,DECLINED) IMPLEMENT_HOOK(int,log_transaction,(request_rec *r),(r),RUN_ALL,OK,DECLINED) +IMPLEMENT_HOOK(const char *,http_method,(const request_rec *r),(r),RUN_FIRST, +NULL,NULL) +IMPLEMENT_HOOK(unsigned short,default_port,(const request_rec *r),(r),RUN_FIRST,0,0) 1.3 +1 -0 apache-2.0/mpm/src/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- util.c1999/07/12 22:51:10 1.2 +++ util.c1999/07/25 14:24:01 1.3 @@ -71,6 +71,7 @@ #include httpd.h #include http_main.h #include http_log.h +#include http_protocol.h #if defined(SUNOS4) /* stdio.h has been read in ap_config.h already. Add missing prototypes here: */ extern int fgetc(FILE *);
cvs commit: apache-2.0/mpm/src/main Makefile.tmpl
ben 99/07/25 07:26:37 Modified:mpm/src/main Makefile.tmpl Log: Make dependencies. Revision ChangesPath 1.15 +2 -1 apache-2.0/mpm/src/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Makefile.tmpl 1999/07/24 18:41:09 1.14 +++ Makefile.tmpl 1999/07/25 14:26:37 1.15 @@ -164,7 +164,8 @@ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \ - $(INCDIR)/http_log.h test_char.h + $(INCDIR)/http_log.h $(INCDIR)/http_protocol.h \ + $(INCDIR)/ap_hooks.h test_char.h util_date.o: util_date.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ $(INCDIR)/ap_ctype.h $(INCDIR)/util_date.h
cvs commit: apache-2.0/mpm/src/modules/mpm/prefork prefork.c
ben 99/07/24 06:55:57 Modified:mpm/src/modules/mpm/prefork prefork.c Log: Fix listener selection logic. Revision ChangesPath 1.14 +4 -4 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- prefork.c 1999/07/17 10:35:48 1.13 +++ prefork.c 1999/07/24 13:55:56 1.14 @@ -2164,12 +2164,12 @@ if (!lr) { lr = ap_listeners; } - if (FD_ISSET(lr-fd, main_fds)) break; + if (FD_ISSET(lr-fd, main_fds)) + goto got_listener; lr = lr-next; } - if (lr == last_lr) { - continue; - } + continue; + got_listener: last_lr = lr; sd = lr-fd; }
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/24 11:16:38 Modified:mpm/src/include http_config.h http_request.h mpm/src/main http_config.c http_core.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision ChangesPath 1.9 +0 -2 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- http_config.h 1999/07/17 10:35:33 1.8 +++ http_config.h 1999/07/24 18:15:52 1.9 @@ -242,7 +242,6 @@ int (*auth_checker) (request_rec *); int (*access_checker) (request_rec *); int (*type_checker) (request_rec *); -int (*fixer_upper) (request_rec *); void (*register_hooks) (void); } module; @@ -369,7 +368,6 @@ int ap_check_user_id(request_rec *); /* obtain valid username from client auth */ int ap_check_auth(request_rec *);/* check (validated) user is authorized here */ int ap_find_types(request_rec *);/* identify MIME type */ -int ap_run_fixups(request_rec *);/* poke around for other metainfo, etc */ int ap_invoke_handler(request_rec *); /* for mod_perl */ 1.4 +1 -0 apache-2.0/mpm/src/include/http_request.h Index: http_request.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_request.h1999/07/11 19:00:47 1.3 +++ http_request.h1999/07/24 18:15:53 1.4 @@ -115,6 +115,7 @@ /* Hooks */ DECLARE_HOOK(int,translate_name,(request_rec *)) DECLARE_HOOK(int,check_user_id,(request_rec *)) +DECLARE_HOOK(int,fixups,(request_rec *)) #ifdef __cplusplus } 1.12 +0 -8 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- http_config.c 1999/07/17 10:35:39 1.11 +++ http_config.c 1999/07/24 18:15:56 1.12 @@ -239,7 +239,6 @@ #define m(meth) { XtOffsetOf(module,meth),#meth } m(auth_checker), m(type_checker), -m(fixer_upper), { -1, ? }, #undef m }; @@ -277,7 +276,6 @@ XtOffsetOf(module, auth_checker), XtOffsetOf(module, access_checker), XtOffsetOf(module, type_checker), -XtOffsetOf(module, fixer_upper), }; #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0])) @@ -285,7 +283,6 @@ int auth_checker; int access_checker; int type_checker; -int fixer_upper; } offsets_into_method_ptrs; /* @@ -371,11 +368,6 @@ int ap_find_types(request_rec *r) { return run_method(r, offsets_into_method_ptrs.type_checker, 0); -} - -int ap_run_fixups(request_rec *r) -{ -return run_method(r, offsets_into_method_ptrs.fixer_upper, 1); } IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) 1.9 +0 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- http_core.c 1999/07/22 19:17:22 1.8 +++ http_core.c 1999/07/24 18:15:56 1.9 @@ -2653,6 +2653,5 @@ NULL,/* check auth */ do_nothing, /* check access */ do_nothing, /* type_checker */ -NULL,/* pre-run fixups */ register_hooks /* register hooks */ }; 1.13 +2 -0 apache-2.0/mpm/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- http_request.c1999/07/22 19:17:23 1.12 +++ http_request.c1999/07/24 18:15:57 1.13 @@ -81,10 +81,12 @@ HOOK_STRUCT( HOOK_LINK(translate_name) HOOK_LINK(check_user_id) + HOOK_LINK(fixups) ) IMPLEMENT_HOOK(int
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/24 11:39:21 Modified:mpm/src/include http_config.h http_request.h mpm/src/main http_config.c http_core.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision ChangesPath 1.10 +0 -2 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_config.h 1999/07/24 18:15:52 1.9 +++ http_config.h 1999/07/24 18:38:37 1.10 @@ -241,7 +241,6 @@ int (*auth_checker) (request_rec *); int (*access_checker) (request_rec *); -int (*type_checker) (request_rec *); void (*register_hooks) (void); } module; @@ -367,7 +366,6 @@ int ap_check_access(request_rec *); /* check access on non-auth basis */ int ap_check_user_id(request_rec *); /* obtain valid username from client auth */ int ap_check_auth(request_rec *);/* check (validated) user is authorized here */ -int ap_find_types(request_rec *);/* identify MIME type */ int ap_invoke_handler(request_rec *); /* for mod_perl */ 1.5 +1 -0 apache-2.0/mpm/src/include/http_request.h Index: http_request.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_request.h1999/07/24 18:15:53 1.4 +++ http_request.h1999/07/24 18:38:38 1.5 @@ -116,6 +116,7 @@ DECLARE_HOOK(int,translate_name,(request_rec *)) DECLARE_HOOK(int,check_user_id,(request_rec *)) DECLARE_HOOK(int,fixups,(request_rec *)) +DECLARE_HOOK(int,type_checker,(request_rec *)) #ifdef __cplusplus } 1.13 +0 -8 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- http_config.c 1999/07/24 18:15:56 1.12 +++ http_config.c 1999/07/24 18:38:46 1.13 @@ -238,7 +238,6 @@ { #define m(meth) { XtOffsetOf(module,meth),#meth } m(auth_checker), -m(type_checker), { -1, ? }, #undef m }; @@ -275,14 +274,12 @@ { XtOffsetOf(module, auth_checker), XtOffsetOf(module, access_checker), -XtOffsetOf(module, type_checker), }; #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0])) static struct { int auth_checker; int access_checker; -int type_checker; } offsets_into_method_ptrs; /* @@ -363,11 +360,6 @@ int ap_check_access(request_rec *r) { return run_method(r, offsets_into_method_ptrs.access_checker, 1); -} - -int ap_find_types(request_rec *r) -{ -return run_method(r, offsets_into_method_ptrs.type_checker, 0); } IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) 1.10 +2 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_core.c 1999/07/24 18:15:56 1.9 +++ http_core.c 1999/07/24 18:38:48 1.10 @@ -2635,6 +2635,8 @@ ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST); ap_hook_process_connection(ap_process_http_connection,NULL,NULL, HOOK_REALLY_LAST); +/* FIXME: I suspect we can eliminate the need for these - Ben */ +ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); } API_VAR_EXPORT module core_module = { @@ -2652,6 +2654,5 @@ core_handlers, /* handlers */ NULL,/* check auth */ do_nothing, /* check access */ -do_nothing, /* type_checker */ register_hooks /* register hooks */ }; 1.14 +6 -4 apache-2.0/mpm/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.13
cvs commit: apache-2.0/mpm/src/modules/standard Makefile.tmpl
ben 99/07/24 11:41:26 Modified:mpm/src/main Makefile.tmpl mpm/src/modules/standard Makefile.tmpl Log: Update dependencies. Revision ChangesPath 1.14 +1 -1 apache-2.0/mpm/src/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Makefile.tmpl 1999/07/16 18:24:25 1.13 +++ Makefile.tmpl 1999/07/24 18:41:09 1.14 @@ -103,7 +103,7 @@ $(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \ $(INCDIR)/http_vhost.h $(INCDIR)/http_main.h $(INCDIR)/http_log.h \ $(INCDIR)/rfc1413.h $(INCDIR)/util_md5.h $(INCDIR)/ap_md5.h \ - $(INCDIR)/fnmatch.h + $(INCDIR)/fnmatch.h $(INCDIR)/http_connection.h http_log.o: http_log.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ 1.9 +10 -2 apache-2.0/mpm/src/modules/standard/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/Makefile.tmpl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.tmpl 1999/07/17 10:35:50 1.8 +++ Makefile.tmpl 1999/07/24 18:41:20 1.9 @@ -125,12 +125,20 @@ $(INCDIR)/http_core.h $(INCDIR)/http_request.h \ $(INCDIR)/http_protocol.h $(INCDIR)/http_log.h \ $(INCDIR)/http_main.h $(INCDIR)/util_script.h +mod_echo.o: mod_echo.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \ + $(OSDIR)/os.h $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \ + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ + $(INCDIR)/http_connection.h mod_env.o: mod_env.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \ $(OSDIR)/os.h $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \ - $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ + $(INCDIR)/http_request.h mod_expires.o: mod_expires.c $(INCDIR)/httpd.h \ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ @@ -205,7 +213,7 @@ $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ - $(INCDIR)/http_log.h + $(INCDIR)/http_log.h $(INCDIR)/http_request.h mod_mime_magic.o: mod_mime_magic.c $(INCDIR)/httpd.h \ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
cvs commit: apache-2.0/mpm/src/modules/standard mod_echo.c
ben 99/07/24 13:54:36 Modified:mpm/src/modules/standard mod_echo.c Log: Allow for new hooks. Revision ChangesPath 1.2 +0 -2 apache-2.0/mpm/src/modules/standard/mod_echo.c Index: mod_echo.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_echo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mod_echo.c1999/07/23 18:52:29 1.1 +++ mod_echo.c1999/07/24 20:54:36 1.2 @@ -76,7 +76,5 @@ NULL,/* handlers */ NULL,/* check auth */ NULL,/* check access */ -NULL,/* type_checker */ -NULL,/* pre-run fixups */ register_hooks /* register hooks */ };
cvs commit: apache-2.0/mpm/src/main http_connection.c
ben 99/07/23 11:14:45 Modified:mpm/src/main http_connection.c Log: Actually, we should always close the connection when it is finished. Revision ChangesPath 1.12 +22 -22apache-2.0/mpm/src/main/http_connection.c Index: http_connection.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_connection.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- http_connection.c 1999/07/22 19:17:21 1.11 +++ http_connection.c 1999/07/23 18:14:44 1.12 @@ -197,6 +197,28 @@ ap_run_pre_connection(c); ap_run_process_connection(c); + +/* + * Close the connection, being careful to send out whatever is still + * in our buffers. If possible, try to avoid a hard close until the + * client has ACKed our FIN and/or has stopped sending us data. + */ + +#ifdef NO_LINGCLOSE +ap_bclose(c-client);/* just close it */ +#else +if (r r-connection + !r-connection-aborted + r-connection-client + (r-connection-client-fd = 0)) { + + lingering_close(r); +} +else { + ap_bsetflag(c-client, B_EOUT, 1); + ap_bclose(c-client); +} +#endif } int ap_process_http_connection(conn_rec *c) @@ -226,28 +248,6 @@ return OK; } } - -/* - * Close the connection, being careful to send out whatever is still - * in our buffers. If possible, try to avoid a hard close until the - * client has ACKed our FIN and/or has stopped sending us data. - */ - -#ifdef NO_LINGCLOSE -ap_bclose(c-client);/* just close it */ -#else -if (r r-connection - !r-connection-aborted - r-connection-client - (r-connection-client-fd = 0)) { - - lingering_close(r); -} -else { - ap_bsetflag(c-client, B_EOUT, 1); - ap_bclose(c-client); -} -#endif return OK; }
cvs commit: apache-2.0/mpm/src/modules/standard mod_echo.c
ben 99/07/23 11:52:29 Modified:mpm/src Configuration.tmpl Added: mpm/src/modules/standard mod_echo.c Log: Support for echo protocol, to show how multiprotocol support works. Revision ChangesPath 1.5 +4 -0 apache-2.0/mpm/src/Configuration.tmpl Index: Configuration.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/Configuration.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Configuration.tmpl1999/07/10 18:20:16 1.4 +++ Configuration.tmpl1999/07/23 18:52:28 1.5 @@ -414,3 +414,7 @@ AddModule modules/standard/mod_setenvif.o +## Demonstration module for the TCP echo protocol, just to show how +## multiprotocol support works. + +AddModule modules/standard/mod_echo.o 1.1 apache-2.0/mpm/src/modules/standard/mod_echo.c Index: mod_echo.c === #include httpd.h #include http_config.h #include http_connection.h API_VAR_EXPORT module echo_module; typedef struct { int bEnabled; } EchoConfig; static void *create_echo_server_config(pool *p,server_rec *s) { EchoConfig *pConfig=ap_pcalloc(p,sizeof *pConfig); pConfig-bEnabled=0; return pConfig; } static const char *echo_on(cmd_parms *cmd, void *dummy, char *arg) { EchoConfig *pConfig=ap_get_module_config(cmd-server-module_config, echo_module); pConfig-bEnabled=1; return NULL; } static int process_echo_connection(conn_rec *c) { char buf[1024]; EchoConfig *pConfig=ap_get_module_config(c-base_server-module_config, echo_module); if(!pConfig-bEnabled) return DECLINED; for( ; ; ) { int w; int r=ap_bread(c-client,buf,sizeof buf); if(r = 0) break; w=ap_bwrite(c-client,buf,r); if(w != r) break; ap_bflush(c-client); } return OK; } static const command_rec echo_cmds[] = { { ProtocolEcho, echo_on, NULL, RSRC_CONF, RAW_ARGS, Run an echo server on this host }, { NULL } }; static void register_hooks() { ap_hook_process_connection(process_echo_connection,NULL,NULL,HOOK_MIDDLE); } API_VAR_EXPORT module echo_module = { STANDARD20_MODULE_STUFF, NULL, /* pre_command_line */ NULL, /* pre_config */ NULL, /* post_config */ NULL, /* open_logs */ NULL, /* child_init */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ create_echo_server_config,/* create per-server config structure */ NULL, /* merge per-server config structures */ echo_cmds,/* command table */ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ NULL, /* type_checker */ NULL, /* pre-run fixups */ register_hooks/* register hooks */ };
Re: cvs commit: apache-1.3/src/main http_main.c
[EMAIL PROTECTED] wrote: coar99/07/20 10:44:21 Modified:src/main http_main.c Log: *SecurityDescriptor() should be returning an error on Win98, but sometimes doesn't -- so check the last error if it claims all went well, just in case it's fibbing. Eeek! Things that _don't_ fail don't clear the last error in general. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/mpm/src/modules/standard Makefile.tmpl mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/17 03:36:05 Modified:mpm/src/include http_config.h http_protocol.h mpm/src/main http_config.c http_core.c http_protocol.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard Makefile.tmpl mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision ChangesPath 1.8 +0 -4 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- http_config.h 1999/07/11 19:00:47 1.7 +++ http_config.h 1999/07/17 10:35:33 1.8 @@ -237,14 +237,12 @@ * supposed to handle this was configured wrong). * type_checker --- Determine MIME type of the requested entity; * sets content_type, _encoding and _language fields. - * logger --- log a transaction. */ int (*auth_checker) (request_rec *); int (*access_checker) (request_rec *); int (*type_checker) (request_rec *); int (*fixer_upper) (request_rec *); -int (*logger) (request_rec *); void (*register_hooks) (void); } module; @@ -373,8 +371,6 @@ int ap_find_types(request_rec *);/* identify MIME type */ int ap_run_fixups(request_rec *);/* poke around for other metainfo, etc */ int ap_invoke_handler(request_rec *); -int ap_log_transaction(request_rec *r); -int ap_run_post_read_request(request_rec *); /* for mod_perl */ 1.3 +1 -0 apache-2.0/mpm/src/include/http_protocol.h Index: http_protocol.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_protocol.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- http_protocol.h 1999/07/06 21:32:08 1.2 +++ http_protocol.h 1999/07/17 10:35:34 1.3 @@ -224,6 +224,7 @@ * and not run during any subrequests. */ DECLARE_HOOK(int,post_read_request,(request_rec *)) +DECLARE_HOOK(int,log_transaction,(request_rec *)) #ifdef __cplusplus } 1.11 +0 -8 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- http_config.c 1999/07/11 19:00:48 1.10 +++ http_config.c 1999/07/17 10:35:39 1.11 @@ -240,7 +240,6 @@ m(auth_checker), m(type_checker), m(fixer_upper), -m(logger), { -1, ? }, #undef m }; @@ -279,7 +278,6 @@ XtOffsetOf(module, access_checker), XtOffsetOf(module, type_checker), XtOffsetOf(module, fixer_upper), -XtOffsetOf(module, logger) }; #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0])) @@ -288,7 +286,6 @@ int access_checker; int type_checker; int fixer_upper; -int logger; } offsets_into_method_ptrs; /* @@ -379,11 +376,6 @@ int ap_run_fixups(request_rec *r) { return run_method(r, offsets_into_method_ptrs.fixer_upper, 1); -} - -int ap_log_transaction(request_rec *r) -{ -return run_method(r, offsets_into_method_ptrs.logger, 1); } IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) 1.7 +0 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- http_core.c 1999/07/11 19:00:48 1.6 +++ http_core.c 1999/07/17 10:35:40 1.7 @@ -2651,6 +2651,5 @@ do_nothing, /* check access */ do_nothing, /* type_checker */ NULL,/* pre-run fixups */ -NULL,/* logger */ register_hooks /* register hooks */ }; 1.12 +8 -6 apache-2.0/mpm/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- http_protocol.c
cvs commit: apache-2.0/mpm/src/modules/standard Makefile.tmpl
ben 99/07/16 11:24:27 Modified:mpm/src Configure mpm/src/main Makefile.tmpl mpm/src/modules/mpm/prefork Makefile.tmpl mpm/src/modules/standard Makefile.tmpl Log: Make dependencies work again. Revision ChangesPath 1.13 +14 -14apache-2.0/mpm/src/Configure Index: Configure === RCS file: /export/home/cvs/apache-2.0/mpm/src/Configure,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Configure 1999/07/12 22:51:06 1.12 +++ Configure 1999/07/16 18:24:23 1.13 @@ -790,12 +790,25 @@ SUBDIRS=$OSDIR $SUBDIRS +## Now handle the MPM implementation. Default to 1.3 prefork +## +if [ x$RULE_MPM_METHOD = xdefault ]; then +if [ x$DEF_MPM_METHOD = x ]; then + RULE_MPM_METHOD=prefork +else + RULE_MPM_METHOD=$DEF_MPM_METHOD +fi +fi +## +MPM_METHOD=$RULE_MPM_METHOD + + # Continue building the stub file # Set variables as soon as possible so that TestCompile can use them ## echo Makefile.config OSDIR=\$(SRCDIR)/$OSDIR echo Makefile.config INCDIR=\$(SRCDIR)/include -echo Makefile.config INCLUDES0=-I\$(OSDIR) -I\$(INCDIR) +echo Makefile.config INCLUDES0=-I\$(OSDIR) -I\$(INCDIR) -I\$(SRCDIR)/modules/mpm/$MPM_METHOD echo Makefile.config SHELL=$SHELL @@ -808,19 +821,6 @@ RULE_WANTHSREGEX=$DEF_WANTHSREGEX fi fi - - -## Now handle the MPM implementation. Default to 1.3 prefork -## -if [ x$RULE_MPM_METHOD = xdefault ]; then -if [ x$DEF_MPM_METHOD = x ]; then - RULE_MPM_METHOD=prefork -else - RULE_MPM_METHOD=$DEF_MPM_METHOD -fi -fi -## -MPM_METHOD=$RULE_MPM_METHOD ## Now we determine the C-compiler and optimization level 1.13 +0 -8 apache-2.0/mpm/src/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Makefile.tmpl 1999/07/11 16:36:51 1.12 +++ Makefile.tmpl 1999/07/16 18:24:25 1.13 @@ -153,14 +153,6 @@ $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \ $(INCDIR)/ap_hooks.h $(INCDIR)/ap_listen.h $(INCDIR)/http_log.h -mpm_prefork.o: mpm_prefork.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ - $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ - $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ - $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \ - $(INCDIR)/http_log.h $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ - $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \ - $(INCDIR)/scoreboard_prefork.h rfc1413.o: rfc1413.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ 1.8 +3 -4 apache-2.0/mpm/src/modules/mpm/prefork/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/Makefile.tmpl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.tmpl 1999/07/16 05:30:31 1.7 +++ Makefile.tmpl 1999/07/16 18:24:25 1.8 @@ -59,10 +59,9 @@ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \ - $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ - $(INCDIR)/ap.h $(INCDIR)/apr.h \ - $(INCDIR)/util_uri.h mpm_default.h \ + $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h mpm_default.h \ $(INCDIR)/http_main.h $(INCDIR)/http_log.h \ $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \ 1.7 +3 -2 apache-2.0/mpm/src/modules/standard/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/Makefile.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.tmpl 1999/07/11 16:36:51
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/11 06:27:32 Modified:mpm/src/ap Makefile.tmpl mpm/src/include ap_hooks.h http_config.h http_request.h mpm/src/main http_config.c http_core.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Added: mpm/src/ap ap_hooks.c Log: Add topological sorting to hook ordering. Revision ChangesPath 1.6 +1 -1 apache-2.0/mpm/src/ap/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.tmpl 1999/06/29 09:00:06 1.5 +++ Makefile.tmpl 1999/07/11 13:27:23 1.6 @@ -6,7 +6,7 @@ LIB=libap.a OBJS=ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o ap_signal.o \ - ap_slack.o ap_snprintf.o ap_buf.o + ap_slack.o ap_snprintf.o ap_buf.o ap_hooks.o .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $ 1.1 apache-2.0/mpm/src/ap/ap_hooks.c Index: ap_hooks.c === #include httpd.h #include ap_hooks.h #include assert.h #if 0 #define ap_palloc(pool,size) malloc(size) #endif /* NB: This must echo the LINK_##name structure */ typedef struct { void (*dummy)(void *); const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; } TSortData; typedef struct tsort_ { void *pData; int nPredecessors; struct tsort_ **ppPredecessors; struct tsort_ *pNext; } TSort; static TSort *prepare(pool *p,TSortData *pItems,int nItems) { TSort *pData=ap_palloc(p,nItems*sizeof *pData); int n; for(n=0 ; n nItems ; ++n) { pData[n].nPredecessors=0; pData[n].ppPredecessors=ap_palloc(p,nItems*sizeof *pData[n].ppPredecessors); pData[n].pNext=NULL; pData[n].pData=pItems[n]; } for(n=0 ; n nItems ; ++n) { int i,k; for(i=0 ; pItems[n].aszPredecessors pItems[n].aszPredecessors[i] ; ++i) for(k=0 ; k nItems ; ++k) if(!strcmp(pItems[k].szName,pItems[n].aszPredecessors[i])) { int l; for(l=0 ; l pData[n].nPredecessors ; ++l) if(pData[n].ppPredecessors[l] == pData[k]) goto got_it; pData[n].ppPredecessors[pData[n].nPredecessors]=pData[k]; ++pData[n].nPredecessors; got_it: break; } for(i=0 ; pItems[n].aszSuccessors pItems[n].aszSuccessors[i] ; ++i) for(k=0 ; k nItems ; ++k) if(!strcmp(pItems[k].szName,pItems[n].aszSuccessors[i])) { int l; for(l=0 ; l pData[k].nPredecessors ; ++l) if(pData[k].ppPredecessors[l] == pData[n]) goto got_it2; pData[k].ppPredecessors[pData[k].nPredecessors]=pData[n]; ++pData[k].nPredecessors; got_it2: break; } } return pData; } static TSort *tsort(TSort *pData,int nItems) { int nTotal; TSort *pHead=NULL; TSort *pTail=NULL; for(nTotal=0 ; nTotal nItems ; ++nTotal) { int n,i,k; for(n=0 ; ; ++n) { if(n == nItems) assert(0); // we have a loop... if(!pData[n].pNext !pData[n].nPredecessors) break; } if(pTail) pTail-pNext=pData[n]; else pHead=pData[n]; pTail=pData[n]; pTail-pNext=pTail; // fudge it so it looks linked for(i=0 ; i nItems ; ++i) for(k=0 ; pData[i].ppPredecessors[k] ; ++k) if(pData[i].ppPredecessors[k] == pData[n]) { --pData[i].nPredecessors; break; } } pTail-pNext=NULL;// unfudge the tail return pHead; } static array_header *sort_hook(array_header *pHooks,const char *szName) { pool *p=ap_make_sub_pool(g_pHookPool); TSort *pSort; array_header *pNew; int n; pSort=prepare(p,(TSortData *)pHooks-elts,pHooks-nelts); tsort(pSort,pHooks-nelts); pNew=ap_make_array
cvs commit: apache-2.0/mpm/src/modules/standard Makefile.tmpl
ben 99/07/11 09:36:52 Modified:mpm/src/ap Makefile.tmpl mpm/src/main Makefile.tmpl mpm/src/modules/standard Makefile.tmpl Log: make depend. Revision ChangesPath 1.7 +5 -0 apache-2.0/mpm/src/ap/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.tmpl 1999/07/11 13:27:23 1.6 +++ Makefile.tmpl 1999/07/11 16:36:50 1.7 @@ -58,6 +58,11 @@ ap_getpass.o: ap_getpass.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ $(INCDIR)/ap_ctype.h $(INCDIR)/ap.h $(INCDIR)/apr.h +ap_hooks.o: ap_hooks.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/ap_hooks.h ap_md5c.o: ap_md5c.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ $(INCDIR)/ap_ctype.h $(INCDIR)/ap_md5.h $(INCDIR)/ap.h \ 1.12 +8 -1 apache-2.0/mpm/src/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Makefile.tmpl 1999/07/06 21:32:09 1.11 +++ Makefile.tmpl 1999/07/11 16:36:51 1.12 @@ -64,7 +64,6 @@ $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_log.h \ $(INCDIR)/ap_mpm.h -ap_hooks.o: ap_hooks.c buff.o: buff.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ @@ -154,6 +153,14 @@ $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \ $(INCDIR)/ap_hooks.h $(INCDIR)/ap_listen.h $(INCDIR)/http_log.h +mpm_prefork.o: mpm_prefork.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \ + $(INCDIR)/http_log.h $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ + $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \ + $(INCDIR)/scoreboard_prefork.h rfc1413.o: rfc1413.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ 1.6 +5 -3 apache-2.0/mpm/src/modules/standard/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/Makefile.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.tmpl 1999/07/06 21:32:18 1.5 +++ Makefile.tmpl 1999/07/11 16:36:51 1.6 @@ -29,7 +29,8 @@ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \ - $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ + $(INCDIR)/http_request.h mod_asis.o: mod_asis.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \ $(OSDIR)/os.h $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ @@ -266,7 +267,7 @@ $(INCDIR)/http_core.h $(INCDIR)/http_protocol.h \ $(INCDIR)/http_conf_globals.h $(INCDIR)/http_main.h \ $(INCDIR)/util_script.h $(INCDIR)/scoreboard.h \ - /usr/include/pthread.h $(INCDIR)/http_log.h + $(INCDIR)/http_log.h mod_unique_id.o: mod_unique_id.c $(INCDIR)/httpd.h \ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ @@ -281,7 +282,8 @@ $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \ $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \ - $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \ + $(INCDIR)/http_request.h mod_usertrack.o: mod_usertrack.c $(INCDIR)/httpd.h \ $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
cvs commit: apache-2.0/mpm/src/modules/standard mod_alias.c mod_setenvif.c mod_userdir.c
ben 99/07/11 09:54:10 Modified:mpm/src/ap ap_hooks.c mpm/src/include ap_hooks.h mpm/src/main http_core.c mpm/src/modules/standard mod_alias.c mod_setenvif.c mod_userdir.c Log: Add non-topological ordering for hooks. Revision ChangesPath 1.2 +10 -0 apache-2.0/mpm/src/ap/ap_hooks.c Index: ap_hooks.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/ap_hooks.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ap_hooks.c1999/07/11 13:27:23 1.1 +++ ap_hooks.c1999/07/11 16:54:00 1.2 @@ -13,6 +13,7 @@ const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; +int nOrder; } TSortData; typedef struct tsort_ @@ -23,11 +24,20 @@ struct tsort_ *pNext; } TSort; +static int crude_order(const void *a_,const void *b_) +{ +const TSortData *a=a_; +const TSortData *b=b_; + +return a-nOrder-b-nOrder; +} + static TSort *prepare(pool *p,TSortData *pItems,int nItems) { TSort *pData=ap_palloc(p,nItems*sizeof *pData); int n; +qsort(pItems,nItems,sizeof *pItems,crude_order); for(n=0 ; n nItems ; ++n) { pData[n].nPredecessors=0; 1.7 +13 -2 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ap_hooks.h1999/07/11 16:42:23 1.6 +++ ap_hooks.h1999/07/11 16:54:02 1.7 @@ -3,7 +3,8 @@ #define DECLARE_HOOK(ret,name,args) \ typedef ret HOOK_##name args; \ -void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre,const char * const *aszSucc); \ +void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre, \ + const char * const *aszSucc,int nOrder); \ ret ap_run_##name args; \ typedef struct _LINK_##name \ { \ @@ -11,6 +12,7 @@ const char *szName; \ const char * const *aszPredecessors; \ const char * const *aszSuccessors; \ +int nOrder; \ } LINK_##name; #define HOOK_STRUCT(members) \ @@ -20,7 +22,8 @@ array_header *link_##name; #define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,term1,term2,rv_final) \ -void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre,const char * const *aszSucc) \ +void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre, \ + const char * const *aszSucc,int nOrder) \ { \ LINK_##name *pHook; \ if(!_hooks.link_##name) \ @@ -32,6 +35,7 @@ pHook-pFunc=pf; \ pHook-aszPredecessors=aszPre; \ pHook-aszSuccessors=aszSucc; \ +pHook-nOrder=nOrder; \ pHook-szName=g_szCurrentHookName; \ if(g_bDebugHooks) \ ap_show_hook(#name,aszPre,aszSucc); \ @@ -63,6 +67,13 @@ IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != decline,r_ != ok,run_all ? ok : decline) #define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \ IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,1,0,) + + /* Hook orderings */ +#define HOOK_REALLY_FIRST(-10) +#define HOOK_FIRST 0 +#define HOOK_MIDDLE 10 +#define HOOK_LAST20 +#define HOOK_REALLY_LAST 30 extern pool *g_pHookPool; extern int g_bDebugHooks; 1.5 +1 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_core.c 1999/07/11 13:27:25 1.4 +++ http_core.c 1999/07/11 16:54:04 1.5 @@ -2631,7 +2631,7 @@ static void register_hooks() { -ap_hook_translate_name(core_translate,NULL,NULL); +ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST); } API_VAR_EXPORT module core_module = { 1.5 +1 -1 apache-2.0/mpm/src/modules/standard/mod_alias.c Index: mod_alias.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_alias.c 1999/07/11 13:27:28 1.4 +++ mod_alias.c 1999/07/11 16:54:08 1.5 @@ -399,7 +399,7 @@ { static const char * const aszPre[]={ mod_userdir.c,NULL }; -ap_hook_translate_name(translate_alias_redir
cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c
ben 99/07/11 12:00:57 Modified:mpm/src/include http_config.h http_request.h mpm/src/main http_config.c http_core.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision ChangesPath 1.7 +0 -1 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- http_config.h 1999/07/11 13:27:24 1.6 +++ http_config.h 1999/07/11 19:00:47 1.7 @@ -240,7 +240,6 @@ * logger --- log a transaction. */ -int (*ap_check_user_id) (request_rec *); int (*auth_checker) (request_rec *); int (*access_checker) (request_rec *); int (*type_checker) (request_rec *); 1.3 +1 -0 apache-2.0/mpm/src/include/http_request.h Index: http_request.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- http_request.h1999/07/11 13:27:24 1.2 +++ http_request.h1999/07/11 19:00:47 1.3 @@ -114,6 +114,7 @@ /* Hooks */ DECLARE_HOOK(int,translate_name,(request_rec *)) +DECLARE_HOOK(int,check_user_id,(request_rec *)) #ifdef __cplusplus } 1.10 +0 -8 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_config.c 1999/07/11 16:42:23 1.9 +++ http_config.c 1999/07/11 19:00:48 1.10 @@ -237,7 +237,6 @@ { #define m(meth) { XtOffsetOf(module,meth),#meth } -m(ap_check_user_id), m(auth_checker), m(type_checker), m(fixer_upper), @@ -276,7 +275,6 @@ */ static const int method_offsets[] = { -XtOffsetOf(module, ap_check_user_id), XtOffsetOf(module, auth_checker), XtOffsetOf(module, access_checker), XtOffsetOf(module, type_checker), @@ -286,7 +284,6 @@ #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0])) static struct { -int ap_check_user_id; int auth_checker; int access_checker; int type_checker; @@ -395,11 +392,6 @@ * want to define something for the other. Note that check_auth is * separate from check_access to make catching some config errors easier. */ - -int ap_check_user_id(request_rec *r) -{ -return run_method(r, offsets_into_method_ptrs.ap_check_user_id, 0); -} int ap_check_auth(request_rec *r) { 1.6 +0 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- http_core.c 1999/07/11 16:54:04 1.5 +++ http_core.c 1999/07/11 19:00:48 1.6 @@ -2647,7 +2647,6 @@ merge_core_server_configs, /* merge per-server config structures */ core_cmds, /* command table */ core_handlers, /* handlers */ -NULL,/* check_user_id */ NULL,/* check auth */ do_nothing, /* check access */ do_nothing, /* type_checker */ 1.10 +9 -6 apache-2.0/mpm/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_request.c1999/07/11 16:42:24 1.9 +++ http_request.c1999/07/11 19:00:49 1.10 @@ -80,10 +80,13 @@ HOOK_STRUCT( HOOK_LINK(translate_name) + HOOK_LINK(check_user_id) ) IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK, DECLINED) +IMPLEMENT_HOOK(int,check_user_id,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK, +DECLINED) /* * @@ -803,11 +806,11 @@ || ap_satisfies(rnew) == SATISFY_NOSPEC
cvs commit: apache-2.0/mpm/src/main http_config.c http_main.c
ben 99/07/10 06:32:48 Modified:mpm/src/include ap_hooks.h mpm/src/main http_config.c http_main.c Log: Rudimentary debugging for hooks. Revision ChangesPath 1.3 +4 -0 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ap_hooks.h1999/07/06 21:32:08 1.2 +++ ap_hooks.h1999/07/10 13:32:46 1.3 @@ -1,6 +1,8 @@ #ifndef APACHE_AP_HOOKS_H #define APACHE_AP_HOOKS_H +extern int g_bDebugHooks; + #define DECLARE_HOOK(ret,name,args) \ typedef ret HOOK_##name args; \ void ap_hook_##name(HOOK_##name *pf); \ @@ -24,6 +26,8 @@ pHook-pNext=_hooks.link_##name; \ pHook-pFunc=pf; \ _hooks.link_##name=pHook; \ +if(g_bDebugHooks) \ + puts( Hooked #name); \ } \ ret ap_run_##name args \ { \ 1.7 +16 -2 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- http_config.c 1999/07/06 21:32:10 1.6 +++ http_config.c 1999/07/10 13:32:47 1.7 @@ -529,6 +529,21 @@ return HTTP_INTERNAL_SERVER_ERROR; } +int g_bDebugHooks; + +static void register_hooks(module *m) +{ +if(m-register_hooks) + { + if(ap_exists_config_define(SHOW_HOOKS)) + { + printf(Registering hooks for %s\n,m-name); + g_bDebugHooks=1; + } + m-register_hooks(); + } +} + /* One-time setup for precompiled modules --- NOT to be done on restart */ API_EXPORT(void) ap_add_module(module *m) @@ -582,8 +597,7 @@ #endif /*_OSD_POSIX*/ /* FIXME: is this the right place to call this? */ -if(m-register_hooks) - m-register_hooks(); +register_hooks(m); } /* 1.4 +15 -6 apache-2.0/mpm/src/main/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_main.c 1999/07/05 13:00:45 1.3 +++ http_main.c 1999/07/10 13:32:47 1.4 @@ -247,6 +247,7 @@ pool *ptemp; /* Pool for temporart config stuff */ pool *pcommands; /* Pool for -C and -c switches */ extern char *optarg; +extern int optind,optreset; /* TODO: PATHSEPARATOR should be one of the os defines */ @@ -264,14 +265,26 @@ pglobal = ap_init_alloc(); g_pHookPool=pglobal; -ap_setup_prelinked_modules(); - pcommands = ap_make_sub_pool(pglobal); ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *)); + +while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLR:th)) != -1) { +char **new; +switch (c) { + case 'D': + new = (char **)ap_push_array(ap_server_config_defines); + *new = ap_pstrdup(pcommands, optarg); + break; + } +} + +ap_setup_prelinked_modules(); + ap_pre_command_line_hook(pcommands); +optind=optreset=1; while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLR:th)) != -1) { char **new; switch (c) { @@ -281,10 +294,6 @@ break; case 'C': new = (char **)ap_push_array(ap_server_pre_read_config); - *new = ap_pstrdup(pcommands, optarg); - break; - case 'D': - new = (char **)ap_push_array(ap_server_config_defines); *new = ap_pstrdup(pcommands, optarg); break; case 'd':
cvs commit: apache-2.0/mpm/src/include ap_hooks.h
ben 99/07/10 11:58:17 Modified:mpm/src/include ap_hooks.h Log: Use arrays for hooks. Revision ChangesPath 1.4 +12 -7 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ap_hooks.h1999/07/10 13:32:46 1.3 +++ ap_hooks.h1999/07/10 18:58:17 1.4 @@ -10,33 +10,38 @@ typedef struct _LINK_##name \ { \ HOOK_##name *pFunc; \ -struct _LINK_##name *pNext; \ } LINK_##name; #define HOOK_STRUCT(members) \ static struct { members } _hooks; #define HOOK_LINK(name) \ -LINK_##name *link_##name; +array_header *link_##name; #define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,term1,term2,rv_final) \ void ap_hook_##name(HOOK_##name *pf) \ { \ -LINK_##name *pHook=ap_palloc(g_pHookPool,sizeof(LINK_##name)); \ -pHook-pNext=_hooks.link_##name; \ +LINK_##name *pHook; \ +if(!_hooks.link_##name) \ + _hooks.link_##name=ap_make_array(g_pHookPool,1,sizeof(LINK_##name)); \ +pHook=ap_push_array(_hooks.link_##name); \ pHook-pFunc=pf; \ -_hooks.link_##name=pHook; \ if(g_bDebugHooks) \ puts( Hooked #name); \ } \ ret ap_run_##name args \ { \ LINK_##name *pHook; \ +int n; \ rv_decl \ +\ +if(!_hooks.link_##name) \ + return rv_final; \ \ -for(pHook=_hooks.link_##name ; pHook ; pHook=pHook-pNext) \ +pHook=(LINK_##name *)_hooks.link_##name-elts; \ +for(n=0 ; n _hooks.link_##name-nelts ; ++n) \ { \ - sv pHook-pFunc args2; \ + sv pHook[n].pFunc args2; \ \ if(term1 (!run_all || term2)) \ return rv; \
cvs commit: apache-2.0/mpm/src/os/unix Makefile.tmpl
ben 99/07/06 14:32:31 Modified:mpm/src Makefile.tmpl mpm/src/include ap_hooks.h http_config.h http_protocol.h mpm/src/main Makefile.tmpl alloc.c http_config.c http_connection.c http_core.c http_protocol.c http_request.c rfc1413.c mpm/src/modules/mpm/prefork Makefile.tmpl prefork.c mpm/src/modules/standard Makefile.tmpl mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c mpm/src/os/unix Makefile.tmpl Log: More hooky stuff. Revision ChangesPath 1.5 +1 -1 apache-2.0/mpm/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/Makefile.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.tmpl 1999/06/29 09:00:04 1.4 +++ Makefile.tmpl 1999/07/06 21:32:07 1.5 @@ -129,4 +129,4 @@ include/ap_mmn.h include/ap_config_auto.h os/unix/os.h \ os/unix/os-inline.c include/ap_ctype.h include/alloc.h include/buff.h \ include/ap_iol.h include/ap.h include/apr.h include/util_uri.h \ - include/http_config.h + include/http_config.h include/ap_hooks.h 1.2 +15 -9 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ap_hooks.h1999/07/05 13:00:42 1.1 +++ ap_hooks.h1999/07/06 21:32:08 1.2 @@ -1,6 +1,10 @@ +#ifndef APACHE_AP_HOOKS_H +#define APACHE_AP_HOOKS_H + #define DECLARE_HOOK(ret,name,args) \ typedef ret HOOK_##name args; \ -void hook_##name(HOOK_##name *pf); \ +void ap_hook_##name(HOOK_##name *pf); \ +ret ap_run_##name args; \ typedef struct _LINK_##name \ { \ HOOK_##name *pFunc; \ @@ -13,15 +17,15 @@ #define HOOK_LINK(name) \ LINK_##name *link_##name; -#define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,terminate) \ -void hook_##name(HOOK_##name *pf) \ +#define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,term1,term2,rv_final) \ +void ap_hook_##name(HOOK_##name *pf) \ { \ LINK_##name *pHook=ap_palloc(g_pHookPool,sizeof(LINK_##name)); \ pHook-pNext=_hooks.link_##name; \ pHook-pFunc=pf; \ _hooks.link_##name=pHook; \ } \ -ret run_##name args \ +ret ap_run_##name args \ { \ LINK_##name *pHook; \ rv_decl \ @@ -30,15 +34,17 @@ { \ sv pHook-pFunc args2; \ \ - if(!run_all terminate) \ + if(term1 (!run_all || term2)) \ return rv; \ } \ -return rv; \ +return rv_final; \ } -#define IMPLEMENT_HOOK(ret,name,args,args2,run_all,finish) \ - IMPLEMENT_HOOK_BASE(ret,ret r;,r=,r,name,args,args2,run_all, r == finish) +#define IMPLEMENT_HOOK(ret,name,args,args2,run_all,ok,decline) \ + IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != decline,r_ != ok,run_all ? ok : decline) #define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \ - IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,) + IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,1,0,) extern pool *g_pHookPool; + +#endif /* ndef(AP_HOOKS_H) */ 1.5 +5 -6 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_config.h 1999/07/05 13:00:42 1.4 +++ http_config.h 1999/07/06 21:32:08 1.5 @@ -58,6 +58,8 @@ #ifndef APACHE_HTTP_CONFIG_H #define APACHE_HTTP_CONFIG_H +#include ap_hooks.h + #ifdef __cplusplus extern C { #endif @@ -236,8 +238,6 @@ * type_checker --- Determine MIME type of the requested entity; * sets content_type, _encoding and _language fields. * logger --- log a transaction. - * post_read_request --- run right after read_request or internal_redirect, - * and not run during any subrequests. */ int (*translate_handler) (request_rec *); @@ -247,8 +247,6 @@ int (*type_checker) (request_rec *); int (*fixer_upper) (request_rec *); int (*logger) (request_rec *); -int (*header_parser) (request_rec *); -int (*post_read_request) (request_rec
cvs commit: apache-2.0/mpm/src/main http_config.c http_connection.c http_main.c
ben 99/07/05 06:00:47 Modified:mpm/src CHANGES mpm/src/include http_config.h http_connection.h mpm/src/main http_config.c http_connection.c http_main.c Added: mpm/src/include ap_hooks.h Log: Strawman hooks implementation (beginning of). Revision ChangesPath 1.12 +7 -0 apache-2.0/mpm/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-2.0/mpm/src/CHANGES,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CHANGES 1999/06/24 01:57:43 1.11 +++ CHANGES 1999/07/05 13:00:39 1.12 @@ -1,5 +1,12 @@ Changes with MPM +* Start to implement module-defined hooks that are a) fast and b) typesafe. + Replace pre_connection module call with a register_hook call and + implement pre_connection as a hook. The intent is that these hooks will + be extended to allow Apache to be multi-protocol, and also to allow the + calling order to be specified on a per-hook/per-module basis. + [Ben Laurie] + * Implement mpm_* methods as modules. Each method gets it's own subdir in src/modules (eg: src/modules/prefork). Selection of method uses Rule MPM_METHOD. [Jim Jagielski] 1.4 +1 -1 apache-2.0/mpm/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_config.h 1999/06/29 09:00:08 1.3 +++ http_config.h 1999/07/05 13:00:42 1.4 @@ -249,7 +249,7 @@ int (*logger) (request_rec *); int (*header_parser) (request_rec *); int (*post_read_request) (request_rec *); -int (*pre_connection) (conn_rec *); +void (*register_hooks) (void); } module; /* Initializer for the first few module slots, which are only 1.4 +5 -0 apache-2.0/mpm/src/include/http_connection.h Index: http_connection.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_connection.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_connection.h 1999/07/02 18:22:24 1.3 +++ http_connection.h 1999/07/05 13:00:42 1.4 @@ -58,6 +58,8 @@ #ifndef APACHE_HTTP_CONNECTION_H #define APACHE_HTTP_CONNECTION_H +#include ap_hooks.h + #ifdef __cplusplus extern C { #endif @@ -67,6 +69,9 @@ const struct sockaddr_in *saddr, int child_num, int thread_num); CORE_EXPORT(void) ap_process_connection(conn_rec *); + + /* Hooks */ +DECLARE_HOOK(void,pre_connection,(conn_rec *)) #ifdef __cplusplus } 1.1 apache-2.0/mpm/src/include/ap_hooks.h Index: ap_hooks.h === #define DECLARE_HOOK(ret,name,args) \ typedef ret HOOK_##name args; \ void hook_##name(HOOK_##name *pf); \ typedef struct _LINK_##name \ { \ HOOK_##name *pFunc; \ struct _LINK_##name *pNext; \ } LINK_##name; #define HOOK_STRUCT(members) \ static struct { members } _hooks; #define HOOK_LINK(name) \ LINK_##name *link_##name; #define IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,terminate) \ void hook_##name(HOOK_##name *pf) \ { \ LINK_##name *pHook=ap_palloc(g_pHookPool,sizeof(LINK_##name)); \ pHook-pNext=_hooks.link_##name; \ pHook-pFunc=pf; \ _hooks.link_##name=pHook; \ } \ ret run_##name args \ { \ LINK_##name *pHook; \ rv_decl \ \ for(pHook=_hooks.link_##name ; pHook ; pHook=pHook-pNext) \ { \ sv pHook-pFunc args2; \ \ if(!run_all terminate) \ return rv; \ } \ return rv; \ } #define IMPLEMENT_HOOK(ret,name,args,args2,run_all,finish) \ IMPLEMENT_HOOK_BASE(ret,ret r;,r=,r,name,args,args2,run_all, r == finish) #define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \ IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,) extern pool *g_pHookPool; 1.5 +5 -9 apache-2.0/mpm/src/main/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_config.c 1999/06/29 09:00:16 1.4 +++ http_config.c 1999/07/05 13:00:44 1.5 @@ -281,8 +281,7 @@ XtOffsetOf(module, fixer_upper), XtOffsetOf(module, logger), XtOffsetOf(module, header_parser), -XtOffsetOf
cvs commit: apache-2.0/mpm/src/os/unix Makefile.tmpl
ben 99/06/29 02:00:32 Modified:mpm/src Makefile.tmpl mpm/src/ap Makefile.tmpl mpm/src/include http_config.h http_connection.h httpd.h mpm/src/main Makefile.tmpl http_config.c http_connection.c mpm/src/modules/mpm/prefork Makefile.tmpl prefork.c mpm/src/modules/standard Makefile.tmpl mpm/src/os/unix Makefile.tmpl Log: New API for I/O layering, and dependency updates. Revision ChangesPath 1.4 +5 -6 apache-2.0/mpm/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/Makefile.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.tmpl 1999/06/20 23:14:29 1.3 +++ Makefile.tmpl 1999/06/29 09:00:04 1.4 @@ -123,11 +123,10 @@ # DO NOT REMOVE buildmark.o: buildmark.c include/ap_config.h include/ap_mmn.h \ include/ap_config_auto.h os/unix/os.h os/unix/os-inline.c \ - include/ap_ctype.h include/hsregex.h include/httpd.h include/alloc.h \ - include/buff.h include/ap_iol.h include/ap.h include/apr.h \ - include/util_uri.h + include/ap_ctype.h include/httpd.h include/alloc.h include/buff.h \ + include/ap_iol.h include/ap.h include/apr.h include/util_uri.h modules.o: modules.c include/httpd.h include/ap_config.h \ include/ap_mmn.h include/ap_config_auto.h os/unix/os.h \ - os/unix/os-inline.c include/ap_ctype.h include/hsregex.h \ - include/alloc.h include/buff.h include/ap_iol.h include/ap.h \ - include/apr.h include/util_uri.h include/http_config.h + os/unix/os-inline.c include/ap_ctype.h include/alloc.h include/buff.h \ + include/ap_iol.h include/ap.h include/apr.h include/util_uri.h \ + include/http_config.h 1.5 +20 -22apache-2.0/mpm/src/ap/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.tmpl 1999/06/20 23:14:30 1.4 +++ Makefile.tmpl 1999/06/29 09:00:06 1.5 @@ -41,41 +41,39 @@ # DO NOT REMOVE ap_buf.o: ap_buf.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ - $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/ap_buf.h + $(INCDIR)/ap_ctype.h $(INCDIR)/ap_buf.h ap_cpystrn.o: ap_cpystrn.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ - $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \ - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ - $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h ap_execve.o: ap_execve.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ - $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \ - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ - $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h ap_fnmatch.o: ap_fnmatch.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ - $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/fnmatch.h + $(INCDIR)/ap_ctype.h $(INCDIR)/fnmatch.h ap_getpass.o: ap_getpass.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ - $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/ap.h \ - $(INCDIR)/apr.h + $(INCDIR)/ap_ctype.h $(INCDIR)/ap.h $(INCDIR)/apr.h ap_md5c.o: ap_md5c.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \ - $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/ap_md5.h \ - $(INCDIR)/ap.h $(INCDIR)/apr.h + $(INCDIR)/ap_ctype.h $(INCDIR)/ap_md5.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h ap_signal.o: ap_signal.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ - $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \ - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \ - $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \ + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \ + $(INCDIR)/apr.h $(INCDIR)/util_uri.h ap_slack.o: ap_slack.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h
cvs commit: apache-2.0/mpm/src/modules/mpm/prefork prefork.c
ben 99/06/26 05:25:37 Modified:mpm/src/modules/mpm/prefork prefork.c Log: If last_lr is the last listener, then lr can start out NULL. Revision ChangesPath 1.5 +2 -2 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- prefork.c 1999/06/25 01:25:11 1.4 +++ prefork.c 1999/06/26 12:25:36 1.5 @@ -2190,11 +2190,11 @@ lr = last_lr-next; } while (lr != last_lr) { - if (FD_ISSET(lr-fd, main_fds)) break; - lr = lr-next; if (!lr) { lr = ap_listeners; } + if (FD_ISSET(lr-fd, main_fds)) break; + lr = lr-next; } if (lr == last_lr) { continue;
cvs commit: apache-2.0/mpm/src/main http_protocol.c http_vhost.c mpm_prefork.c
ben 99/06/20 04:19:48 Modified:mpm/src/include httpd.h mpm/src/main http_protocol.c http_vhost.c mpm_prefork.c Log: Server is not a per-connection thing. This also makes virtual hosts work better. Revision ChangesPath 1.2 +0 -1 apache-2.0/mpm/src/include/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache-2.0/mpm/src/include/httpd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- httpd.h 1999/06/18 18:39:28 1.1 +++ httpd.h 1999/06/20 11:19:45 1.2 @@ -833,7 +833,6 @@ struct conn_rec { ap_pool *pool; -server_rec *server; server_rec *base_server; /* Physical vhost this conn come in on */ void *vhost_lookup_data; /* used by http_vhost.c */ 1.5 +1 -2 apache-2.0/mpm/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_protocol.c 1999/06/19 20:23:37 1.4 +++ http_protocol.c 1999/06/20 11:19:46 1.5 @@ -931,8 +931,7 @@ r = ap_pcalloc(p, sizeof(request_rec)); r-pool= p; r-connection = conn; -conn-server = conn-base_server; -r-server = conn-server; +r-server = conn-base_server; conn-keptalive= conn-keepalive == 1; conn-keepalive= 0; 1.2 +4 -4 apache-2.0/mpm/src/main/http_vhost.c Index: http_vhost.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_vhost.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- http_vhost.c 1999/06/18 18:39:30 1.1 +++ http_vhost.c 1999/06/20 11:19:46 1.2 @@ -832,7 +832,7 @@ found: /* s is the first matching server, we're done */ -r-server = r-connection-server = s; +r-server = s; } @@ -871,7 +871,7 @@ (s-path[s-pathlen - 1] == '/' || r-uri[s-pathlen] == '/' || r-uri[s-pathlen] == '\0')) { -r-server = r-connection-server = s; +r-server = s; return; } } @@ -907,7 +907,7 @@ if (trav) { /* save the name_chain for later in case this is a name-vhost */ conn-vhost_lookup_data = trav-names; - conn-server = trav-server; + conn-base_server = trav-server; return; } @@ -919,7 +919,7 @@ /* maybe there's a default server matching this port */ trav = find_default_server(port); if (trav) { - conn-server = trav-server; + conn-base_server = trav-server; } /* otherwise we're stuck with just the main server */ 1.3 +3 -4 apache-2.0/mpm/src/main/mpm_prefork.c Index: mpm_prefork.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/mpm_prefork.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mpm_prefork.c 1999/06/19 21:56:27 1.2 +++ mpm_prefork.c 1999/06/20 11:19:47 1.3 @@ -835,10 +835,10 @@ if (timeout_req != NULL) dirconf = timeout_req-per_dir_config; else - dirconf = current_conn-server-lookup_defaults; + dirconf = current_conn-base_server-lookup_defaults; if (!current_conn-keptalive) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, - current_conn-server, [client %s] %s timed out, + current_conn-base_server, [client %s] %s timed out, current_conn-remote_ip, timeout_name ? timeout_name : request); } @@ -2434,8 +2434,7 @@ conn-pool = p; conn-local_addr = *saddr; -conn-server = server; /* just a guess for now */ -conn-base_server = conn-server; +conn-base_server = server; conn-client = inout; conn-remote_addr = *remaddr;
cvs commit: apache-2.0/mpm/src/main buff.c http_request.c
ben 99/06/20 05:25:55 Modified:mpm/src/main buff.c http_request.c Log: Handle partial large writes. Revision ChangesPath 1.4 +5 -1 apache-2.0/mpm/src/main/buff.c Index: buff.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/buff.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- buff.c1999/06/18 23:34:59 1.3 +++ buff.c1999/06/20 12:25:54 1.4 @@ -551,7 +551,11 @@ */ if (fb-outcnt 0 nbyte LARGE_WRITE_THRESHOLD nbyte + fb-outcnt = fb-bufsiz) { - return large_write(fb, buf, nbyte); + int n=large_write(fb, buf, nbyte); + if (n == nbyte) + return nbyte; + buf+=n; + nbyte-=n; } /* 1.3 +7 -1 apache-2.0/mpm/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- http_request.c1999/06/18 23:35:00 1.2 +++ http_request.c1999/06/20 12:25:54 1.3 @@ -1241,7 +1241,13 @@ * it's the application that's stalled. */ /* TODO: re-implement ap_bhalfduplex... not sure how yet */ -//ap_bhalfduplex(r-connection-client); +#if 0 +ap_bhalfduplex(r-connection-client); +#else +//in the meantime, flush! +ap_bflush(r-connection-client); +#endif + ap_log_transaction(r); }
cvs commit: apache-2.0/mpm/src/main http_request.c
ben 99/06/20 05:27:10 Modified:mpm/src/main http_request.c Log: Whoops. Undo unintentional change. Revision ChangesPath 1.4 +1 -7 apache-2.0/mpm/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_request.c1999/06/20 12:25:54 1.3 +++ http_request.c1999/06/20 12:27:10 1.4 @@ -1241,13 +1241,7 @@ * it's the application that's stalled. */ /* TODO: re-implement ap_bhalfduplex... not sure how yet */ -#if 0 -ap_bhalfduplex(r-connection-client); -#else -//in the meantime, flush! -ap_bflush(r-connection-client); -#endif - +//ap_bhalfduplex(r-connection-client); ap_log_transaction(r); }
cvs commit: apache-2.0/mpm/src CHANGES
ben 99/06/20 05:29:19 Modified:mpm/src CHANGES Log: Document changes. Revision ChangesPath 1.5 +7 -0 apache-2.0/mpm/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-2.0/mpm/src/CHANGES,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CHANGES 1999/06/19 18:10:03 1.4 +++ CHANGES 1999/06/20 12:29:18 1.5 @@ -1,5 +1,12 @@ Changes with MPM +* Handle partial large writes correctly. + [Ben Laurie] + +* Eliminate conn_rec's pointer to server. All it knows is the base server + based on IP/port + [Ben Laurie] + * Port a bunch of modules to the new module structure. [Michael H. Voase [EMAIL PROTECTED]]
Re: cvs commit: apache-2.0/mpm/src Configuration.mpm
[EMAIL PROTECTED] wrote: jim 99/06/19 15:16:04 Modified:mpm/src Configuration.mpm Log: FreeBSD requires this to grab the thread lib for pthreads. Uncomment when trying on that I used -lc_r - is there a difference? Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
Re: cvs commit: apache-2.0/mpm/src/main iol_unix.c Makefile.tmpl buff.c http_connection.c http_protocol.c http_request.c
[EMAIL PROTECTED] wrote: dgaudet 99/06/18 16:35:01 Modified:mpm/src CHANGES mpm/src/include buff.h mpm/src/main Makefile.tmpl buff.c http_connection.c http_protocol.c http_request.c Added: mpm/src/docs buff.txt mpm/src/include ap_iol.h mpm/src/main iol_unix.c Log: I'm sure this is wrong... but it's my start. i/o layering. Hoorah! Doupleplusone. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-2.0/mpm/src/main http_connection.c http_protocol.c iol_unix.c
ben 99/06/19 13:23:38 Modified:mpm/src/main http_connection.c http_protocol.c iol_unix.c Log: Compile on FreeBSD. Revision ChangesPath 1.3 +0 -2 apache-2.0/mpm/src/main/http_connection.c Index: http_connection.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_connection.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- http_connection.c 1999/06/18 23:34:59 1.2 +++ http_connection.c 1999/06/19 20:23:37 1.3 @@ -64,8 +64,6 @@ #include http_config.h #include http_vhost.h -#include poll.h - /* TODO: re-implement the lingering close stuff */ #define NO_LINGCLOSE 1.4 +0 -1 apache-2.0/mpm/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- http_protocol.c 1999/06/18 23:34:59 1.3 +++ http_protocol.c 1999/06/19 20:23:37 1.4 @@ -74,7 +74,6 @@ * support code... */ #include util_date.h /* For parseHTTPdate and BAD_DATE */ #include stdarg.h -#include poll.h #define SET_BYTES_SENT(r) \ do { if (r-sent_bodyct) \ 1.3 +3 -0 apache-2.0/mpm/src/main/iol_unix.c Index: iol_unix.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/main/iol_unix.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- iol_unix.c1999/06/19 17:59:57 1.2 +++ iol_unix.c1999/06/19 20:23:37 1.3 @@ -63,6 +63,9 @@ #include sys/types.h #include sys/uio.h +#ifndef ETIME +# define ETIME -1 +#endif #define FD_NONBLOCKING_SET (1)
cvs commit: apache-2.0/mpm/src/modules/standard mod_env.c
ben 99/06/19 13:40:50 Modified:mpm/src Configuration.mpm mpm/src/modules/standard mod_env.c Log: Port mod_env (I think). Revision ChangesPath 1.4 +1 -1 apache-2.0/mpm/src/Configuration.mpm Index: Configuration.mpm === RCS file: /export/home/cvs/apache-2.0/mpm/src/Configuration.mpm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Configuration.mpm 1999/06/19 18:10:03 1.3 +++ Configuration.mpm 1999/06/19 20:40:48 1.4 @@ -22,7 +22,7 @@ Rule EXPAT=no Rule WANTHSREGEX=default # AddModule modules/experimental/mod_mmap_static.o -# AddModule modules/standard/mod_env.o +AddModule modules/standard/mod_env.o AddModule modules/standard/mod_log_config.o # AddModule modules/standard/mod_log_agent.o # AddModule modules/standard/mod_log_referer.o 1.2 +6 -2 apache-2.0/mpm/src/modules/standard/mod_env.c Index: mod_env.c === RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_env.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mod_env.c 1999/06/18 18:39:38 1.1 +++ mod_env.c 1999/06/19 20:40:49 1.2 @@ -248,8 +248,12 @@ module MODULE_VAR_EXPORT env_module = { -STANDARD_MODULE_STUFF, -NULL, /* initializer */ +STANDARD20_MODULE_STUFF, +NULL,/* pre_command_line */ +NULL,/* pre_config */ +NULL,/* post_config */ +NULL,/* open_logs */ +NULL,/* child initializer */ create_env_dir_config, /* dir config creater */ merge_env_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */
Re: cvs commit: apache-1.3/src/main util.c
[EMAIL PROTECTED] wrote: coar99/06/17 15:58:17 Modified:src/main util.c Log: Cosmetic; style fix and a nit: I object to the implicit assumption that NULL == 0, regardless of its validity. That wasn't the assumption, implicit or otherwise. The assumption was that !NULL is true. BTW, I quote KR ed. 2: the constant zero may be assigned to a pointer, and a pointer may be compared with the constant zero. The symbolic constant NULL is often used in place of zero. So, you appear to be objecting to the wisdom of God. Cheers, Ben. -- http://www.apache-ssl.org/ben.html My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there. - Indira Gandhi
cvs commit: apache-1.3/src Configure
ben 99/06/07 05:05:35 Modified:src Configure Log: Allow Libs: in .module files. Revision ChangesPath 1.352 +6 -1 apache-1.3/src/Configure Index: Configure === RCS file: /export/home/cvs/apache-1.3/src/Configure,v retrieving revision 1.351 retrieving revision 1.352 diff -u -r1.351 -r1.352 --- Configure 1999/05/31 11:57:57 1.351 +++ Configure 1999/06/07 12:05:35 1.352 @@ -1537,6 +1537,11 @@ fi . ./$tmpfile3 fi + if grep Libs: $tmpfile2 /dev/null; then + modlibs1=`grep Libs: $tmpfile2 | sed 's/^.*Libs:[ ]*//'` + echo o $modbase adds libraries: $modlibs1 + modlibs=$modlibs $modlibs1 + fi rm -f $tmpfile2 $tmpfile3 if [ x$ext != x$SHLIB_SUFFIX_NAME ]; then ext=o @@ -1977,7 +1982,7 @@ ## Finish creating the Makefile.config file ## -echo LIBS1=$LIBS Makefile.config +echo LIBS1=$modlibs $LIBS Makefile.config echo ## Makefile.config echo ## (End of automatically generated section) Makefile.config echo ## Makefile.config
cvs commit: apache-1.3/src CHANGES
ben 99/06/07 05:06:03 Modified:src CHANGES Log: Document libs: change. Revision ChangesPath 1.1372+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1371 retrieving revision 1.1372 diff -u -r1.1371 -r1.1372 --- CHANGES 1999/06/04 18:39:57 1.1371 +++ CHANGES 1999/06/07 12:05:58 1.1372 @@ -1,5 +1,8 @@ Changes with Apache 1.3.7 + *) Allow .module files to specify libraries with Lib:. + [Ben Laurie] + *) Allow SetEnvIf[NoCase] to test environment variables as well as header fields and request attributes. [Ken Coar]
cvs commit: apache-site related_projects.html
ben 98/09/28 07:33:51 Modified:.related_projects.html Log: Duh! Some people couldn't find the link! Revision ChangesPath 1.32 +3 -1 apache-site/related_projects.html Index: related_projects.html === RCS file: /export/home/cvs/apache-site/related_projects.html,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- related_projects.html 1998/08/17 06:58:46 1.31 +++ related_projects.html 1998/09/28 14:33:50 1.32 @@ -61,7 +61,9 @@ States you can use it for non-commercial and commercial purposes for free.P -Inside the United States in order to use Apache with SSL commercially you may want to look at A HREF=#strongholdStronghold/A or A HREF=#ravenRaven/A. +Inside the United States in order to use Apache with SSL commercially you may want to look at A HREF=#strongholdStronghold/A or A HREF=#ravenRaven/A.P + +A HREF=http://www.apache-ssl.org/;Get Apache-SSL from here/A. PHR
cvs commit: apache-2.0/apache-nspr/main Makefile.tmpl
ben 98/09/26 04:38:57 Modified:apache-nspr/main Makefile.tmpl Log: Fail properly when header generation fails. Remove the right headers! Revision ChangesPath 1.4 +2 -2 apache-2.0/apache-nspr/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-2.0/apache-nspr/main/Makefile.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.tmpl 1998/09/22 18:05:15 1.3 +++ Makefile.tmpl 1998/09/26 11:38:56 1.4 @@ -30,13 +30,13 @@ -rm -f Makefile uri_delims.h: gen_uri_delims - ./gen_uri_delims uri_delims.h || rm test_char.h + ./gen_uri_delims uri_delims.h || (rm uri_delims.h; false) gen_uri_delims: gen_uri_delims.o $(CC) $(CFLAGS) $(LDFLAGS) -o gen_uri_delims gen_uri_delims.o $(LIBS) test_char.h: gen_test_char - ./gen_test_char test_char.h || rm test_char.h + ./gen_test_char test_char.h || (rm test_char.h; false) gen_test_char: gen_test_char.o $(CC) $(CFLAGS) $(LDFLAGS) -o gen_test_char gen_test_char.o $(LIBS)
cvs commit: apache-1.3/src/support dbmmanage
ben 98/09/26 07:47:50 Modified:src/support dbmmanage Log: Make read-only commands work. Maybe improve diagnostics. Revision ChangesPath 1.12 +2 -2 apache-1.3/src/support/dbmmanage Index: dbmmanage === RCS file: /export/home/cvs/apache-1.3/src/support/dbmmanage,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- dbmmanage 1998/05/18 11:24:21 1.11 +++ dbmmanage 1998/09/26 14:47:49 1.12 @@ -89,9 +89,9 @@ my %DB = (); my @range = (); my($mode, $flags) = $command =~ -/^(?:view|check)$/ ? (undef, O_RDONLY) : (0644, O_RDWR|O_CREAT); +/^(?:view|check)$/ ? (0644, O_RDONLY) : (0644, O_RDWR|O_CREAT); -tie %DB, AnyDBM_File, $file, $flags, $mode; +tie %DB, AnyDBM_File, $file, $flags, $mode || die Can't tie $file: $!; dbmc-$command(); untie %DB;
cvs commit: apache-2.0/apache-nspr/modules/standard mod_cgi.c
ben 98/09/19 12:15:45 Modified:apache-nspr Configuration.ben HOWTOBUILD apache-nspr/include util_script.h apache-nspr/main util.c util_script.c apache-nspr/modules/standard mod_cgi.c Log: Use new NSPR chdir API. Revive ap_chdir_file(). Revision ChangesPath 1.2 +8 -2 apache-2.0/apache-nspr/Configuration.ben Index: Configuration.ben === RCS file: /export/home/cvs/apache-2.0/apache-nspr/Configuration.ben,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Configuration.ben 1998/09/05 16:18:55 1.1 +++ Configuration.ben 1998/09/19 19:15:42 1.2 @@ -1,7 +1,13 @@ +# WTF? Those crazy Mozilla guys seem to have hardwired it? Why? +#NSPR=/home/ben/work/mozilla/dist/FreeBSD2.2.7_DBG.OBJ +#NSPR=/home/ben/work/apache-2.0/dist/FreeBSD2.2.7_DBG.OBJ + EXTRA_CFLAGS=-Wall -Wshadow -Wmissing-prototypes -pipe -fno-common -DNSPR -EXTRA_LDFLAGS=-g -L/home/ben/work/apache-2.0/dist/FreeBSD2.2.7_DBG.OBJ/lib +EXTRA_LDFLAGS=-g -L/home/ben/work/mozilla/dist/FreeBSD2.2.7_DBG.OBJ/lib -R/home/ben/work/mozilla/dist/FreeBSD2.2.7_DBG.OBJ/lib +#EXTRA_LDFLAGS=-g -L/home/ben/work/apache-2.0/dist/FreeBSD2.2.7_DBG.OBJ/lib EXTRA_LIBS=-lnspr21 -EXTRA_INCLUDES=-I/home/ben/work/apache-2.0/dist/FreeBSD2.2.7_DBG.OBJ/include +EXTRA_INCLUDES=-I/home/ben/work/mozilla/dist/FreeBSD2.2.7_DBG.OBJ/include +#EXTRA_INCLUDES=-I/home/ben/work/apache-2.0/dist/FreeBSD2.2.7_DBG.OBJ/include CC=gcc OPTIM=-O2 -g #RANLIB= 1.2 +10 -3 apache-2.0/apache-nspr/HOWTOBUILD Index: HOWTOBUILD === RCS file: /export/home/cvs/apache-2.0/apache-nspr/HOWTOBUILD,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HOWTOBUILD1998/09/05 16:18:56 1.1 +++ HOWTOBUILD1998/09/19 19:15:42 1.2 @@ -1,11 +1,18 @@ This is a temporary note for developers during the 2.0 development process. +N.B.: The version of NSPR included in Apache 2.0 is no longer sufficient. Use +the latest version from Mozilla. + First, build nspr: + +cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot co mozilla/nsprpub + +(I've forgotten the password - see http://www.mozilla.org). -cd .../apache-2.0/pubnspr -make (or gmake) +cd mozilla/nsprpub +make (or gmake) (use -DBUILD_OPT=1 to build optimised) -This produces a directory .../apache-2.0/dist/platform_DBG.OBJ, containing +This produces a directory .../mozilla/dist/platform_DBG.OBJ, containing include and lib. Tweak .../apache-2.0/apache-nspr/Configuration to reflect this path (use full pathnames). Note that Configuration.tmpl is currently bullshit - use one of Configuration.ben or Configuration.dean as a basis (note that Dean 1.3 +1 -0 apache-2.0/apache-nspr/include/util_script.h Index: util_script.h === RCS file: /export/home/cvs/apache-2.0/apache-nspr/include/util_script.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- util_script.h 1998/06/30 08:57:06 1.2 +++ util_script.h 1998/09/19 19:15:43 1.3 @@ -80,6 +80,7 @@ API_EXPORT(void) ap_send_size(size_t size, request_rec *r); API_EXPORT(PRProcess *) ap_spawn_cgi(request_rec *r, char *argv0, char **env, int shellcmd, const PRProcessAttr *); +API_EXPORT(int) ap_chdir_file_attr(PRProcessAttr *attr, const char *file); #ifdef __cplusplus } 1.3 +1 -3 apache-2.0/apache-nspr/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-2.0/apache-nspr/main/util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- util.c1998/06/30 08:57:08 1.2 +++ util.c1998/09/19 19:15:44 1.3 @@ -72,6 +72,7 @@ #include http_conf_globals.h /* for user_id group_id */ #include http_log.h +#include unistd.h #include prsystem.h /* A bunch of functions in util.c scan strings looking for certain characters. @@ -461,8 +462,6 @@ API_EXPORT(void) ap_chdir_file(const char *file) { -/* XXX: ap_chdir_file needs to be rethought for NSPR */ -#if 0 const char *x; char buf[HUGE_STRING_LEN]; @@ -477,7 +476,6 @@ } /* XXX: well, this is a silly function, no method of reporting an * error... ah well. */ -#endif } API_EXPORT(char *) ap_getword_nc(pool *atrans, char **line, char stop) 1.3 +17 -0 apache-2.0/apache-nspr/main/util_script.c Index: util_script.c === RCS file: /export/home/cvs/apache-2.0/apache
cvs commit: apache-1.3/src/include ap_mmn.h
ben 98/09/06 12:23:52 Modified:src/include ap_mmn.h Log: Bump MMN for binary MD5. Revision ChangesPath 1.7 +3 -2 apache-1.3/src/include/ap_mmn.h Index: ap_mmn.h === RCS file: /export/home/cvs/apache-1.3/src/include/ap_mmn.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ap_mmn.h 1998/08/31 19:51:58 1.6 +++ ap_mmn.h 1998/09/06 19:23:51 1.7 @@ -176,12 +176,13 @@ *ap_proxy_read_headers() and rdcache() to use a *request_rec* instead of pool* *(for implementing better error reporting). + * 19980906 (1.3.2-dev) - added ap_md5_binary() */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 19980825 +#define MODULE_MAGIC_NUMBER_MAJOR 19980906 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR/* backward compat */ /* Useful for testing for features. */
cvs commit: apache-1.3/src/os/unix Makefile.tmpl
ben 98/09/06 12:24:28 Modified:src Makefile.tmpl src/ap Makefile.tmpl src/main Makefile.tmpl src/modules/standard Makefile.tmpl src/os/unix Makefile.tmpl Log: Update dependencies. Revision ChangesPath 1.104 +6 -5 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- Makefile.tmpl 1998/07/25 11:30:18 1.103 +++ Makefile.tmpl 1998/09/06 19:24:25 1.104 @@ -111,10 +111,11 @@ $(OBJS): Makefile subdirs # DO NOT REMOVE -buildmark.o: buildmark.c include/ap_config.h include/ap_config_auto.h \ - os/unix/os.h include/ap_ctype.h include/hsregex.h include/httpd.h \ - include/alloc.h include/buff.h include/ap.h include/util_uri.h -modules.o: modules.c include/httpd.h include/ap_config.h \ +buildmark.o: buildmark.c include/ap_config.h include/ap_mmn.h \ include/ap_config_auto.h os/unix/os.h include/ap_ctype.h \ - include/hsregex.h include/alloc.h include/buff.h include/ap.h \ + include/httpd.h include/alloc.h include/buff.h include/ap.h \ + include/util_uri.h +modules.o: modules.c include/httpd.h include/ap_config.h \ + include/ap_mmn.h include/ap_config_auto.h os/unix/os.h \ + include/ap_ctype.h include/alloc.h include/buff.h include/ap.h \ include/util_uri.h include/http_config.h 1.29 +13 -13apache-1.3/src/ap/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/ap/Makefile.tmpl,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- Makefile.tmpl 1998/08/04 13:32:19 1.28 +++ Makefile.tmpl 1998/09/06 19:24:26 1.29 @@ -40,25 +40,25 @@ # DO NOT REMOVE ap_cpystrn.o: ap_cpystrn.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/ap.h $(INCDIR)/util_uri.h ap_execve.o: ap_execve.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/ap.h $(INCDIR)/util_uri.h -ap_signal.o: ap_signal.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ +ap_fnmatch.o: ap_fnmatch.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/fnmatch.h +ap_signal.o: ap_signal.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/ap.h $(INCDIR)/util_uri.h ap_slack.o: ap_slack.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/ap.h $(INCDIR)/util_uri.h $(INCDIR)/http_log.h ap_snprintf.o: ap_snprintf.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/ap.h $(INCDIR)/util_uri.h -ap_fnmatch.o: ap_fnmatch.c $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/fnmatch.h 1.33 +42 -40apache-1.3/src/main/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/src/main/Makefile.tmpl,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- Makefile.tmpl 1998/08/04 13:32:20 1.32 +++ Makefile.tmpl 1998/09/06 19:24:27 1.33 @@ -59,30 +59,31 @@ # DO NOT REMOVE alloc.o: alloc.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \ - $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(INCDIR)/ap_ctype.h \ - $(INCDIR)/hsregex.h $(INCDIR)/alloc.h $(INCDIR)/buff.h \ + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ + $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h $(INCDIR)/buff.h
Re: cvs commit: apache-1.3/src/os/win32 util_win32.c
[EMAIL PROTECTED] wrote: - if(nSlashes == 3) /* then we need to add one more to get \\machine\share\ */ + /* then we need to add one more to get \\machine\share\ */ + if(nSlashes == 3) OK, this is a bit of a quibble, but... it seems to me that moving the comment to before the if() is damaging the meaning - it is only true if the if is true. Cheers, Ben. -- Ben Laurie|Phone: +44 (181) 735 0686| Apache Group member Freelance Consultant |Fax: +44 (181) 735 0689|http://www.apache.org/ and Technical Director|Email: [EMAIL PROTECTED] | A.L. Digital Ltd, |Apache-SSL author http://www.apache-ssl.org/ London, England. |Apache: TDG http://www.ora.com/catalog/apache/ WE'RE RECRUITING! http://www.aldigital.co.uk/
cvs commit: apache-1.3/src/include ap.h
ben 98/09/05 09:39:48 Modified:src/include ap.h Log: Remove redundant declarations. Revision ChangesPath 1.19 +0 -2 apache-1.3/src/include/ap.h Index: ap.h === RCS file: /export/home/cvs/apache-1.3/src/include/ap.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ap.h 1998/07/08 18:02:16 1.18 +++ ap.h 1998/09/05 16:39:47 1.19 @@ -67,8 +67,6 @@ API_EXPORT(char *) ap_cpystrn(char *, const char *, size_t); int ap_slack(int, int); -API_EXPORT(int) ap_snprintf(char *, size_t, const char *, ...); -API_EXPORT(int) ap_vsnprintf(char *, size_t, const char *, va_list ap); int ap_execle(const char *, const char *, ...); int ap_execve(const char *, const char *argv[], const char *envp[]);
cvs commit: apache-2.0/nsprpub/pr/include prthread.h
ben 98/09/05 09:54:16 Modified:apache-nspr/include alloc.h ap.h apache-nspr/main fnmatch.c apache-nspr/os/unix os.c nsprpub/pr/include prthread.h Log: Fix various warnings. Revision ChangesPath 1.3 +3 -0 apache-2.0/apache-nspr/include/alloc.h Index: alloc.h === RCS file: /export/home/cvs/apache-2.0/apache-nspr/include/alloc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- alloc.h 1998/06/30 08:57:05 1.2 +++ alloc.h 1998/09/05 16:54:08 1.3 @@ -291,6 +291,9 @@ kill_only_once /* send SIGTERM and then wait */ }; +API_EXPORT(void) ap_note_subprocess(pool *a, int pid, + enum kill_conditions how); + /* 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() */ 1.3 +0 -2 apache-2.0/apache-nspr/include/ap.h Index: ap.h === RCS file: /export/home/cvs/apache-2.0/apache-nspr/include/ap.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ap.h 1998/06/30 08:57:05 1.2 +++ ap.h 1998/09/05 16:54:09 1.3 @@ -69,8 +69,6 @@ API_EXPORT(char *) ap_cpystrn(char *, const char *, size_t); int ap_slack(int, int); -API_EXPORT(int) ap_snprintf(char *, size_t, const char *, ...); -API_EXPORT(int) ap_vsnprintf(char *, size_t, const char *, va_list ap); int ap_execle(const char *, const char *, ...); int ap_execve(const char *, const char *argv[], const char *envp[]); 1.2 +1 -0 apache-2.0/apache-nspr/main/fnmatch.c Index: fnmatch.c === RCS file: /export/home/cvs/apache-2.0/apache-nspr/main/fnmatch.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fnmatch.c 1998/06/30 08:48:01 1.1 +++ fnmatch.c 1998/09/05 16:54:11 1.2 @@ -46,6 +46,7 @@ #include conf.h #include fnmatch.h #include string.h +#include ctype.h #define EOS '\0' 1.2 +2 -1 apache-2.0/apache-nspr/os/unix/os.c Index: os.c === RCS file: /export/home/cvs/apache-2.0/apache-nspr/os/unix/os.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- os.c 1998/06/30 08:48:02 1.1 +++ os.c 1998/09/05 16:54:13 1.2 @@ -5,6 +5,7 @@ #include conf.h #include os.h +#include ap.h /* some linkers complain unless there's at least one function in each @@ -66,7 +67,7 @@ #else /* ndef HPUX */ #ifdef DLSYM_NEEDS_UNDERSCORE char symbol[256]; -sprintf(symbol, _%s, symname); +ap_snprintf(symbol, sizeof symbol, _%s, symname); return dlsym(handle, symbol); #else return dlsym(handle, symname); 1.2 +2 -2 apache-2.0/nsprpub/pr/include/prthread.h Index: prthread.h === RCS file: /export/home/cvs/apache-2.0/nsprpub/pr/include/prthread.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- prthread.h1998/06/30 08:36:31 1.1 +++ prthread.h1998/09/05 16:54:15 1.2 @@ -194,7 +194,7 @@ ** ** This can return PR_FAILURE if index is invalid. */ -PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv); +PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn indexx, void *priv); /* ** Recover the per-thread-private data for the current thread. index is @@ -205,7 +205,7 @@ ** ** A thread can only get access to its own thread-specific-data. */ -PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn index); +PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn indexx); /* ** This routine sets the interrupt request for a target thread. The interrupt
cvs commit: apache-1.3/src/include util_uri.h
ben 98/07/12 13:37:30 Modified:src/include util_uri.h Log: Remove a duplicate. Revision ChangesPath 1.10 +0 -1 apache-1.3/src/include/util_uri.h Index: util_uri.h === RCS file: /export/home/cvs/apache-1.3/src/include/util_uri.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- util_uri.h1998/07/05 14:21:17 1.9 +++ util_uri.h1998/07/12 20:37:29 1.10 @@ -75,7 +75,6 @@ #define DEFAULT_GOPHER_PORT 70 #define DEFAULT_NNTP_PORT 119 #define DEFAULT_WAIS_PORT 210 -#define DEFAULT_HTTPS_PORT 443 #define DEFAULT_SNEWS_PORT 563 #define DEFAULT_PROSPERO_PORT 1525/* WARNING: conflict w/Oracle */
cvs commit: apache-1.3/src/main util_uri.c
ben 98/07/05 07:21:21 Modified:src/include util_uri.h src/main util_uri.c Log: Another minor constification. Revision ChangesPath 1.9 +1 -1 apache-1.3/src/include/util_uri.h Index: util_uri.h === RCS file: /export/home/cvs/apache-1.3/src/include/util_uri.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- util_uri.h1998/05/03 17:31:11 1.8 +++ util_uri.h1998/07/05 14:21:17 1.9 @@ -111,7 +111,7 @@ /* util_uri.c */ API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str); API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r); -API_EXPORT(struct hostent *) ap_pduphostent(pool *p, struct hostent *hp); +API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp); API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname); API_EXPORT(char *) ap_unparse_uri_components(pool *p, const uri_components *uptr, unsigned flags); 1.21 +2 -2 apache-1.3/src/main/util_uri.c Index: util_uri.c === RCS file: /export/home/cvs/apache-1.3/src/main/util_uri.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- util_uri.c1998/05/30 01:54:30 1.20 +++ util_uri.c1998/07/05 14:21:18 1.21 @@ -102,7 +102,7 @@ * from a call to gethostbyname() and lives in static storage. * By creating a copy we can tuck it away for later use. */ -API_EXPORT(struct hostent *) ap_pduphostent(pool *p, struct hostent *hp) +API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp) { struct hostent *newent; char **ptrs; @@ -111,7 +111,7 @@ int i = 0, j = 0; if (hp == NULL) - return hp; + return NULL; /* Count number of alias entries */ if (hp-h_aliases != NULL)
cvs commit: apache-1.3/src/main buff.c http_protocol.c
ben 98/07/04 09:07:28 Modified:src CHANGES src/include buff.h compat.h src/main buff.c http_protocol.c Log: Another missed API rename: bgetflag. Revision ChangesPath 1.945 +2 -2 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.944 retrieving revision 1.945 diff -u -r1.944 -r1.945 --- CHANGES 1998/07/03 20:05:58 1.944 +++ CHANGES 1998/07/04 16:07:24 1.945 @@ -10,8 +10,8 @@ *) add support for #perl arg interpolation in mod_include [Doug MacEachern] - *) API: Name changes of table_elts to ap_table_elts and is_table_empty - to ap_is_table_empty. [Ben Laurie] + *) API: Name changes of table_elts to ap_table_elts, is_table_empty + to ap_is_table_empty and bgetflag to ap_bgetflag. [Ben Laurie] *) PORT: Add UnixWare 7 support [Vadim Kostoglodoff [EMAIL PROTECTED]] PR#2463 1.45 +1 -1 apache-1.3/src/include/buff.h Index: buff.h === RCS file: /export/home/cvs/apache-1.3/src/include/buff.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- buff.h1998/05/28 22:09:46 1.44 +++ buff.h1998/07/04 16:07:25 1.45 @@ -153,7 +153,7 @@ API_EXPORT(int) ap_bsetflag(BUFF *fb, int flag, int value); API_EXPORT(int) ap_bclose(BUFF *fb); -#define bgetflag(fb, flag) ((fb)-flags (flag)) +#define ap_bgetflag(fb, flag)((fb)-flags (flag)) /* Error handling */ API_EXPORT(void) ap_bonerror(BUFF *fb, void (*error) (BUFF *, int, void *), 1.12 +1 -0 apache-1.3/src/include/compat.h Index: compat.h === RCS file: /export/home/cvs/apache-1.3/src/include/compat.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- compat.h 1998/06/29 19:06:18 1.11 +++ compat.h 1998/07/04 16:07:26 1.12 @@ -44,6 +44,7 @@ #define bflsbufap_bflsbuf #define bflush ap_bflush #define bgetc ap_bgetc +#define bgetflag ap_bgetflag #define bgetoptap_bgetopt #define bgets ap_bgets #define bhalfduplexap_bhalfduplex 1.80 +3 -3 apache-1.3/src/main/buff.c Index: buff.c === RCS file: /export/home/cvs/apache-1.3/src/main/buff.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- buff.c1998/07/01 18:22:33 1.79 +++ buff.c1998/07/04 16:07:27 1.80 @@ -689,7 +689,7 @@ } i = read_with_errors(fb, buf, nbyte); #ifdef CHARSET_EBCDIC - if (i 0 bgetflag(fb, B_ASCII2EBCDIC)) + if (i 0 ap_bgetflag(fb, B_ASCII2EBCDIC)) ascii2ebcdic(buf, buf, i); #endif /*CHARSET_EBCDIC*/ return i; @@ -728,7 +728,7 @@ /* read directly into caller's buffer */ i = read_with_errors(fb, buf, nbyte); #ifdef CHARSET_EBCDIC - if (i 0 bgetflag(fb, B_ASCII2EBCDIC)) + if (i 0 ap_bgetflag(fb, B_ASCII2EBCDIC)) ascii2ebcdic(buf, buf, i); #endif /*CHARSET_EBCDIC*/ if (i == -1) { @@ -1194,7 +1194,7 @@ static int csize = 0; /* XXX: martin don't you want to do this after the error tests below? */ -if (bgetflag(fb, B_EBCDIC2ASCII)) { +if (ap_bgetflag(fb, B_EBCDIC2ASCII)) { if (nbyte csize) { if (cbuf != NULL) free(cbuf); 1.223 +3 -3 apache-1.3/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.222 retrieving revision 1.223 diff -u -r1.222 -r1.223 --- http_protocol.c 1998/07/01 21:19:53 1.222 +++ http_protocol.c 1998/07/04 16:07:27 1.223 @@ -647,7 +647,7 @@ */ ap_bsetflag(conn-client, B_SAFEREAD, 1); while ((len = getline(l, HUGE_STRING_LEN, conn-client, 0)) = 0) { -if ((len 0) || bgetflag(conn-client, B_EOF)) { +if ((len 0) || ap_bgetflag(conn-client, B_EOF)) { ap_bsetflag(conn-client, B_SAFEREAD, 0); return 0; } @@ -1050,7 +1050,7 @@ { char *protocol; #ifdef CHARSET_EBCDIC -int convert = bgetflag(r-connection-client, B_EBCDIC2ASCII); +int convert = ap_bgetflag(r-connection-client, B_EBCDIC2ASCII); #endif /*CHARSET_EBCDIC*/ if (r-assbackwards) @@ -1209,7 +1209,7 @@ int i