about summary refs log tree commit diff
path: root/time
Commit message (Collapse)AuthorAgeFilesLines
* Clean up trivially redundant __USE_MISC conditionals.Joseph Myers2014-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up cases of __USE_MISC that are trivially redundant after the recent substitution of __USE_MISC for __USE_BSD and __USE_SVID: either in constructs such as "defined __USE_MISC || defined __USE_MISC", or else (in the bits/mman.h case) a conditional on __USE_MISC nested inside another __USE_MISC conditional. (The cleanups remaining after this patch are still quite large, but it seems a reasonable piece to separate out.) Tested x86_64. * bits/mman.h [__USE_MISC]: Remove redundant conditionals. * ctype/ctype.h [__USE_MISC]: Likewise. * dirent/dirent.h [__USE_MISC]: Likewise. * grp/grp.h [__USE_MISC]: Likewise. * io/fcntl.h [__USE_MISC]: Likewise. * io/sys/stat.h [__USE_MISC]: Likewise. * libio/stdio.h [__USE_MISC]: Likewise. * posix/unistd.h [__USE_MISC]: Likewise. * pwd/pwd.h [__USE_MISC]: Likewise. * stdlib.h [__USE_MISC]: Likewise. * string/bits/string2.h [__USE_MISC]: Likewise. * string/string.h [__USE_MISC]: Likewise. * time/time.h [__USE_MISC]: Likewise.
* Combine __USE_BSD and __USE_SVID into __USE_MISC.Joseph Myers2014-02-122-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up following the obsoletion of _BSD_SOURCE and _SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC. The only non-mechanical part of this patch is the changes to features.h; everything else is simple substitution of __USE_MISC for the old macros. Thus, this patch leaves obviously redundant conditionals such as "defined __USE_MISC || defined __USE_MISC", and does not update #endif comments where they referred to BSD or SVID in words instead of the literal macro name. This is intended to facilitate patch review by separating the less mechanical changes from these purely mechanical changes into a separate patch. (I do intend to integrate all the changes from <https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I believe includes all the trailing comment updates, in subsequent patches.) Tested x86_64. * include/features.h (__USE_BSD): Remove macro definitions. (__USE_SVID): Likewise. (_BSD_SOURCE): Likewise. (_SVID_SOURCE): Likewise. [!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition from definition of _DEFAULT_SOURCE. [_BSD_SOURCE || _SVID_SOURCE]: Change condition to [_DEFAULT_SOURCE]. * bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC]. * bits/mman.h [__USE_BSD]: Likewise. * bits/termios.h [__USE_BSD]: Likewise. * bits/waitstatus.h [__USE_BSD]: Likewise. * ctype/ctype.h [__USE_SVID]: Likewise. * dirent/dirent.h [__USE_BSD]: Likewise. * grp/grp.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * inet/netinet/igmp.h [__USE_BSD]: Likewise. * io/fcntl.h [__USE_BSD]: Likewise. * io/ftw.h [__USE_BSD]: Likewise. * io/sys/stat.h [__USE_BSD]: Likewise. * libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise. * libio/bits/stdio2.h [__USE_BSD]: Likewise. * libio/stdio.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * math/math.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise. * misc/bits/syslog.h [__USE_BSD]: Likewise. * misc/search.h [__USE_SVID]: Likewise. * misc/sys/mman.h [__USE_BSD]: Likewise. * misc/sys/syslog.h [__USE_BSD]: Likewise. * misc/sys/uio.h [__USE_BSD]: Likewise. * posix/bits/unistd.h [__USE_BSD]: Likewise. * posix/glob.h [__USE_BSD]: Likewise. * posix/regex.h [__USE_BSD]: Likewise. * posix/sys/types.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/sys/utsname.h [__USE_SVID]: Likewise. * posix/sys/wait.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/unistd.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * pwd/pwd.h [__USE_SVID]: Likewise. * resolv/netdb.h [__USE_BSD]: Likewise. * setjmp/setjmp.h [__USE_BSD]: Likewise. * signal/signal.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * socket/sys/socket.h [__USE_BSD]: Likewise. * stdlib/fmtmsg.h [__USE_SVID]: Likewise. * stdlib/stdlib.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string2.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string3.h [__USE_BSD]: Likewise. * string/endian.h [__USE_BSD]: Likewise. * string/string.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * string/strings.h [__USE_BSD]: Likewise. * sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise. * sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/x86/bits/string.h [__USE_BSD]: Likewise. * sysvipc/sys/ipc.h [__USE_SVID]: Likewise. * termios/termios.h [__USE_BSD]: Likewise. * time/sys/time.h [__USE_BSD]: Likewise. * time/time.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change condition to [__USE_MISC].
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-103-25/+25
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0140-40/+40
|
* Support TZ transition times < 00:00:00.Paul Eggert2013-12-171-2/+5
| | | | | | | | | | This is needed for version-3 tz-format files; it supports time stamps past 2037 for America/Godthab (the only entry in the tz database for which this change is relevant). * manual/time.texi (TZ Variable): Document transition times from -167:59:59 through -00:00:01. * time/tzset.c (tz_rule): Time of day is now signed. (__tzset_parse_tz): Parse negative time of day.
* Allow strptime read outputs from strftime. Fixes bug 4772.Ondřej Bílka2013-12-042-11/+10
|
* Make strptime %Z consistent between doc and code. Fixes bug 14876Ondřej Bílka2013-10-252-1/+6
|
* Replace alloca in __tzfile_read by malloc. Fixes bug 15670Ondřej Bílka2013-10-201-18/+8
|
* Use (void) in no-arguments function definitions.Joseph Myers2013-06-082-2/+2
|
* Avoid use of "register" as optimization hint.Joseph Myers2013-06-073-7/+7
|
* Properly handle %W in strptimeAndreas Schwab2013-06-052-2/+3
|
* Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold2013-05-162-0/+2
|
* Consistently use ISSPACE to check for whitespaceSiddhesh Poyarekar2013-04-233-3/+46
| | | | | | | | Resolves #14888. This only really manifests itself when there are no spaces between format specifiers, which is not allowed by POSIX, but is allowed by the glibc implementation.
* Accept leading and trailing spaces in getdate input stringSiddhesh Poyarekar2013-04-102-0/+46
| | | | | | | | | | Fixes #15346. The POSIX description of getdate allows for extra spaces in the getdate input string. __getdate_r uses strptime internally, which works fine with extra spaces between format strings (and hence within an input string) but not with leading and trailing spaces. So we trim off the leading and trailing spaces before we pass it on to strptime.
* Sort Versions filesAndreas Jaeger2013-02-171-4/+4
|
* Remove lots of inline keywords.Roland McGrath2013-02-071-1/+1
|
* * time/tzfile.c: Include stdint.h for SIZE_MAX.Maxim Kuvyrkov2013-01-261-0/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0239-44/+39
|
* Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2013-01-011-2/+1
|
* * time/sys/time.h (settimeofday): Do not mark TV argumentJeff Law2012-12-031-1/+1
| | | | as __nonnull.
* [BZ #157] Remove include/stub-tag.h for good.Thomas Schwinge2012-11-048-8/+0
|
* Fix some typos in comments.Marek Polacek2012-08-251-2/+2
|
* Switch gettimeofday from INTUSE to libc_hidden_proto.Roland McGrath2012-05-241-6/+5
|
* mktime: avoid signed integer overflowPaul Eggert2012-05-231-4/+4
| | | | | * time/mktime.c (__mktime_internal): Do not mishandle the case where diff == INT_MIN.
* mktime: simplify computation of averagePaul Eggert2012-05-231-3/+1
| | | | | * time/mktime.c (ranged_convert): Use new time_t_avg function instead of rolling our own (probably-slower) code.
* mktime: do not assume signed right shift propagates sign bitPaul Eggert2012-05-231-6/+12
| | | | | | | * time/mktime.c (isdst_differ): New static function. (__mktime_internal): No need to normalize tm_isdst now. (__mktime_internal, not_equal_tm): Use isdst_differ to compare tm_isdst values.
* mktime: merge another wrapv change from gnulibPaul Eggert2012-05-231-1/+1
| | | | | * time/mktime.c (TYPE_MAXIMUM): Rework slightly to avoid diagnostics from some compilers.
* mktime: remove incorrect attempt at unusual arithmeticsPaul Eggert2012-05-231-9/+6
| | | | | | | | * time/mktime.c (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove. The code didn't really work on such machines anyway. (TYPE_MINIMUM): Assume two's complement. (twos_complement_arithmetic): Verify that long_int and time_t are two's complement (or unsigned, in the latter case).
* mktime: check signed shifts on long_int and time_t, tooPaul Eggert2012-05-231-3/+5
| | | | | | * time/mktime.c (SHR): Check that shifts work as desired on the types long_int and time_t too, as SHR is used on such types.
* mktime: do not assume 'long' is wide enoughPaul Eggert2012-05-231-12/+18
| | | | | | | | | * time/mktime.c (verify): Move decl up. (long_int): New type. (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it, to remove assumption in the code that 'long' is wide enough to store year values. This assumption is not true on x32 and on some non-glibc platforms.
* mktime: merge wrapv change from gnulibPaul Eggert2012-05-231-25/+90
| | | | | | | | * time/mktime.c (WRAPV): New macro. (time_t_avg, time_t_add_ok, time_t_int_add_ok): New static functions. (guess_time_tm, __mktime_internal): Do not assume that signed integer overflow wraps around; modern compilers generate code where this assumption is no longer valid.
* Update copyright years for time/mktime.cH.J. Lu2012-05-221-1/+1
|
* mktime: merge comment-quoting-style change from gnulibPaul Eggert2012-05-221-3/+3
|
* time/mktime.c (compile-command): Add "-I."Paul Eggert2012-05-221-1/+1
|
* mktime: merge mktime-internal.h change from gnulibPaul Eggert2012-05-221-0/+1
|
* mktime: merge time_r change from gnulibPaul Eggert2012-05-221-2/+1
|
* mktime: merge DEBUG change from gnulibPaul Eggert2012-05-221-0/+1
|
* mktime: merge <sys/types.h> change from gnulibPaul Eggert2012-05-221-1/+0
|
* mktime: merge HAVE_CONFIG_H change from gnulibPaul Eggert2012-05-221-1/+1
|
* Fold copyright yearsH.J. Lu2012-05-161-1/+1
|
* BZ#10375: Configure magic to use -U_FORTIFY_SOURCE if needed.Roland McGrath2012-05-161-5/+1
|
* Remove __snseconds_tH.J. Lu2012-05-151-1/+1
|
* Fix daylight time change for the USIan Wienand2012-05-091-6/+12
| | | | | | [BZ #14080] * time/tzset.c (__tzset_parse_tz): Update default rules for daylight time changes in the Energy Policy Act of 2005.
* Add __snseconds_t and __SNSECONDS_T_TYPEH.J. Lu2012-04-111-1/+1
|
* Testsuite #include fixes.Thomas Schwinge2012-04-021-0/+2
|
* Use time_t on ays, rem, y and yg in __offtimeH.J. Lu2012-03-161-2/+2
|
* Remove distribute variable from MakefilesUlrich Drepper2012-03-071-2/+1
|
* Fix ISO C11 definitions in time.hUlrich Drepper2012-02-251-11/+8
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-0939-117/+78
|
* Remove miscellaneous __STDC__ conditionals.Joseph Myers2012-01-301-6/+2
|