cvs commit: apache-2.0/src/lib/apr/time/os2 .cvsignore Makefile.in default.c
bjh 99/12/20 17:45:24 Removed: src/lib/apr/time/os2 .cvsignore Makefile.in default.c Log: Remove OS/2 version of time library, the default unix code works just fine.
cvs commit: apache-2.0/src/helpers build-acconfig-header
manoj 99/12/20 23:21:38 Modified:src buildconf Removed: src acconfig.h.in src/helpers build-acconfig-header Log: We don't need the capability to build an acconfig.h anymore; AC_DEFINE provides everything we need for equivalent functionality. This change deletes the intrastructure that built acconfig.h.in before. Revision ChangesPath 1.8 +0 -2 apache-2.0/src/buildconf Index: buildconf === RCS file: /home/cvs/apache-2.0/src/buildconf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -u -r1.7 -r1.8 --- buildconf 1999/12/20 04:38:26 1.7 +++ buildconf 1999/12/21 07:21:37 1.8 @@ -67,8 +67,6 @@ automake_flags=--copy fi -./helpers/build-acconfig-header - mv aclocal.m4 aclocal.m4.old 2/dev/null aclocal if test $? != 0 -a $am_prefix != $lt_prefix; then
cvs commit: apache-2.0/src/main http_core.c
manoj 99/12/20 23:54:09 Modified:src CHANGES src/main http_core.c Log: Add back support for UseCanonicalName in Directory containers. Found by Dave Colasurdo [EMAIL PROTECTED] Revision ChangesPath 1.18 +3 -0 apache-2.0/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-2.0/src/CHANGES,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -u -r1.17 -r1.18 --- CHANGES 1999/12/04 22:17:48 1.17 +++ CHANGES 1999/12/21 07:54:07 1.18 @@ -1,5 +1,8 @@ Changes with Apache 2.0-dev + *) Add back support for UseCanonicalName in Directory containers. + [Manoj Kasichainula] + *) Added APLOG_STARTUP log type. This allows us to write an error message without any of the date and time information. As a part of this change, I also removed all of the calls to fprintf(stderr 1.29 +1 -1 apache-2.0/src/main/http_core.c Index: http_core.c === RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -u -r1.28 -r1.29 --- http_core.c 1999/12/20 16:38:34 1.28 +++ http_core.c 1999/12/21 07:54:08 1.29 @@ -2352,7 +2352,7 @@ { ContentDigest, set_content_md5, NULL, OR_OPTIONS, FLAG, whether or not to send a Content-MD5 header with each request }, { UseCanonicalName, set_use_canonical_name, NULL, - RSRC_CONF, TAKE1, + RSRC_CONF|ACCESS_CONF, TAKE1, How to work out the ServerName : Port when constructing URLs }, /* TODOC: MaxServers is deprecated */ /* TODOC: ServersSafetyLimit is deprecated */
cvs commit: apache-2.0 STATUS
manoj 99/12/21 00:26:50 Modified:.STATUS Log: [insert weather comment here] Revision ChangesPath 1.23 +16 -24apache-2.0/STATUS Index: STATUS === RCS file: /home/cvs/apache-2.0/STATUS,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -u -r1.22 -r1.23 --- STATUS1999/12/13 15:46:45 1.22 +++ STATUS1999/12/21 08:26:49 1.23 @@ -1,14 +1,11 @@ Apache 2.0 STATUS: -Last modified at [$Date: 1999/12/13 15:46:45 $] +Last modified at [$Date: 1999/12/21 08:26:49 $] Release: - -2.0: In pre-alpha development - -Plan: -* Vague goal of an alpha or beta release in 1999. Commit-then-review - is active. +Assuming more features aren't demanded for the 2.0 release +2.0a1/b1: January 2000 +2.0 : Early 2000 RELEASE SHOWSTOPPERS: @@ -25,9 +22,6 @@ * Port mod_rewrite Status: Paul Reder [EMAIL PROTECTED] is working on this. -* Port mod_mime_magic -Status: Paul Reder [EMAIL PROTECTED] is working on this. - * suEXEC doesn't work Status: Manoj has posted an patch to fix this. [EMAIL PROTECTED] @@ -68,31 +62,29 @@ were told these would be considered for inclusion in Apache 2.0, it would be nice to actually do so. -* Win32: Migrate the MPM over to use APR thread/process calls. This would eliminate - some code in the Win32 branch that essentially duplicates what is in APR. - Status: Bill [EMAIL PROTECTED] is working on this. +* Win32: Migrate the MPM over to use APR thread/process calls. This + would eliminate some code in the Win32 branch that essentially + duplicates what is in APR. +Status: Bill [EMAIL PROTECTED] is working on this. * Move I/O layering into APR. -* There are still a number of places in the code where we are loosing error - status (i.e. throwing away the error returned by a system call and replacing - it with a generic error code) +* There are still a number of places in the code where we are + loosing error status (i.e. throwing away the error returned by a + system call and replacing it with a generic error code) * APRize the stat function. CRT stat() is about 30% slower on Windows than the equivalent native Windows call. The APR call should return the Unix style stat structure, just to keep it familier. * Implement reliable piped logs on Windows -Status: Bill [EMAIL PROTECTED] has prototype code (not reliable) in 1.3. -Should be much cleaner with APR in 2.0. +Status: Bill [EMAIL PROTECTED] has prototype code (not +reliable) in 1.3. Should be much cleaner with APR in 2.0. * Switch to autoconf, et al. for configuration. Status: Manoj has placed an initial version into the 2.0 repository. Todos include: - - Support selection of modules (including MPMs; only Dexter -works right now). Probably involved creating a directory for -each module - make install and make depend should work - a tool to simplfy third-party module building should be written. Something like apxs @@ -117,9 +109,9 @@ behavior. Dean has suggested getting rid of regex containers completely. -* SIGSEGV on Linux seems to only kill a thread, not a whole process; - we need to work around this, probably by bouncing the signal to - the sigwait thread. But this will hurt debugability. +* SIGSEGV on Linux (glibc 2.1.2) isn't caught properly by a + sigwaiting thread. We need to work around this, perhaps unless + there is hope soon for a fixed glibc. Other features that need writing:
cvs commit: apache-2.0/src/main http_protocol.c http_vhost.c
fanf99/12/21 03:33:23 Modified:src CHANGES src/main http_protocol.c http_vhost.c Log: Fix the mass vhosting security problem spotted by Lars, as in 1.3 Submitted by: Ben Hyde Reviewed by: Tony Finch Revision ChangesPath 1.19 +5 -0 apache-2.0/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-2.0/src/CHANGES,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- CHANGES 1999/12/21 07:54:07 1.18 +++ CHANGES 1999/12/21 11:33:21 1.19 @@ -1,4 +1,9 @@ Changes with Apache 2.0-dev + + *) More rigorous checking of Host: headers to fix security problems + with mass name-based virtual hosting (whether using mod_rewrite + or mod_vhost_alias). + [Ben Hyde, Tony Finch] *) Add back support for UseCanonicalName in Directory containers. [Manoj Kasichainula] 1.43 +3 -1 apache-2.0/src/main/http_protocol.c Index: http_protocol.c === RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- http_protocol.c 1999/12/20 16:38:34 1.42 +++ http_protocol.c 1999/12/21 11:33:22 1.43 @@ -1033,7 +1033,7 @@ r-status = HTTP_OK; /* Until further notice. */ /* update what we think the virtual host is based on the headers we've - * now read + * now read. may update status. */ ap_update_vhost_from_headers(r); @@ -1056,6 +1056,8 @@ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, client sent HTTP/1.1 request without hostname (see RFC2068 section 9, and 14.23): %s, r-uri); +} +if (r-status != HTTP_OK) { ap_send_error_response(r, 0); ap_run_log_transaction(r); return r; 1.10 +41 -10apache-2.0/src/main/http_vhost.c Index: http_vhost.c === RCS file: /home/cvs/apache-2.0/src/main/http_vhost.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_vhost.c 1999/12/15 00:59:56 1.9 +++ http_vhost.c 1999/12/21 11:33:23 1.10 @@ -658,22 +658,51 @@ * run-time vhost matching functions */ -/* Remove :port and optionally a single trailing . from the hostname, this - * canonicalizes it somewhat. +/* Lowercase and remove any trailing dot and/or :port from the hostname, + * and check that it is sane. */ static void fix_hostname(request_rec *r) { -const char *hostname = r-hostname; -char *host = ap_getword(r-pool, hostname, ':');/* get rid of port */ -size_t l; - -/* trim a trailing . */ -l = strlen(host); -if (l 0 host[l-1] == '.') { -host[l-1] = '\0'; +char *host = ap_palloc(r-pool, strlen(r-hostname) + 1); +const char *src; +char *dst; + +/* check and copy the host part */ +src = r-hostname; +dst = host; +while (*src) { + if (!isalnum(*src) *src != '.' *src != '-') { + if (*src == ':') + break; + else + goto bad; + } else { + *dst++ = *src++; + } +} +/* check the port part */ +if (*src++ == ':') { + while (*src) { + if (!isdigit(*src++)) { + goto bad; + } + } +} +/* strip trailing gubbins */ +if (dst host dst[-1] == '.') { + dst[-1] = '\0'; +} else { + dst[0] = '\0'; } r-hostname = host; +return; + +bad: +r-status = HTTP_BAD_REQUEST; +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, + Client sent malformed Host header); +return; } @@ -876,6 +905,8 @@ /* must set this for HTTP/1.1 support */ if (r-hostname || (r-hostname = ap_table_get(r-headers_in, Host))) { fix_hostname(r); + if (r-status != HTTP_OK) + return; } /* check if we tucked away a name_chain */ if (r-connection-vhost_lookup_data) {
Re: cvs commit: apache-2.0 STATUS
Release: - -2.0: In pre-alpha development - When did we get out of pre-alpha development? Last time I checked, we hadn't released an alpha, and that means this is still pre-alpha code. I would like this put back, because there are still some changes that need to be made before we officially release an alpha. It isn't so much functionality, as it is making the code use APR all over the place, but if we make the change after the alpha release, we make it much harder for people to port modules. -Plan: -* Vague goal of an alpha or beta release in 1999. Commit-then-review - is active. +Assuming more features aren't demanded for the 2.0 release +2.0a1/b1: January 2000 +2.0 : Early 2000 I guess I'm wondering when this was decided. I would like to see an alpha in January, a beta in February, and a release when it is ready. We released 7 beta's for 1.3, I expect almost as many if not more for 2.0. I don't want to make grand plans to release 2.0 in early 2000 if we can't meet it. Ryan ___ Ryan Bloom [EMAIL PROTECTED] 6209 H Shanda Dr. Raleigh, NC 27609 Ryan Bloom -- thinker, adventurer, artist, writer, but mostly, friend. ---
cvs commit: apache-2.0/src/main http_vhost.c
stoddard99/12/21 06:45:54 Modified:src/main http_vhost.c Log: Fix compile break introduced to Apache 2.0 by the mass vhosting security fix. Revision ChangesPath 1.11 +1 -1 apache-2.0/src/main/http_vhost.c Index: http_vhost.c === RCS file: /home/cvs/apache-2.0/src/main/http_vhost.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- http_vhost.c 1999/12/21 11:33:23 1.10 +++ http_vhost.c 1999/12/21 14:45:53 1.11 @@ -700,7 +700,7 @@ bad: r-status = HTTP_BAD_REQUEST; -ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, Client sent malformed Host header); return; }
cvs commit: apache-2.0/src/lib/apr/time/unix time.c
bjh 99/12/21 07:16:39 Modified:src/lib/apr/time/unix time.c Log: Prevent segfault on comparing an uninitialized ap_time_t object. Treat it as a zero value, same as a NULL ap_time_t pointer. Revision ChangesPath 1.14 +2 -2 apache-2.0/src/lib/apr/time/unix/time.c Index: time.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- time.c1999/12/20 16:10:16 1.13 +++ time.c1999/12/21 15:16:36 1.14 @@ -237,10 +237,10 @@ */ ap_status_t ap_timecmp(struct atime_t *a, struct atime_t *b) { -if (a == NULL) { +if (a == NULL || a-currtime == NULL) { return APR_LESS; } -else if (b == NULL) { +else if (b == NULL || b-currtime == NULL) { return APR_MORE; }
cvs commit: apache-2.0/src/main http_protocol.c
rbb 99/12/21 08:21:44 Modified:src/lib/apr/include apr_time.h src/lib/apr/time/unix timestr.c src/main http_protocol.c Log: Change ap_gm_timestr_822 to ap_timestr. Now, one function can be used to get a timestr for GMT and Localtimes. Revision ChangesPath 1.5 +1 -1 apache-2.0/src/lib/apr/include/apr_time.h Index: apr_time.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- apr_time.h1999/12/20 16:10:11 1.4 +++ apr_time.h1999/12/21 16:21:41 1.5 @@ -76,7 +76,7 @@ ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e); ap_status_t ap_implode_time(ap_time_t *); -ap_status_t ap_gm_timestr_822(char **date_str, struct atime_t *t, ap_context_t *p); +ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e type, ap_context_t *p); ap_status_t ap_strftime(char *s, ap_size_t max, const char *format, ap_time_t *tm); /* accessor functions */ 1.2 +8 -8 apache-2.0/src/lib/apr/time/unix/timestr.c Index: timestr.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/timestr.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- timestr.c 1999/12/20 16:10:16 1.1 +++ timestr.c 1999/12/21 16:21:43 1.2 @@ -65,7 +65,7 @@ Sun, Mon, Tue, Wed, Thu, Fri, Sat }; -ap_status_t ap_gm_timestr_822(char **date_str, struct atime_t *t, ap_context_t *p) +ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e type, ap_context_t *p) { struct tm *tms; char *date_str_ptr; @@ -74,9 +74,7 @@ (*date_str) = ap_palloc(p, 48 * sizeof(char)); date_str_ptr = (*date_str); -if (t-time_ex == 0) { -ap_explode_time(t, APR_UTCTIME); -} +ap_explode_time(t, type); /* Assumption: this is always 3 */ /* i = strlen(ap_day_snames[tms-tm_wday]); */ @@ -107,10 +105,12 @@ *date_str_ptr++ = ':'; *date_str_ptr++ = t-explodedtime-tm_sec / 10 + '0'; *date_str_ptr++ = t-explodedtime-tm_sec % 10 + '0'; -*date_str_ptr++ = ' '; -*date_str_ptr++ = 'G'; -*date_str_ptr++ = 'M'; -*date_str_ptr++ = 'T'; +if (type == APR_UTCTIME) { +*date_str_ptr++ = ' '; +*date_str_ptr++ = 'G'; +*date_str_ptr++ = 'M'; +*date_str_ptr++ = 'T'; +} *date_str_ptr = '\0'; return APR_SUCCESS; /* RFC date format; as strftime '%a, %d %b %Y %T GMT' */ 1.44 +3 -3 apache-2.0/src/main/http_protocol.c Index: http_protocol.c === RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- http_protocol.c 1999/12/21 11:33:22 1.43 +++ http_protocol.c 1999/12/21 16:21:44 1.44 @@ -605,7 +605,7 @@ { ap_time_t *mod_time = ap_rationalize_mtime(r, r-mtime); char *datestr; -ap_gm_timestr_822(datestr, mod_time, r-pool); +ap_timestr(datestr, mod_time, APR_UTCTIME, r-pool); ap_table_setn(r-headers_out, Last-Modified, datestr); } @@ -1362,7 +1362,7 @@ ap_rvputs(r, protocol, , r-status_line, \015\012, NULL); -ap_gm_timestr_822(date, r-request_time, r-pool); +ap_timestr(date, r-request_time, APR_UTCTIME, r-pool); ap_send_header_field(r, Date, date); ap_send_header_field(r, Server, ap_get_server_version()); @@ -1645,7 +1645,7 @@ * some other part of the server configuration. */ if (r-no_cache !ap_table_get(r-headers_out, Expires)) { -ap_gm_timestr_822(date, r-request_time, r-pool); +ap_timestr(date, r-request_time, APR_UTCTIME, r-pool); ap_table_addn(r-headers_out, Expires, date); }
cvs commit: apache-1.3/src/os/tpf/samples linkdll.jcl
manoj 99/12/21 12:43:53 Modified:htdocs/manual install-tpf.html readme-tpf.html src/os/tpf/samples linkdll.jcl Log: Documentation update for latest TPF changes Submitted by: David McCreedy [EMAIL PROTECTED] Revision ChangesPath 1.9 +3 -6 apache-1.3/htdocs/manual/install-tpf.html Index: install-tpf.html === RCS file: /home/cvs/apache-1.3/htdocs/manual/install-tpf.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -u -r1.8 -r1.9 --- install-tpf.html 1999/09/01 04:28:51 1.8 +++ install-tpf.html 1999/12/21 20:43:48 1.9 @@ -73,11 +73,8 @@ ul littbpax -rvkf iopen_edition_filename.tar/i -o from=ISO8859-1,to=IBM-1047 */src/b/tt liswitch to the source code subdirectory of the newly extracted apache directory: ttbcd iapache-1.3/i/src/b/tt - liremove various subdirectories: ttbrm -r lib/expat-lite os/bs2000 os/os2 os/win32/b/tt - brBRfont color=red size=4TIP: /font - The quot;ttmake/ttquot; step (shown below) will fail if the - ttlib/expat-lite/tt directory is not removed. - br + liremove unnecessary subdirectories: + ttbrm -r os/bs2000 os/mpeix os/netware os/os2 os/os390 os/win32/b/tt /ul /ol br @@ -283,7 +280,7 @@ PRE ZINET ADD S-TFTP PGM-CTFT PORT-69 PROTOCOL-UDP MODEL-NOWAIT -ZINET ADD S-APACHE PGM-EM/EM MODEL-NOLISTEN PROTOCOL-TCP +ZINET ADD S-APACHE PGM-EM/EM MODEL-NOLISTEN or ZINET ADD S-APACHE PGM-EM/EM MODEL-DAEMON USER-root A HREF=#daemon(see notes above regarding the DAEMON model)/A/PRE Please refer to EMIBM Transaction Processing Facility Transmission Control Protocol/Internet Protocol Version 4 Release 1/EM for more information 1.7 +11 -6 apache-1.3/htdocs/manual/readme-tpf.html Index: readme-tpf.html === RCS file: /home/cvs/apache-1.3/htdocs/manual/readme-tpf.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -u -r1.6 -r1.7 --- readme-tpf.html 1999/09/01 04:28:52 1.6 +++ readme-tpf.html 1999/12/21 20:43:49 1.7 @@ -85,6 +85,7 @@ LImod_autoindex.c LImod_cern_meta.c LImod_cgi.c ismall(requires PUT10)/small/i + LImod_digest.c LImod_dir.c LImod_env.c LImod_example.c @@ -101,6 +102,7 @@ LImod_negotiation.c LIA HREF=http://hpwww.ec-lyon.fr/~vincent/apache/mod_put.html;mod_put.c/A i small(third party module)/small/i + LImod_proxy.c LImod_setenvif.c LImod_speling.c LImod_status.c @@ -110,6 +112,11 @@ LImod_usertrack.c LIos.c LIos-inline.c + LIproxy_cache.c + LIproxy_connect.c + LIproxy_ftp.c + LIproxy_http.c + LIproxy_util.c LIregular expression parser LIregular expression test tool ismall(requires PUT10)/small/i LIrfc1413.c @@ -120,8 +127,7 @@ LIutil_script.c LIutil_uri.c /UL/MULTICOL - bNotes:/b - A NAME=notes/A + A NAME=notes/AbNotes:/b ol liUse of mod_access directives quot;ttallow from/ttquot; amp; quot;ttdeny from/ttquot; with host inames/i (verses ip addresses) requires TPF version 4.1 PUT10 @@ -130,14 +136,13 @@ H3Components/modules not yet supported on TPF:/H3 - UL + multicol COLS=3UL LIhtdigest.c LIlib/expat-lite - LImod_digest.c + LImod_auth_digest.c LImod_rewrite.c LImod_vhost_alias.c - LIproxy server code - /UL + /UL/MULTICOL H3Components/modules that don't apply or that probably won't ever be available on TPF:/H3 1.4 +10 -0 apache-1.3/src/os/tpf/samples/linkdll.jcl Index: linkdll.jcl === RCS file: /home/cvs/apache-1.3/src/os/tpf/samples/linkdll.jcl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -u -r1.3 -r1.4 --- linkdll.jcl 1999/09/20 20:47:14 1.3 +++ linkdll.jcl 1999/12/21 20:43:52 1.4 @@ -82,6 +82,12 @@ //PLKED.OBJ51 DD PATH='/your-path-here/src/regex/regerror.o' //PLKED.OBJ52 DD PATH='/your-path-here/src/regex/regexec.o' //PLKED.OBJ53 DD PATH='/your-path-here/src/regex/regfree.o' +//PLKED.OBJ54 DD PATH='/your-path-here/src/lib/expat-lite/hashtable.\ +// o' +//PLKED.OBJ55 DD PATH='/your-path-here/src/lib/expat-lite/xmlparse.o\ +// ' +//PLKED.OBJ56 DD PATH='/your-path-here/src/lib/expat-lite/xmlrole.o' +//PLKED.OBJ57 DD PATH='/your-path-here/src/lib/expat-lite/xmltok.o' //PLKED.SYSIN DD * ORDER @@DLMHDR INCLUDE OBJLIB(CSTRTD40) @@ -138,6 +144,10 @@ INCLUDE OBJ51 INCLUDE OBJ52
cvs commit: apache-2.0/src/lib/apr/time/unix access.c
rbb 99/12/21 13:16:20 Modified:src/lib/apr acconfig.h aclocal.m4 configure.in src/lib/apr/include apr_time.h src/lib/apr/time/unix access.c Log: A couple of new functions for APR's time library. Revision ChangesPath 1.17 +2 -0 apache-2.0/src/lib/apr/acconfig.h Index: acconfig.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/acconfig.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- acconfig.h1999/12/06 15:47:42 1.16 +++ acconfig.h1999/12/21 21:16:14 1.17 @@ -44,6 +44,8 @@ #undef NEED_RLIM_T #undef USEBCOPY +#undef HAVE_GMTOFF + #undef SIZEOF_SSIZE_T @BOTTOM@ 1.7 +0 -1 apache-2.0/src/lib/apr/aclocal.m4 Index: aclocal.m4 === RCS file: /home/cvs/apache-2.0/src/lib/apr/aclocal.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- aclocal.m41999/11/13 00:07:04 1.6 +++ aclocal.m41999/12/21 21:16:17 1.7 @@ -161,4 +161,3 @@ undefine([AC_CV_NAME])dnl ]) - 1.37 +8 -0 apache-2.0/src/lib/apr/configure.in Index: configure.in === RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- configure.in 1999/12/19 18:09:59 1.36 +++ configure.in 1999/12/21 21:16:17 1.37 @@ -367,6 +367,14 @@ AC_SUBST(sys_typesh) AC_SUBST(sys_uioh) +AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, +[AC_TRY_COMPILE([#include sys/types.h +#include $ac_cv_struct_tm], [struct tm tm; tm.tm_gmtoff;], + ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) + +if test $ac_cv_struct_tm_gmtoff = yes; then +AC_DEFINE(HAVE_GMTOFF) +fi MAKEFILE1=Makefile lib/Makefile SUBDIRS=lib 1.6 +2 -0 apache-2.0/src/lib/apr/include/apr_time.h Index: apr_time.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apr_time.h1999/12/21 16:21:41 1.5 +++ apr_time.h1999/12/21 21:16:19 1.6 @@ -101,6 +101,8 @@ ap_status_t ap_set_wday(ap_time_t *, ap_int32_t); ap_status_t ap_timecmp(ap_time_t *a, ap_time_t *b); +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont); + ap_status_t ap_get_timedata(ap_time_t *, char *, void *); ap_status_t ap_set_timedata(ap_time_t *, void *, char *, ap_status_t (*cleanup) (void *)); 1.9 +37 -0 apache-2.0/src/lib/apr/time/unix/access.c Index: access.c === RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/access.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- access.c 1999/12/20 16:10:15 1.8 +++ access.c 1999/12/21 21:16:19 1.9 @@ -383,3 +383,40 @@ } } +#if defined(HAVE_GMTOFF) +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont) +{ +if (tt-currtime == NULL) { +tt-currtime = ap_pcalloc(cont, sizeof(struct timeval)); +} +tt-currtime-tv_sec = time(NULL); +tt-explodedtime = localtime(tt-currtime-tv_sec); +*tz = (int) (tt-explodedtime-tm_gmtoff / 60); +return APR_SUCCESS; +} +#else +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont) +{ +struct tm gmt; +int days, hours, minutes; + +if (tt-currtime == NULL) { +tt-currtime = ap_pcalloc(cont, sizeof(struct timeval)); +} +tt-currtime-tv_sec = time(NULL); + +/* Assume we are never more than 24 hours away. */ +/* remember gmtime/localtime return ptr to static */ +/* buffer... so be careful */ +gmt = *gmtime(tt-currtime-tv_sec); +tt-explodedtime = localtime(tt-currtime-tv_sec); +days = tt-explodedtime-tm_yday - gmt.tm_yday; +hours = ((days -1 ? 24 : 1 days ? -24 : days * 24) + + tt-explodedtime-tm_hour - gmt.tm_hour); +minutes = hours * 60 + tt-explodedtime-tm_min - gmt.tm_min; +*tz = minutes; +return APR_SUCCESS; +} +#endif + +
cvs commit: apache-2.0/src/modules/standard mod_log_config.c
rbb 99/12/21 13:41:55 Modified:src configure.in src/include httpd.h util_date.h src/main config.h.stub util.c util_date.c src/modules/standard mod_log_config.c Log: Remove a bunch of functions that are being replaced by functions in APR. Also finished porting Apache to use APR in most cases. Revision ChangesPath 1.14 +0 -1 apache-2.0/src/configure.in Index: configure.in === RCS file: /home/cvs/apache-2.0/src/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- configure.in 1999/12/20 05:03:01 1.13 +++ configure.in 1999/12/21 21:41:40 1.14 @@ -83,7 +83,6 @@ strerror \ initgroups \ waitpid \ -difftime \ gettimeofday \ memmove \ bzero \ 1.16 +0 -1 apache-2.0/src/include/httpd.h Index: httpd.h === RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- httpd.h 1999/12/20 16:38:32 1.15 +++ httpd.h 1999/12/21 21:41:43 1.16 @@ -914,7 +914,6 @@ */ /* Time */ -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz); API_EXPORT(char *) ap_get_time(void); API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype); API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t *t, const char *fmt, int gmt); 1.5 +0 -1 apache-2.0/src/include/util_date.h Index: util_date.h === RCS file: /home/cvs/apache-2.0/src/include/util_date.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- util_date.h 1999/12/20 16:38:33 1.4 +++ util_date.h 1999/12/21 21:41:43 1.5 @@ -76,7 +76,6 @@ #define BAD_DATE (time_t)0 API_EXPORT(int) ap_checkmask(const char *data, const char *mask); -API_EXPORT(time_t) ap_tm2sec(const struct tm *t); API_EXPORT(ap_time_t *) ap_parseHTTPdate(const char *date, ap_context_t *cont); #ifdef __cplusplus 1.4 +0 -3 apache-2.0/src/main/Attic/config.h.stub 1.21 +6 -43 apache-2.0/src/main/util.c Index: util.c === RCS file: /home/cvs/apache-2.0/src/main/util.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- util.c1999/12/20 16:38:35 1.20 +++ util.c1999/12/21 21:41:48 1.21 @@ -94,12 +94,13 @@ API_EXPORT(char *) ap_get_time() { -time_t t; -char *time_string; +ap_time_t *t = NULL; +char *time_string = NULL; -t = time(NULL); -time_string = ctime(t); -time_string[strlen(time_string) - 1] = '\0'; +ap_make_time(t, NULL); +ap_current_time(t); + +ap_timestr(time_string, t, APR_LOCALTIME, NULL); return (time_string); } @@ -174,37 +175,6 @@ return ap_pstrdup(p, ts); } -/* What a pain in the ass. */ -#if defined(HAVE_GMTOFF) -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz) -{ -time_t tt = time(NULL); -struct tm *t; - -t = localtime(tt); -*tz = (int) (t-tm_gmtoff / 60); -return t; -} -#else -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz) -{ -time_t tt = time(NULL); -struct tm gmt; -struct tm *t; -int days, hours, minutes; - -/* Assume we are never more than 24 hours away. */ -gmt = *gmtime(tt); /* remember gmtime/localtime return ptr to static */ -t = localtime(tt); /* buffer... so be careful */ -days = t-tm_yday - gmt.tm_yday; -hours = ((days -1 ? 24 : 1 days ? -24 : days * 24) - + t-tm_hour - gmt.tm_hour); -minutes = hours * 60 + t-tm_min - gmt.tm_min; -*tz = minutes; -return t; -} -#endif - /* Roy owes Rob beer. */ /* Rob owes Roy dinner. */ @@ -2044,13 +2014,6 @@ p = sys_errlist[err]; return (p); -} -#endif - -#ifndef HAVE_DIFFTIME -double difftime(time_t time1, time_t time0) -{ -return (time1 - time0); } #endif 1.7 +0 -42 apache-2.0/src/main/util_date.c Index: util_date.c === RCS file: /home/cvs/apache-2.0/src/main/util_date.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- util_date.c 1999/12/20 16:38:35 1.6 +++ util_date.c 1999/12/21 21:41:48 1.7 @@ -126,48 +126,6 @@ } /* - * tm2sec converts a GMT tm structure into the number of seconds since - * 1st January 1970 UT. Note that we ignore tm_wday, tm_yday, and tm_dst. - * - * The