| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ #19443]
* crypt/crypt_util.c [DEBUG] (_ufc_prbits): Correct format string.
[DEBUG] (_ufc_set_bits): Declare used.
* iconv/gconv_dl.c [DEBUG]: Add a missing include directive.
[DEBUG] (print_all): Declare used.
* resolv/res_send.c [DEBUG] (__libc_res_nsend): Explicitly convert
operands of the ternary ?: expression to target type.
* stdlib/rshift.c [DEBUG] (mpn_rshift): Use assert() instead of
calling the undeclared abort.
* time/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the gnulib commit log:
commit e2646b0c6b5acda25e9ffeb4c12a5513a1e3b5ac
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri Jun 27 11:35:44 2014 -0700
mktime: merge #if/#ifdef usage from glibc
* lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
as that works with both Glibc's and Gnulib's style.
See thread starting at Siddhesh Poyarekar's bug report at:
http://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00102.html
|
|
|
|
| |
This syncs up the code with gnulib.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* time/mktime.c (__mktime_internal): Do not mishandle the case
where diff == INT_MIN.
|
|
|
|
|
| |
* time/mktime.c (ranged_convert): Use new time_t_avg function
instead of rolling our own (probably-slower) code.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* time/mktime.c (TYPE_MAXIMUM): Rework slightly to avoid diagnostics
from some compilers.
|
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
aren't valid on 32-bit systems.
|
|
|
|
|
|
| |
* time/mktime.c (guess_time_tm): Fix overflow detection.
* time/Makefile (tests): Add bug-mktime1.
* time/bug-mktime1.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2005-07-11 Derek R. Price <derek@ximbiot.com>
[BZ #1061]
* sysdeps/generic/glob.c (glob): Only a 0 return from
getlogin_r means success, according to POSIX 1003.2.
2005-06-23 Paul Eggert <eggert@cs.ucla.edu>
[BZ #1033]
* time/mktime.c: Import from gnulib.
The following macros are now consistent with other gnulib code.
This does not change mktime's behavior.
(TYPE_IS_INTEGER): New macro.
(time_t_is_integer): Use it.
(TYPE_TWOS_COMPLEMENT): New macro.
(twos_complement_arithmetic): Use it.
(TYPE_ONES_COMPLEMENT): New macro.
(TYPE_MINIMUM, TYPE_MAXIMUM): Now supports signed-magnitude.
mktime doesn't use this, but the code now matches other gnulib code.
(ranged_convert): Pacify GCC 4.0 in a different way, which
generates a few bytes less code.
(ranged_convert, __mktime_internal): When calling a function via a
pointer P, use P () rather than (*P) (), as we now assume C89 or
better.
|
|
|
|
|
|
|
|
|
|
| |
implicitly used memcpy.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
(truncate64): Use __truncate, not truncate.
(__have_no_truncate64): Renamed from have_no_truncate64.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
(__have_no_truncate64): Renamed from have_no_truncate64.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
warning.
* posix/regex_internal.c (re_string_reconstruct): Add cast to
avoid warning.
(build_wcs_upper_buffer): Change type of bug to plain char.
* locale/weightwc.h (findidx): Add casts to avoid warnings.
* time/mktime.c (ranged_convert): Initialize tm to make the
compiler happy.
* wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Add casts to avoid warnings.
* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Add casts to avoid warnings.
* wcsmbs/mbsnrtowcs.c: Add casts to avoid warnings.
* wcsmbs/wcsrtombs.c (__wcsrtombs): Add casts to avoid warnings.
* wcsmbs/wcrtomb.c (__wcrtomb): Add casts to avoid warnings.
* wcsmbs/mbrtowc.c (__mbrtowc): Use unsigned char for outbuf.
* posix/regex_internal.c [_LIBC] (build_wcs_buffer): Avoid using
dynamically sized array.
(build_wcs_upper_buffer): Likewise.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
convert T2, not T.
* time/Makefile (tests): Add tst-mktime3.
* time/tst-mktime3.c: New test.
2004-12-01 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
2004-11-10 Paul Eggert <eggert@cs.ucla.edu>
[BZ #541]
* time/mktime.c (SHR): New macro, which is a portable
substitute for >> that should work even on Crays.
(TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
Problem reported by Mark D. Baushke in
<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2004-10-27 Derek R. Price <derek@ximbiot.com>
[BZ #487] This change is imported from gnulib.
* time/mktime.c (not_equal_tm) [DEBUG]: Remove redundant check.
2004-10-24 Paul Eggert <eggert@cs.ucla.edu>
[BZ #473]
* time/tst-mktime.c (main): Don't assume that mktime fails
when given time stamps before 1970. It returns negative
time_t values instead, for compatibility with BSD.
* time/tst-mktime2.c: New file.
* time/Makefile (tests): Add it.
[BZ #473] Import from gnulib. Revamp to avoid several problems near
time_t extrema, and on hosts with 64-bit time_t and 32-bit int.
This fixes Debian bug 177940.
* time/mktime.c (TIME_T_MIDPOINT): New macro.
(ydhms_diff): Renamed from ydhms_tm_diff, with a new signature,
which avoids overflow problems on hosts with 64-bit time_t and
32-bit int. All callers changed. Now an inline function.
Verify at compile-time that long int is wide enough to avoid
these overflow problems.
(guess_time_tm): New function.
(__mktime_internal): Use it. Avoid overflow when computing yday on
hosts with 64-bit long and 32-bit int. Remove tests for 69;
no longer needed. Use if rather than #ifdef for LEAP_SECONDS_POSSIBLE
so that the code is checked by more compilers.
Do not rely on floating point to probe: stick to integer arithmetic,
to avoid potential porting problems.
Repair potential overflow correctly in the Southern Hemisphere.
(localtime_offset): Add a FIXME for the case where time_t is unsigned.
|
|
|
|
|
|
|
|
|
| |
* time/mktime.c (leapyear, ydms_tm_diff): Year is of type
long int, not int, to avoid problems when tm_year == INT_MAX
and tm_mon > 12.
(__mktime_intenral): Compute year using long int arithmetic,
not int arithmetic, to avoid problems on hosts where time_t
and long are 64 bits but int is 32.
|
|
|
|
|
| |
* time/mktime.c [! DEBUG]: Do not include <string.h>.
It's needed only if DEBUG is nonzero.
|
|
|
|
|
|
| |
* time/mktime.c [!_LIBC] (__mktime_internal): Define to
mktime_internal, to avoid clashes with any __mktime_internal
function defined in the standard library.
|
|
|
|
|
|
| |
* time/mktime.c (__isleap): Remove; all uses replaced by:
(leapyear): New function, which avoids overflow by not adding
1900 to year before testing whether it is a leap year.
|
|
|
|
|
|
|
| |
2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
[BZ #472] Imported from gnulib.
* time/mktime.c (Local Variables): Remove -DHAVE_TIME_R_POSIX;
no longer used.
|
|
|
|
|
|
|
|
|
|
| |
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Use
__sigprocmask not sigprocmask.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise.
* time/mktime.c: Likewise.
* misc/getpass.c: Likewise.
|
|
|
|
|
|
|
|
| |
* time/mktime.c (verify): New macro.
(time_t_is_integer, twos_complement_arithmetic,
right_shift_propagates_sign, base_year_is_a_multiple_of_100,
C99_integer_division): Document these longstanding assumptions in the
code, and verify them at compile-time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove. All uses changed to __localtime_r.
(__localtime_r) [!defined _LIBC]: New macro. Include "time_r.h" to
get its implementation.
Fix compile-command to allow for TIME_R_POSIX.
* time/strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r):
Remove. All uses changed to __localtime_r and __gmtime_r.
(__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
Include "time_r.h" to get their implementations.
* time/timegm.c: Allow use in GNU applications outside glibc.
[defined HAVE_CONFIG_H]: Include <config.h>.
[!defined _LIBC]: Include "timegm.h", <time_r.h>.
Define __gmtime_r, and declare __mktime_internal.
(timegm): Define via a prototype, since we can safely assume C89 now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* time/mktime.c (check_result): Use less-confusing report format.
"long" -> "long int", as per usual GNU style.
(main): Likewise.
Don't loop if the iteration overflows time_t.
Allow a negative step in the iteration.
* time/mktime.c: Assume freestanding C89 or better.
(HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove;
assume they're 1.
(__P): Remove; not used.
(CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
(mktime, not_equal_tm, print_tm, check_result, main): Use prototypes.
Prototypes use const * where appropriate.
(main) [DEBUG]: Fix typo in testing code uncovered by above changes,
which caused the testing code to dump core on some hosts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or
libc_hidden_weak for every system call symbol defined.
* include/time.h: Use libc_hidden_proto for time, asctime, mktime,
timelocal, localtime, strftime.
* time/asctime.c: Add libc_hidden_def.
* time/mktime.c: Likewise.
* time/localtime.c: Likewise.
* time/strftime.c: Likewise.
* time/strptime.c: Likewise.
* sysdeps/generic/time.c: Likewise.
* sysdeps/unix/time.c: Likewise.
* sysdeps/unix/sysv/i386/time.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/time.S: Likewise.
* include/arpa/inet.h: Use libc_hidden_proto for inet_ntop, inet_pton.
inet_makeaddr, inet_netof, inet_addr, __inet_addr.
* resolv/inet_ntop.c: Likewise.
* resolv/inet_pton.c: Likewise.
* inet/inet_mkadr.c: Add libc_hidden_def.
* inet/inet_netof.c: Likewise.
* resolv/inet_addr.c: Likewise.
* include/libc-symbols.h: Remove `defined HAVE_BROKEN_ALIAS_ATTRIBUTE'
clauses from conditionals for now. Will have to be fixed later
for older compilers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2002-04-14 Jakub Jelinek <jakub@redhat.com>
* elf/dl-lookup.c (_dl_lookup_symbol): Move add_dependency call to
the end of the function. Pass original flags to recursive call if
add_dependency failed.
(_dl_lookup_versioned_symbol): Likewise.
2002-04-13 Jakub Jelinek <jakub@redhat.com>
* time/mktime.c (__mktime_internal): If year is 69, don't bail out
early, but check whether it overflowed afterwards.
* time/tst-mktime.c (main): Add new tests.
* debug/xtrace.sh: Fix program name in help message.
Patch by Roger Luethi <rl@hellgate.ch>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2002-04-05 Jakub Jelinek <jakub@redhat.com>
* time/mktime.c (__mktime_internal): Move check for year < 70 below
all variable declarations.
2002-04-04 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/pipe.S: Don't overwrite r8 on error.
* sysdeps/unix/sysv/linux/x86_64/time.c: Removed.
* sysdeps/mips/dec/bits/endian.h: Removed since arch is not supported.
|