Hi, I've been working through the renames_pending file in apr, and these are the patches for apr and apr-utils to renames apr_ansi_time_to_apr_time and apr_exploded_time_t. I have attached them rather than inlining. I have a similar patch for httpd-2.0 which I have sent to [EMAIL PROTECTED] Cheers, -Thom
Index: file_io/netware/filestat.c =================================================================== RCS file: /home/cvspublic/apr/file_io/netware/filestat.c,v retrieving revision 1.3 diff -u -u -3 -r1.3 filestat.c --- file_io/netware/filestat.c 5 Mar 2002 22:08:39 -0000 1.3 +++ file_io/netware/filestat.c 6 Mar 2002 11:53:15 -0000 @@ -95,9 +95,9 @@ finfo->inode = info->st_ino; finfo->device = info->st_dev; finfo->nlink = info->st_nlink; - apr_ansi_time_to_apr_time(&finfo->atime, info->st_atime); - apr_ansi_time_to_apr_time(&finfo->mtime, info->st_mtime); - apr_ansi_time_to_apr_time(&finfo->ctime, info->st_ctime); + apr_time_ansi_put(&finfo->atime, info->st_atime); + apr_time_ansi_put(&finfo->mtime, info->st_mtime); + apr_time_ansi_put(&finfo->ctime, info->st_ctime); /* ### needs to be revisited * if (wanted & APR_FINFO_CSIZE) { * finfo->csize = info->st_blocks * 512; Index: file_io/unix/filestat.c =================================================================== RCS file: /home/cvspublic/apr/file_io/unix/filestat.c,v retrieving revision 1.51 diff -u -u -3 -r1.51 filestat.c --- file_io/unix/filestat.c 22 Feb 2002 20:04:21 -0000 1.51 +++ file_io/unix/filestat.c 6 Mar 2002 11:53:16 -0000 @@ -94,9 +94,9 @@ finfo->inode = info->st_ino; finfo->device = info->st_dev; finfo->nlink = info->st_nlink; - apr_ansi_time_to_apr_time(&finfo->atime, info->st_atime); - apr_ansi_time_to_apr_time(&finfo->mtime, info->st_mtime); - apr_ansi_time_to_apr_time(&finfo->ctime, info->st_ctime); + apr_time_ansi_put(&finfo->atime, info->st_atime); + apr_time_ansi_put(&finfo->mtime, info->st_mtime); + apr_time_ansi_put(&finfo->ctime, info->st_ctime); /* ### needs to be revisited * if (wanted & APR_FINFO_CSIZE) { * finfo->csize = info->st_blocks * 512; Index: include/apr_compat.h =================================================================== RCS file: /home/cvspublic/apr/include/apr_compat.h,v retrieving revision 1.10 diff -u -u -3 -r1.10 apr_compat.h --- include/apr_compat.h 16 Sep 2001 21:11:11 -0000 1.10 +++ include/apr_compat.h 6 Mar 2002 11:53:17 -0000 @@ -60,8 +60,8 @@ #define ap_day_snames apr_day_snames /** @deprecated @see apr_pool_destroy */ #define ap_destroy_pool apr_pool_destroy -/** @deprecated @see apr_exploded_time_t */ -#define ap_exploded_time_t apr_exploded_time_t +/** @deprecated @see apr_time_exp_t */ +#define ap_exploded_time_t apr_time_exp_t /** @deprecated @see apr_fnmatch */ #define ap_fnmatch apr_fnmatch /** @deprecated @see apr_getopt */ Index: include/apr_portable.h =================================================================== RCS file: /home/cvspublic/apr/include/apr_portable.h,v retrieving revision 1.73 diff -u -u -3 -r1.73 apr_portable.h --- include/apr_portable.h 25 Jan 2002 07:12:37 -0000 1.73 +++ include/apr_portable.h 6 Mar 2002 11:53:24 -0000 @@ -276,7 +276,7 @@ * @param aprtime the time to convert */ APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime, - apr_exploded_time_t *aprtime); + apr_time_exp_t *aprtime); /** * Get the imploded time in the platforms native format. @@ -433,7 +433,7 @@ * @param ostime the time to convert * @param cont the pool to use if necessary */ -APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_exploded_time_t *aprtime, +APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont); Index: include/apr_time.h =================================================================== RCS file: /home/cvspublic/apr/include/apr_time.h,v retrieving revision 1.43 diff -u -u -3 -r1.43 apr_time.h --- include/apr_time.h 15 Feb 2002 21:15:44 -0000 1.43 +++ include/apr_time.h 6 Mar 2002 11:53:25 -0000 @@ -106,9 +106,9 @@ * - tm_usec isn't an ANSI field * - tm_gmtoff isn't an ANSI field (it's a bsdism) */ -typedef struct apr_exploded_time_t apr_exploded_time_t; +typedef struct apr_time_exp_t apr_time_exp_t; -struct apr_exploded_time_t { +struct apr_time_exp_t { /** microseconds past tm_sec */ apr_int32_t tm_usec; /** (0-61) seconds past tm_min */ @@ -138,7 +138,7 @@ * @param result the resulting apr_time_t * @param input the time_t to convert */ -APR_DECLARE(apr_status_t) apr_ansi_time_to_apr_time(apr_time_t *result, +APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result, time_t input); /** @@ -149,7 +149,7 @@ * @param offs the number of seconds offset to apply * @param zone the zone description */ -APR_DECLARE(apr_status_t) apr_explode_time(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_time(apr_time_exp_t *result, apr_time_t input, apr_int32_t offs); @@ -158,7 +158,7 @@ * @param result the exploded time * @param input the time to explode */ -APR_DECLARE(apr_status_t) apr_explode_gmt(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_gmt(apr_time_exp_t *result, apr_time_t input); /** @@ -166,7 +166,7 @@ * @param result the exploded time * @param input the time to explode */ -APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_localtime(apr_time_exp_t *result, apr_time_t input); /** @@ -176,7 +176,7 @@ * @param input the input exploded time */ APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *result, - apr_exploded_time_t *input); + apr_time_exp_t *input); /** * Convert time value from human readable format to a numeric apr_time_t that @@ -185,7 +185,7 @@ * @param input the input exploded time */ APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *result, - apr_exploded_time_t *input); + apr_time_exp_t *input); /** * Sleep for the specified number of micro-seconds. @@ -230,7 +230,7 @@ */ APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, const char *format, - apr_exploded_time_t *tm); + apr_time_exp_t *tm); #ifdef __cplusplus } Index: test/testtime.c =================================================================== RCS file: /home/cvspublic/apr/test/testtime.c,v retrieving revision 1.26 diff -u -u -3 -r1.26 testtime.c --- test/testtime.c 31 Aug 2001 06:07:34 -0000 1.26 +++ test/testtime.c 6 Mar 2002 11:53:28 -0000 @@ -65,7 +65,7 @@ int main(void) { apr_time_t now; - apr_exploded_time_t xt, xt2; + apr_time_exp_t xt, xt2; apr_time_t imp; apr_pool_t *p; char *str, *str2; Index: time/unix/time.c =================================================================== RCS file: /home/cvspublic/apr/time/unix/time.c,v retrieving revision 1.60 diff -u -u -3 -r1.60 time.c --- time/unix/time.c 5 Mar 2002 19:43:35 -0000 1.60 +++ time/unix/time.c 6 Mar 2002 11:53:31 -0000 @@ -100,7 +100,7 @@ #endif } -APR_DECLARE(apr_status_t) apr_ansi_time_to_apr_time(apr_time_t *result, +APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result, time_t input) { *result = (apr_time_t)input * APR_USEC_PER_SEC; @@ -115,7 +115,7 @@ return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec; } -static void explode_time(apr_exploded_time_t *xt, apr_time_t t, +static void explode_time(apr_time_exp_t *xt, apr_time_t t, apr_int32_t offset, int use_localtime) { struct tm tm; @@ -146,7 +146,7 @@ xt->tm_gmtoff = get_offset(&tm); } -APR_DECLARE(apr_status_t) apr_explode_time(apr_exploded_time_t *result, apr_time_t input, +APR_DECLARE(apr_status_t) apr_explode_time(apr_time_exp_t *result, apr_time_t input, apr_int32_t offs) { explode_time(result, input, offs, 0); @@ -154,12 +154,12 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input) +APR_DECLARE(apr_status_t) apr_explode_gmt(apr_time_exp_t *result, apr_time_t input) { return apr_explode_time(result, input, 0); } -APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input) +APR_DECLARE(apr_status_t) apr_explode_localtime(apr_time_exp_t *result, apr_time_t input) { #if defined(__EMX__) /* EMX gcc (OS/2) has a timezone global we can use */ @@ -170,7 +170,7 @@ #endif /* __EMX__ */ } -APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt) +APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *t, apr_time_exp_t *xt) { int year; time_t days; @@ -201,7 +201,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *t, apr_exploded_time_t *xt) +APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *t, apr_time_exp_t *xt) { apr_status_t status = apr_implode_time(t, xt); if (status == APR_SUCCESS) @@ -218,7 +218,7 @@ } APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime, - apr_exploded_time_t *aprtime) + apr_time_exp_t *aprtime) { (*ostime)->tm_sec = aprtime->tm_sec; (*ostime)->tm_min = aprtime->tm_min; @@ -244,7 +244,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_exploded_time_t *aprtime, +APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont) { aprtime->tm_sec = (*ostime)->tm_sec; Index: time/unix/timestr.c =================================================================== RCS file: /home/cvspublic/apr/time/unix/timestr.c,v retrieving revision 1.23 diff -u -u -3 -r1.23 timestr.c --- time/unix/timestr.c 12 Apr 2001 22:44:42 -0000 1.23 +++ time/unix/timestr.c 6 Mar 2002 11:53:32 -0000 @@ -79,7 +79,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t) { - apr_exploded_time_t xt; + apr_time_exp_t xt; const char *s; int real_year; @@ -127,7 +127,7 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t) { - apr_exploded_time_t xt; + apr_time_exp_t xt; const char *s; int real_year; @@ -168,7 +168,7 @@ } apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, - const char *format, apr_exploded_time_t *xt) + const char *format, apr_time_exp_t *xt) { struct tm tm; memset(&tm, 0, sizeof tm); Index: time/win32/time.c =================================================================== RCS file: /home/cvspublic/apr/time/win32/time.c,v retrieving revision 1.26 diff -u -u -3 -r1.26 time.c --- time/win32/time.c 12 Feb 2002 21:59:01 -0000 1.26 +++ time/win32/time.c 6 Mar 2002 11:53:32 -0000 @@ -71,7 +71,7 @@ */ #define IsLeapYear(y) ((!(y % 4)) ? (((!(y % 400)) && (y % 100)) ? 1 : 0) : 0) -static void SystemTimeToAprExpTime(apr_exploded_time_t *xt, SYSTEMTIME *tm, BOOL lt) +static void SystemTimeToAprExpTime(apr_time_exp_t *xt, SYSTEMTIME *tm, BOOL lt) { TIME_ZONE_INFORMATION tz; DWORD rc; @@ -123,7 +123,7 @@ return; } -APR_DECLARE(apr_status_t) apr_ansi_time_to_apr_time(apr_time_t *result, +APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result, time_t input) { *result = (apr_time_t) input * APR_USEC_PER_SEC; @@ -146,7 +146,7 @@ return aprtime; } -APR_DECLARE(apr_status_t) apr_explode_gmt(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_gmt(apr_time_exp_t *result, apr_time_t input) { FILETIME ft; @@ -158,7 +158,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_explode_time(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_time(apr_time_exp_t *result, apr_time_t input, apr_int32_t offs) { FILETIME ft; @@ -171,7 +171,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result, +APR_DECLARE(apr_status_t) apr_explode_localtime(apr_time_exp_t *result, apr_time_t input) { SYSTEMTIME st; @@ -186,7 +186,7 @@ } APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *t, - apr_exploded_time_t *xt) + apr_time_exp_t *xt) { int year; time_t days; @@ -221,7 +221,7 @@ } APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *t, - apr_exploded_time_t *xt) + apr_time_exp_t *xt) { apr_status_t status = apr_implode_time(t, xt); if (status == APR_SUCCESS) @@ -238,7 +238,7 @@ } APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime, - apr_exploded_time_t *aprexptime) + apr_time_exp_t *aprexptime) { (*ostime)->wYear = aprexptime->tm_year + 1900; (*ostime)->wMonth = aprexptime->tm_mon + 1; @@ -261,7 +261,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_exploded_time_t *aprtime, +APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont) { Index: time/win32/timestr.c =================================================================== RCS file: /home/cvspublic/apr/time/win32/timestr.c,v retrieving revision 1.15 diff -u -u -3 -r1.15 timestr.c --- time/win32/timestr.c 29 Jan 2002 06:50:50 -0000 1.15 +++ time/win32/timestr.c 6 Mar 2002 11:53:33 -0000 @@ -67,7 +67,7 @@ APR_DECLARE(apr_status_t) apr_rfc822_date(char *date_str, apr_time_t t) { - apr_exploded_time_t xt; + apr_time_exp_t xt; const char *s; int real_year; @@ -115,7 +115,7 @@ APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t) { - apr_exploded_time_t xt; + apr_time_exp_t xt; const char *s; int real_year; @@ -220,7 +220,7 @@ APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, const char *format, - apr_exploded_time_t *xt) + apr_time_exp_t *xt) { struct tm tm; memset(&tm, 0, sizeof tm);
Index: misc/apr_date.c =================================================================== RCS file: /home/cvspublic/apr-util/misc/apr_date.c,v retrieving revision 1.8 diff -u -u -3 -r1.8 apr_date.c --- misc/apr_date.c 19 Jan 2002 12:40:03 -0000 1.8 +++ misc/apr_date.c 6 Mar 2002 11:54:36 -0000 @@ -186,7 +186,7 @@ */ APU_DECLARE(apr_time_t) apr_date_parse_http(const char *date) { - apr_exploded_time_t ds; + apr_time_exp_t ds; apr_time_t result; int mint, mon; const char *monstr, *timstr; @@ -345,7 +345,7 @@ */ APU_DECLARE(apr_time_t) apr_date_parse_rfc(char *date) { - apr_exploded_time_t ds; + apr_time_exp_t ds; apr_time_t result; int mint, mon; char *monstr, *timstr, *gmtstr;