cvs commit: apache-2.0/src/lib/apr/mmap/unix .cvsignore
manoj 99/10/22 20:07:49 Added: src/lib/apr/mmap/unix .cvsignore Log: Add a .cvsignore file to the Unix mmap section of APR Revision ChangesPath 1.1 apache-2.0/src/lib/apr/mmap/unix/.cvsignore Index: .cvsignore === Makefile
cvs commit: apache-2.0/src/lib/apr/network_io/beos networkio.h
dreid 99/10/23 07:43:44 Modified:src/lib/apr/network_io/beos networkio.h Log: This small addition needs altered yet again. This time hopefully it'll be totally correct. Revision ChangesPath 1.6 +1 -1 apache-2.0/src/lib/apr/network_io/beos/networkio.h Index: networkio.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- networkio.h 1999/10/22 11:26:54 1.5 +++ networkio.h 1999/10/23 14:43:43 1.6 @@ -62,7 +62,7 @@ /* The definition of isascii was missed from the PowerPC ctype.h * * It will be included in the next release, but until then... */ -#if __POWER_PC__ +#if __POWERPC__ #define isascii(c) (((c) ~0x7f)==0) #endif
cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
martin 99/10/23 13:15:18 Modified:src/lib/apr/file_io/unix dir.c src/lib/apr/file_io/win32 dir.c src/lib/apr/include apr_portable.h Log: Fix interface of ap_get_os_dir(): it previously modified a local pointer without returning anything sensible. Also, in ap_readdir() I modified a questionable use of an uninitialized variable (save_errno) which could result in an endless loop returning APR_SUCCESS when in fact EOF was reached. Revision ChangesPath 1.12 +6 -7 apache-2.0/src/lib/apr/file_io/unix/dir.c Index: dir.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/dir.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- dir.c 1999/10/21 13:15:55 1.11 +++ dir.c 1999/10/23 20:15:16 1.12 @@ -127,13 +127,12 @@ #if APR_HAS_THREADS _POSIX_THREAD_SAFE_FUNCTIONS return readdir_r(thedir-dirstruct, thedir-entry, thedir-entry); #else -int save_errno; -ap_status_t status; thedir-entry = readdir(thedir-dirstruct); if (thedir-entry == NULL) { -if (errno == save_errno) { -return APR_SUCCESS; +/* If NULL was returned, this can NEVER be a success. Can it?! */ +if (errno == APR_SUCCESS) { +return APR_ENOENT; } return errno; } @@ -294,17 +293,17 @@ } /* ***APRDOC - * ap_status_t ap_get_os_dir(ap_os_dir_t *, ap_dir_t *) + * ap_status_t ap_get_os_dir(ap_os_dir_t **, ap_dir_t *) *convert the dir from apr type to os specific type. * arg 1) The apr dir to convert. * arg 2) The os specific dir we are converting to */ -ap_status_t ap_get_os_dir(ap_os_dir_t *thedir, struct dir_t *dir) +ap_status_t ap_get_os_dir(ap_os_dir_t **thedir, struct dir_t *dir) { if (dir == NULL) { return APR_ENODIR; } -thedir = dir-dirstruct; +*thedir = dir-dirstruct; return APR_SUCCESS; } 1.6 +2 -2 apache-2.0/src/lib/apr/file_io/win32/dir.c Index: dir.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/win32/dir.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dir.c 1999/10/12 06:14:43 1.5 +++ dir.c 1999/10/23 20:15:17 1.6 @@ -210,12 +210,12 @@ return APR_SUCCESS; } -ap_status_t ap_get_os_dir(ap_os_dir_t *thedir, struct dir_t *dir) +ap_status_t ap_get_os_dir(ap_os_dir_t **thedir, struct dir_t *dir) { if (dir == NULL) { return APR_ENODIR; } -thedir = dir-dirhand; +*thedir = dir-dirhand; return APR_SUCCESS; } 1.12 +1 -1 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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- apr_portable.h1999/10/22 22:30:41 1.11 +++ apr_portable.h1999/10/23 20:15:18 1.12 @@ -187,7 +187,7 @@ #endif ap_status_t ap_get_os_file(ap_os_file_t *, ap_file_t *); -ap_status_t ap_get_os_dir(ap_os_dir_t *, ap_dir_t *); +ap_status_t ap_get_os_dir(ap_os_dir_t **, ap_dir_t *); ap_status_t ap_get_os_sock(ap_os_sock_t *, ap_socket_t *); ap_status_t ap_get_os_lock(ap_os_lock_t *, ap_lock_t *); ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *);
cvs commit: apache-2.0/src/modules/standard mod_speling.c
martin 99/10/23 14:20:17 Modified:src CHANGES src/modules/standard mod_speling.c Log: mod_speling runs in 2.0-dev now: a bug in (linux?) readdir_r handling and interface adaption to APR functions did it. [Martin Kraemer] Revision ChangesPath 1.12 +3 -0 apache-2.0/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-2.0/src/CHANGES,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CHANGES 1999/10/13 02:41:06 1.11 +++ CHANGES 1999/10/23 21:20:15 1.12 @@ -1,5 +1,8 @@ Changes with Apache 2.0-dev + *) mod_speling runs in 2.0-dev now: a bug in readdir_r handling and + interface adaption to APR functions did it. [Martin Kraemer] + *) Support DSOs properly on 32-bit HP-UX 11.0 [Dilip Khandekar [EMAIL PROTECTED]] 1.6 +10 -15apache-2.0/src/modules/standard/mod_speling.c Index: mod_speling.c === RCS file: /export/home/cvs/apache-2.0/src/modules/standard/mod_speling.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_speling.c 1999/10/22 15:50:12 1.5 +++ mod_speling.c 1999/10/23 21:20:16 1.6 @@ -61,7 +61,6 @@ #include http_config.h #include http_log.h #include apr_file_io.h -#include ../../lib/apr/misc/unix/misc.h /* mod_speling.c - by Alexei Kosut [EMAIL PROTECTED] June, 1996 * @@ -229,7 +228,7 @@ static int check_speling(request_rec *r) { spconfig *cfg; -char *good, *bad, *postgood, *url; +char *good, *bad, *postgood, *url, *fname; int filoc, dotloc, urlen, pglen; ap_array_header_t *candidates = NULL; ap_dir_t *dir; @@ -302,17 +301,14 @@ dotloc = strlen(bad); } -while (ap_readdir(dir) == APR_SUCCESS) { +/* NOTE: ap_get_dir_filename() fills fname with a ap_palloc()ed copy + * of the found directory name already. We don't need to copy it. + * @@@: Copying *ALL* found file names is wasted energy (and memory)! + */ +while (ap_readdir(dir) == APR_SUCCESS +ap_get_dir_filename(fname, dir) == APR_SUCCESS) { sp_reason q; - char *fname; -ap_status_t ok; - -ok = ap_get_dir_filename(fname, dir); -/*@@*/ -ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_INFO, APR_SUCCESS, - r, __FILE__: Check_Speling `%s' in `%s', r-filename, good, ok==APR_SUCCESS ? fname : ERROR); -/*@@*/ /* * If we end up with a fixed URL which is identical to the * requested one, we must have found a broken symlink or some such. @@ -331,7 +327,7 @@ misspelled_file *sp_new; sp_new = (misspelled_file *) ap_push_array(candidates); -sp_new-name = ap_pstrdup(r-pool, fname); +sp_new-name = fname; sp_new-quality = SP_MISCAPITALIZED; } @@ -343,7 +339,7 @@ misspelled_file *sp_new; sp_new = (misspelled_file *) ap_push_array(candidates); -sp_new-name = ap_pstrdup(r-pool, fname); +sp_new-name = fname; sp_new-quality = q; } @@ -389,13 +385,12 @@ misspelled_file *sp_new; sp_new = (misspelled_file *) ap_push_array(candidates); -sp_new-name = ap_pstrdup(r-pool, fname); +sp_new-name = fname; sp_new-quality = SP_VERYDIFFERENT; } #endif } } - ap_closedir(dir); if (candidates-nelts != 0) {
cvs commit: apache-2.0/src/lib/apr/file_io/unix dir.c
martin 99/10/23 14:23:20 Modified:src/lib/apr/file_io/unix dir.c Log: The readdir_r() function in Linux does return with a zero return even when end-of-file was reached and dir-entry was set to NULL. Handle this situation graefully and fake an EOF condition. (This modification was required to get mod_speling running). Revision ChangesPath 1.13 +12 -2 apache-2.0/src/lib/apr/file_io/unix/dir.c Index: dir.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/dir.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- dir.c 1999/10/23 20:15:16 1.12 +++ dir.c 1999/10/23 21:23:20 1.13 @@ -124,8 +124,13 @@ */ ap_status_t ap_readdir(struct dir_t *thedir) { -#if APR_HAS_THREADS _POSIX_THREAD_SAFE_FUNCTIONS -return readdir_r(thedir-dirstruct, thedir-entry, thedir-entry); +#if APR_HAS_THREADS _POSIX_THREAD_SAFE_FUNCTIONS +ap_status_t ret; +ret = readdir_r(thedir-dirstruct, thedir-entry, thedir-entry); +/* Avoid the Linux problem where at end-of-directory thedir-entry + * is set to NULL, but ret = APR_SUCCESS. + */ +return (ret == APR_SUCCESS thedir-entry == NULL) ? APR_ENOENT : ret; #else thedir-entry = readdir(thedir-dirstruct); @@ -288,6 +293,11 @@ */ ap_status_t ap_get_dir_filename(char **new, struct dir_t *thedir) { +/* Detect End-Of-File */ +if (thedir == NULL || thedir-entry == NULL) { + *new = NULL; + return APR_ENOENT; +} (*new) = ap_pstrdup(thedir-cntxt, thedir-entry-d_name); return APR_SUCCESS; }
cvs commit: apache-2.0/src/main http_log.c
martin 99/10/23 14:27:39 Modified:src/main http_log.c Log: Be on the safe side Revision ChangesPath 1.14 +1 -1 apache-2.0/src/main/http_log.c Index: http_log.c === RCS file: /export/home/cvs/apache-2.0/src/main/http_log.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- http_log.c1999/10/20 12:49:55 1.13 +++ http_log.c1999/10/23 21:27:38 1.14 @@ -409,7 +409,7 @@ %s(%d): , file, line); } #endif /* TPF */ -if (r) { +if (r r-connection) { /* XXX: TODO: add a method of selecting whether logged client * addresses are in dotted quad or resolved form... dotted * quad is the most secure, which is why I'm implementing it