summaryrefslogtreecommitdiff
path: root/time/unix/time.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the typo.jorton2006-08-031-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-08-031-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement apr_file_mtime_set().bjh2005-07-161-0/+17
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@219295 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.jerenkrantz2005-02-041-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* * configure.in: Require autoconf 2.50. Use AC_CHECK_MEMBERS to checkjorton2005-01-131-12/+13
| | | | | | | | | | | | | | for struct tm members tm_gmtoff and __tm_gmtoff (the check for __tm_gmtoff seemed to be missing!). * time/unix/time.c: Define NO_GMTOFF_IN_STRUCT_TM if neither member is found. (get_offset, apr_os_exp_time_get, apr_os_exp_time_put): Use new macro names. (apr_unix_setup_time): Use NO_GMTOFF_IN_STRUCT_TM. * time/unix/timestr.c (apr_strftime): Use new macro names. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125058 13f79535-47bb-0310-9956-ffa450edef68
* * time/unix/time.c (apr_time_exp_get): Remove year check that failed forjorton2004-03-251-7/+2
| | | | | | | | | | | | | 2038, use apr_time_t to avoid overflow. * time/win32/time.c (apr_time_exp_get): ditto * test/testtime.c (test_2038): Add regression test. Submitted by: Philip Martin <philip@codematters.co.uk> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65026 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0jerenkrantz2004-02-131-49/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* remove these interfaces:trawick2003-09-031-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_compare_groups apr_compare_users apr_current_userid apr_explode_localtime apr_explode_time apr_filename_of_pathname apr_get_groupid apr_get_groupname apr_get_home_directory apr_get_userid apr_get_username apr_group_name_get apr_implode_gmt apr_lstat FNM_NOMATCH FNM_NOESCAPE FNM_PATHNAME FNM_PERIOD FNM_CASE_BLIND change the function args to this interface: apr_mmap_dup this function's args changed in a previous commit, so mention that in CHANGES apr_socket_create git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64607 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesthommay2003-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aix/dso.h -> -> aix/apr_arch_dso.h beos/dso.h -> beos/apr_arch_dso.h beos/proc_mutex.h -> beos/apr_arch_proc_mutex.h beos/thread_cond.h -> beos/apr_arch_thread_cond.h beos/thread_mutex.h -> beos/apr_arch_thread_mutex.h beos/threadproc.h -> beos/apr_arch_threadproc.h beos/thread_rwlock.h -> beos/apr_arch_thread_rwlock.h netware/dso.h -> -> netware/apr_arch_dso.h netware/fileio.h -> -> netware/apr_arch_fileio.h netware/global_mutex.h -> netware/apr_arch_global_mutex.h netware/internal_time.h -> netware/apr_arch_internal_time.h netware/networkio.h -> netware/apr_arch_networkio.h netware/pre_nw.h -> netware/apr_arch_pre_nw.h netware/proc_mutex.h -> netware/apr_arch_proc_mutex.h netware/thread_cond.h -> netware/apr_arch_thread_cond.h netware/thread_mutex.h -> netware/apr_arch_thread_mutex.h netware/threadproc.h -> netware/apr_arch_threadproc.h netware/thread_rwlock.h -> netware/apr_arch_thread_rwlock.h os2/dso.h -> os2/apr_arch_dso.h os2/fileio.h -> os2/apr_arch_fileio.h os2/networkio.h -> os2/apr_arch_networkio.h os2/os2calls.h -> os2/apr_arch_os2calls.h os2/proc_mutex.h -> os2/apr_arch_proc_mutex.h os2/thread_cond.h -> os2/apr_arch_thread_cond.h os2/thread_mutex.h -> os2/apr_arch_thread_mutex.h os2/threadproc.h -> os2/apr_arch_threadproc.h os2/thread_rwlock.h -> os2/apr_arch_thread_rwlock.h os390/dso.h -> os390/apr_arch_dso.h unix/dso.h -> unix/apr_arch_dso.h unix/fileio.h -> unix/apr_arch_fileio.h unix/global_mutex.h -> unix/apr_arch_global_mutex.h unix/inherit.h -> unix/apr_arch_inherit.h unix/internal_time.h -> unix/apr_arch_internal_time.h unix/misc.h -> unix/apr_arch_misc.h unix/networkio.h -> unix/apr_arch_networkio.h unix/proc_mutex.h -> unix/apr_arch_proc_mutex.h unix/shm.h -> unix/apr_arch_shm.h unix/thread_cond.h -> unix/apr_arch_thread_cond.h unix/thread_mutex.h -> unix/apr_arch_thread_mutex.h unix/threadproc.h -> unix/apr_arch_threadproc.h unix/thread_rwlock.h -> unix/apr_arch_thread_rwlock.h win32/atime.h -> win32/apr_arch_atime.h win32/dso.h -> win32/apr_arch_dso.h win32/fileio.h -> win32/apr_arch_fileio.h win32/inherit.h -> win32/apr_arch_inherit.h win32/misc.h -> win32/apr_arch_misc.h win32/networkio.h -> win32/apr_arch_networkio.h win32/proc_mutex.h -> win32/apr_arch_proc_mutex.h win32/thread_cond.h -> win32/apr_arch_thread_cond.h win32/thread_mutex.h -> win32/apr_arch_thread_mutex.h win32/threadproc.h -> win32/apr_arch_threadproc.h win32/thread_rwlock.h -> win32/apr_arch_thread_rwlock.h win32/utf8.h -> win32/apr_arch_utf8.h git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64271 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.thommay2003-01-011-1/+1
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* *) Renames done (deprecated functions wrapped):thommay2002-11-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_filename_of_pathname -> apr_filepath_name_get apr_get_groupid -> apr_gid_get apr_get_groupname -> apr_gid_name_get apr_compare_groups -> apr_gid_compare apr_parse_addr_port -> apr_port_addr_parse apr_shutdown -> apr_socket_shutdown apr_bind -> apr_socket_bind apr_listen -> apr_socket_listen apr_accept -> apr_socket_accept apr_connect -> apr_socket_connect apr_send -> apr_socket_send apr_sendv -> apr_socket_sendv apr_sendto -> apr_socket_sendto apr_implode_gmt -> apr_time_exp_gmt_get apr_get_home_directory -> apr_uid_homepath_get apr_get_userid -> apr_uid_get apr_current_userid -> apr_uid_current apr_compare_users -> apr_uid_compare apr_get_username -> apr_uid_name_get apr_recvfrom -> apr_socket_recvfrom apr_sendfile -> apr_socket_sendfile apr_recv -> apr_socket_recv git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64043 13f79535-47bb-0310-9956-ffa450edef68
* Time in exact ms intervals can be very useful in benchmarking... thiswrowe2002-08-041-0/+6
| | | | | | | | | patch defines a general API for doing so if the platform supports toggling the clock resolution. Don't recommend doing so for HTTPD, but flood and ab should appreciate it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63792 13f79535-47bb-0310-9956-ffa450edef68
* Revert bogusness by providing proper stubs for functions that existedwrowe2002-06-081-0/+15
| | | | | | | | | | | | | since the first indirect APR release [APACHE_2_0_35]. Fortunately, these appear to be the only bogusness detected between _35 and _36, and _37 must follow suit with stubs for newly deprecated symbols. Of course all stubs fall out with 1.0.0, which I picture Apache adopting with stronger version controls in APACHE_2_1_x, but we will see what concensus each project adopts between now and then. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63475 13f79535-47bb-0310-9956-ffa450edef68
* Per rename_pendings, rename apr_explode_time to apr_time_exp_tz.jerenkrantz2002-04-151-4/+4
| | | | | | | | | | (Justin made a few whitespace corrections.) Submitted by: Thom May <thom@planetarytramp.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63264 13f79535-47bb-0310-9956-ffa450edef68
* Rename apr_explode_localtime to apr_time_exp_lt.striker2002-04-131-1/+1
| | | | | | | Submitted by: Thom May <thom@planetarytramp.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63256 13f79535-47bb-0310-9956-ffa450edef68
* Fix some daylight savings time breakage on (at least) AIX,trawick2002-04-081-1/+1
| | | | | | | | | | | | | | Solaris, and HP-UX. It still seems to work fine on Linux and FreeBSD :) When we calculated server_gmt_offset at startup, we left it vague about whether or not the GMT time passed to mktime() was in d.s.t. mode. Since it is GMT it clearly is not d.s.t. Apparently libc was trying to be clever and figuring out whether or not it was d.s.t. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63230 13f79535-47bb-0310-9956-ffa450edef68
* Style Polices moved through quickly. Surely not all offenders werestriker2002-03-211-12/+20
| | | | | | | caught ;) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63176 13f79535-47bb-0310-9956-ffa450edef68
* Rename apr_explode_gmt to apr_time_exp_gmt.striker2002-03-211-3/+4
| | | | | | | Submitted by: Thom May <thom@planetarytramp.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63175 13f79535-47bb-0310-9956-ffa450edef68
* Rename apr_implode_time to apr_time_exp_get.striker2002-03-171-2/+2
| | | | | | | Submitted by: Thom May <thom@planetarytramp.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63147 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.fielding2002-03-131-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* patches for apr to rename apr_ansi_time_to_apr_time andianh2002-03-061-9/+9
| | | | | | | | | | | | apr_exploded_time_t. PR: Obtained from: Submitted by: Thom May <thom@planetarytramp.org> Reviewed by: Ian Holsman git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63090 13f79535-47bb-0310-9956-ffa450edef68
* Removed the special implementation of the apr_time_now() API since webnicholes2002-03-051-8/+1
| | | | | | | | now have gettimeofday() on NetWare. Also added a redefinition of the timezone macro. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63080 13f79535-47bb-0310-9956-ffa450edef68
* Fix GMT offset calculations for platforms that do not have native GMTjerenkrantz2002-01-101-3/+4
| | | | | | | | | offsets. Submitted by: Jon Travis <jtravis@covalent.net> Reviewed by: Justin, Brian, David git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62744 13f79535-47bb-0310-9956-ffa450edef68
* Fixing up a linker issue since NetWare does not have a gettimeofday() functionbnicholes2002-01-021-6/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62696 13f79535-47bb-0310-9956-ffa450edef68
* Added an initialization routine for NetWare and daylight savings handlingbnicholes2001-11-051-1/+18
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62490 13f79535-47bb-0310-9956-ffa450edef68
* Adjusted to deal with microsecondsbnicholes2001-11-021-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62486 13f79535-47bb-0310-9956-ffa450edef68
* Added the NetWare delay() call to apr_sleep()bnicholes2001-10-291-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62476 13f79535-47bb-0310-9956-ffa450edef68
* Allowed NetWare to take advantage of the system timezone variablebnicholes2001-10-091-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62410 13f79535-47bb-0310-9956-ffa450edef68
* include the prototype for apr_unix_setup_time() in the filetrawick2001-08-311-0/+3
| | | | | | | | that defines apr_unix_setup_time() to ensure consistency (and to eliminate a gcc warning to that effect) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62265 13f79535-47bb-0310-9956-ffa450edef68
* On platforms where neither HAVE_GMTOFF nor HAVE___OFFSET is defined,jerenkrantz2001-08-311-23/+52
| | | | | | | | | | | | | | | | | | | | | | | | like Solaris, the function "get_offset" in apr/time/unix/time.c is a bottleneck in time formatting. On these platforms, get_offset ignores its argument; it really computes the server's offset from GMT, normalized so that it's independent of daylight savings. Here's a new version of the get_offset patch that initializes the TZ offset from apr_initialize. I've attached the new include file that it uses, apr/include/arch/unix/internal_time.h -- Justin added the missing call to apr_initialize in testtime.c so that testtime works on Solaris and produces the "right" output. Submitted by: Brian Pane <bpane@pacbell.net> Reviewed by: Justin Erenkrantz, Roy Fielding git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62262 13f79535-47bb-0310-9956-ffa450edef68
* Wrap all APR functions in APR_DECLARE macro.rbb2001-08-101-17/+19
| | | | | | | Submitted by: Sterling Hughes <sterling@designmultimedia.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62139 13f79535-47bb-0310-9956-ffa450edef68
* Ported the apr_time_now() function to support the NetWare OSbnicholes2001-08-021-0/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62087 13f79535-47bb-0310-9956-ffa450edef68
* Adjust the calculated GMT offset on get_offset() for daylight savings time.brane2001-07-011-2/+12
| | | | | | | | This only affects platforms that do not have a tm_gmtoff field in struct tm (e.g., Solaris 2.6, HP-UX 10.20, ...). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61843 13f79535-47bb-0310-9956-ffa450edef68
* Added new function apr_implode_gmt, which works like apr_implode_time, exceptbrane2001-06-301-0/+8
| | | | | | | | | | | that it always produces an apr_time_t that represents GMT. * include/apr_time.h (apr_implode_gmt): New function. * time/unix/time.c, time/win32/time.c: Implement it. * test/testtime.c: Test it. The test is analogous to the apr_implode_time test. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61832 13f79535-47bb-0310-9956-ffa450edef68
* fix some compile breakage (on HP-UX, at least)... testtime is happy ontrawick2001-06-291-8/+8
| | | | | | | HP-UX so hopefully the libc routines are called correctly git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61827 13f79535-47bb-0310-9956-ffa450edef68
* Update the time code to make it clearer what's going on and todreid2001-06-291-29/+35
| | | | | | | | | | | correctly set the gmtoffset when we have it. Add a comment to try and it more obvious what's going on following discussion on the list. Update the time test to be more obvious and use the new test functions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61824 13f79535-47bb-0310-9956-ffa450edef68
* Cleaned up the code a bit and refactored common functionality.brane2001-06-281-35/+31
| | | | | | | | | | | | | | | (set_xt_gmtoff_from_tm): Check APR_HAS_THREADS and _POSIX_THREAD_SAFE_FUNCTIIONS, like elsewhere. (explode_time): New function. Contans most of the logic that was previowsly in tm_to_exp, apr_explode_time and apr_explode_localtime. (apr_explode_time and, apr_explode_localtime): Call explode_time. (tm_to_exp): Removed. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61813 13f79535-47bb-0310-9956-ffa450edef68
* apr_explode_localtime was not setting result's tm_usec field.brane2001-06-281-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61810 13f79535-47bb-0310-9956-ffa450edef68
* Solaris doesn't have (struct tm *)->tm_gmtoff, so the server logstrawick2001-06-221-13/+4
| | | | | | | | | | | | | | | | | | | | | were written in GMT regardess of the system timezone. (The well-known Solaris headache) The Solaris-kludge did exist and worked in 2.0.16 of srclib/apr/time/unix/time.c:apr_explode_localtime(), but the code was moved from apr_explode_localtime() to set_xt_gmtoff_from_tm() around version 1.38. So the attached patch will use tm_to_exp() (which calls set_xt_gmtoff_from_tm()) in apr_explode_localtime(), which fixed the problem. PR: 7902 Submitted by: Taketo Kabe <kabe@sra-tohoku.co.jp> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61793 13f79535-47bb-0310-9956-ffa450edef68
* help OS/390 recover from its post-Hackathon hangovergregames2001-04-191-0/+2
| | | | | | | | (don't use try to use tm_gmtoff if it doesn't exist, and neither does _POSIX_THREAD_SAFE_FUNCTIONS) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61542 13f79535-47bb-0310-9956-ffa450edef68
* Fix OS/2 build where we have no gmtime_r (or an *_r's for that matter) orbjh2001-04-171-1/+10
| | | | | | | tm_gmtoff. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61524 13f79535-47bb-0310-9956-ffa450edef68
* Fix detection of tm_gmtoff in struct tm, and remove some warnings.rbb2001-04-141-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61522 13f79535-47bb-0310-9956-ffa450edef68
* Daniel Padwa <daniel.padwa@gs.com> pointed out the last patch brokedreid2001-04-121-2/+6
| | | | | | | | | | | | the build on Solaris, so this patch is an attempt to get it building again. The eventual solution will be more general access functions for getting/setting the timezone from the different structures. I've made a partial start at it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61519 13f79535-47bb-0310-9956-ffa450edef68
* Some adjustments to the time code that gets us working better with timezones.dreid2001-04-121-68/+53
| | | | | | | Also change the beos sleep to use snooze instead of select. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61515 13f79535-47bb-0310-9956-ffa450edef68
* Fix the hosed #ifdef APR_HAVE_FOO_H tests, the #if HAVE_ tests, andwrowe2001-02-251-3/+3
| | | | | | | also cleanup s/#ifdef HAVE_FOO_H/#if APR_HAVE_FOO_H/ whrere appropriate. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61303 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001fielding2001-02-161-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61235 13f79535-47bb-0310-9956-ffa450edef68
* s/pupt/put/g typodougm2001-02-081-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61195 13f79535-47bb-0310-9956-ffa450edef68
* renaming various functions for consistency sakedougm2001-02-081-5/+5
| | | | | | | | | | | see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61194 13f79535-47bb-0310-9956-ffa450edef68
* OS2 was chasing os2errno.h which we hid in a private platform directory,wrowe2001-01-281-4/+0
| | | | | | | | | | | | but apr_errno.h is public. It also called in <os.h> with possibly inappropriate headers, and if os2.h follows any other header's usual conventions, calling it the second time for more declarations can be dicey. Relocated <os2.h> into apr.h.in (accessable to all, since it's later leveraged by most), which simplifies a bunch of code, and relocate all of the os2errno values into apr_errno.h for APR_STATUS_IS_FOO tests. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61156 13f79535-47bb-0310-9956-ffa450edef68
* Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...wrowe2000-08-061-24/+26
| | | | | | | | | | | | | see src/lib/apr/apr_compat.h for most details. Also a few minor nits to get Win32 to build. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60481 13f79535-47bb-0310-9956-ffa450edef68