summaryrefslogtreecommitdiff
path: root/time64.h
Commit message (Collapse)AuthorAgeFilesLines
* time64.[ch]: Inline only use of another macroKarl Williamson2020-03-181-6/+0
| | | | | | | | | | This macro is now only used once. It is accessible outside perl because it is in time64.h, but isn't used in cpan. Remove it and place its expansion in time64.c. Part of the expansion called another function. That function can be removed and the expansion simplified, since gmtime() is now automatically converted into gmtime_r() if available and needed.
* time64.[ch]: Inline only use of a macro and fcnKarl Williamson2020-03-181-8/+1
| | | | | | | | | This macro is now only used once, and was the only caller of a helper function. Thus both can be removed and inlined, simplifying things. Further, most of the function's functionality can be removed, since it was an attempt to simulate localtime_r(), which is now automatically furnished by reentrant.[ch] if needed.
* Use new paradigm for hdr file double inclusion guardKarl Williamson2017-06-021-2/+2
| | | | | | | | | | We changed to use symbols not likely to be used by non-Perl code that could conflict, and which have trailing underbars, so they don't look like a regular Perl #define. See https://rt.perl.org/Ticket/Display.html?id=131110 There are many more header files which are not guarded.
* (perl #128359) prevent a const-ness warning on CygwinTony Cook2016-06-211-1/+2
|
* Declaring static in header is odd (and warnable offense).Jarkko Hietaniemi2015-07-221-1/+0
|
* Add time64 as its own build target.Jarkko Hietaniemi2015-07-221-2/+2
|
* time64.h: On QNX, use const for tm_zoneBrian Fraser2014-01-231-3/+4
| | | | http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/t/tm.html
* time64.h: Declare tm_zone as const under Android, but not if using C++Brian Fraser2014-01-231-4/+6
| | | | https://android.googlesource.com/platform/bionic.git/+/master/libc/include/time.h
* Make time64 use NV for time_t, I32 for year, not Quad_t.Craig A. Berry2009-04-251-1/+1
| | | | | | | This means it should run on anything that does not have a 64-bit integer type available but does have a double. Presumably this includes platforms that define PERL_MICRO, so we now use the same extended time implementation for everything that runs Perl.
* Namespace clean-up for time64.Craig A. Berry2009-03-261-6/+6
| | | | | | | | | | | | | | | | | | | | All of the time64 functions are only visible within pp_sys.c and are not part of the public API, so make them all static and give them the S_ prefix. A side effect of this is that we now unambiguously use S_localtime64_r and S_gmtime64_r and should no longer collide with system-supplied versions, if any. One possible future direction is that if and when Configure detects any system-supplied *time64_r functions, their prototypes, and their valid time ranges, we could optionally select those instead of the home-grown ones. Another possible future direction is that we could s/S_/Perl_/ and make the *time64_r functions part of the public API in some post-5.10.x release. Currently they are only exposed to the outside world via Perl_pp_gmtime. Also gave some TRACE macros more specific names.
* Be sure to call L_R_TZSET before localtime_r()Rafael Garcia-Suarez2009-01-191-2/+2
|
* Not everybody (hardly anybody?) uses const for tm.tm_zone.Craig A. Berry2009-01-181-0/+4
| | | | This probably needs refinement, possibly a new Configure variable.
* consting goodness for time64Robin Barker2009-01-181-1/+1
|
* Update from y2038Michael G. Schwern2009-01-031-61/+22
| | | | | | | | | | | | Configuration information split out into its own header. Added files to MANIFEST Turn off USE_SYSTEM_GMTIME, ours is more reliable and possibly faster. Fix type warnings found on Windows. Remove unnecessary use of floor() and ceil().
* Remove the AIX work around code. Instead it should just set it's ↵Michael G. Schwern2009-01-031-3/+39
| | | | | | | | | | | | | | | | | LOCALTIME_MAX to 0x7fff573e. Update from y2038. Use the new TM64 struct so years can go out past y2**31 Defines a Year type to avoid converting years to ints. Remove the TIMGM work around code, using timegm64() is fine and it saves us from having to convert from TM to tm. Make functions private with static rather than the _foo convention. Even faster for distant dates.
* Rename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the ↵Michael G. Schwern2009-01-031-0/+65
file isn't about just localtime() anymore.