| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Having checked the arrangement of whitespace in time/strftime_l.c
using "unexpand" and "unexpand -a" command, three inconsistencies are
detected. So fix them for consistency.
ChangeLog:
* time/strftime_l.c: Fix a few whitespace arrangement inconsistencies.
|
|
|
|
|
|
|
| |
ChangeLog:
* time/tst-strftime2.c: Use array_length macros instead of magic
numbers.
|
|
|
|
|
|
|
|
|
|
|
| |
By ordering the suballocations by decreasing alignment, alignment
gaps can be avoided.
Also use __glibc_unlikely for reading the transitions and type
indexes. In the 8-byte case, two reads are now needed because the
transitions and type indexes are no longer adjacent. The separate
call to __fread_unlocked does not matter from a performance point of
view because __tzfile_read is only invoked rarely.
|
|
|
|
|
|
|
| |
The computation of tzspec_len is moved in front of the total_size
computation, so that the allocation size computation and the
suballocations are next to each other. Also add an assert that
tzspec_len is positive when it is actually used later.
|
|
|
|
|
|
|
| |
The GMT offset can be outside the range of a 16-bit int type, which
is presumably the reason why long int was used in struct tm. We
cannot change struct tm, but we can change the internal type for
the offset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The full representation of the alternative calendar year (%EY)
typically includes an internal use of "%Ey". As a GNU extension,
apply any flags on "%EY" (e.g. "%_EY", "%-EY") to the internal "%Ey",
allowing users of "%EY" to control how the year is padded.
Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>
Reviewed-by: Zack Weinberg <zackw@panix.com>
ChangeLog:
[BZ #24096]
* manual/time.texi (strftime): Document "%EC" and "%EY".
* time/Makefile (tests): Add tst-strftime2.
(LOCALES): Add ja_JP.UTF-8, lo_LA.UTF-8, and th_TH.UTF-8.
* time/strftime_l.c (__strftime_internal): Add argument yr_spec to
override padding for "%Ey".
If an optional flag ('_' or '-') is specified to "%EY", interpret the
"%Ey" in the subformat as if decorated with that flag.
* time/tst-strftime2.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Japanese locales, strftime's alternative year format (%Ey) produces
a year numbered within a time period called an _era_. A new era
typically begins when a new emperor is enthroned. The result of "%Ey"
is therefore usually a one- or two-digit number.
Many programs that display Japanese era dates assume that the era year
is two digits wide. To improve how these programs display dates
during the first nine years of a new era, change "%Ey" to pad one-
digit numbers on the left with a zero. This change applies to all
locales. It is expected to be harmless for other locales that use the
alternative year format (e.g. lo_LA and th_TH, in which "%Ey" produces
the year of the Buddhist calendar) as those calendars' year numbers
are already more than two digits wide, and this is not expected to
change.
This change needs to be in place before 2019-05-01 CE, as a new era is
scheduled to begin on that date.
Reviewed-by: Zack Weinberg <zackw@panix.com>
Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>
ChangeLog:
[BZ #23758]
* manual/time.texi (strftime): Document "%Ey".
* time/strftime_l.c (__strftime_internal): Set the default width
padding with zero of "%Ey" to 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following spelling fixes:
$ git grep -F -l 'relevent' |
xargs sed -i 's/relevent/relevant/g'
$ git grep -F -l 'checked fot' |
xargs sed -i 's/checked fot/checked for/g'
$ git grep -F -l "could't" |
xargs sed -i "s/could't/couldn't/g"
$ git grep -F -l 'wheter' | grep -Fv ChangeLog.old |
xargs sed -i 's/wheter/whether/g'
$ git grep -F -l 'neccessary' | grep -Fv ChangeLog.old |
xargs sed -i 's/neccessary/necessary/g'
$ git grep -F -l 'ouput' |
xargs sed -i 's/ouput/output/g'
$ git grep -F -w -l 'iput' |
xargs sed -i 's/iput/input/g'
This is inspired by a gnulib bug report at
https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00081.html
* argp/argp-help.c: Fix typo in comment.
* misc/sys/cdefs.h: Likewise.
* posix/regexec.c (sift_states_iter_mb): Likewise.
* socket/sockatmark.c: Likewise.
* socket/sys/socket.h: Likewise.
* sysdeps/ia64/fpu/libm_sincos_large.S: Likewise.
* sysdeps/ia64/fpu/libm_sincosl.S: Likewise.
* sysdeps/ia64/fpu/s_cosl.S: Likewise.
* sysdeps/ieee754/dbl-64/k_rem_pio2.c: Likewise.
* sysdeps/unix/sockatmark.c: Likewise.
* time/strptime_l.c: Likewise.
|
|
|
|
|
|
|
| |
ChangeLog:
* time/strftime_l.c (__strftime_internal): Use "L_" macros, also add a
missing space after the cast of "_NL_CURRENT".
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a 64-bit-time version of __difftime (but do not assume
__time64_t is a signed int so that Gnulib can reuse the code)
and make the 32-bit version a wrapper of it.
Current difftime expects two time_t arguments and returns a
double. To preserve source-code compatibility, its 64-bit-time
equivalent expects two __time64_t arguments but still returns
a double.
This patch was tested by running 'make check' on branch
master then applying this patch and its two predecessors and
running 'make check' again, and checking that both 'make check'
yield identical results. This was done on x86_64-linux-gnu and
i686-linux-gnu.
This patch was also functionally tested with an ad hoc userland
C program which checks the result of difftime for various pairs
of 32-bit and, for 64-bit builds, of 64-bit time_t values too.
The program was built and run against a glibc with and without
the patch, and the results compared to ensure the patch does
not change the behavior of difftime.
* include/time.h (__difftime64): Add.
* time/difftime.c (subtract): convert to 64-bit time.
* time/difftime.c (__difftime64): Add.
* time/difftime.c (__difftime): Wrap around __difftime64.
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__ctime64_r): Add.
* time/ctime_r.c
(__ctime64_r): Add.
[__TIMESIZE != 64] (__ctime_r): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__ctime64): Add.
* time/gmtime.c
(__ctime64): Add.
[__TIMESIZE != 64] (ctime): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__gmtime64_r): Add.
* time/gmtime.c
(__gmtime64_r): Add.
[__TIMESIZE != 64] (__gmtime): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__gmtime64): Add.
* time/gmtime.c
(__gmtime64): Add.
[__TIMESIZE != 64] (__gmtime): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__localtime64_r): Add.
* time/localtime.c
(__localtime64_r): Add.
[__TIMESIZE != 64] (__localtime_r): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
|
| |
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__localtime64): Add.
* manual/maint.texi: Document Y2038 symbol handling.
* time/localtime.c
(__localtime64): Add.
[__TIMERSIZE != 64] (__localtime): Turn into a wrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that __time64_t exists, we can switch internal function
__tz_convert from 32-bit to 64-bit time. This involves switching
some other internal functions as well, namely __tz_compute and
__offtime.
Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.
* include/time.h
(__tz_compute): Replace time_t with __time64_t.
(__tz_convert): Replace time_t* with __time64_t.
(__offtime): Replace time_t* with __time64_t.
* time/gmtime.c
(__gmtime_r): Adjust call to __tz_convert.
(gmtime): Likewise.
* time/localtime.c
(__localtime_r): Likewise.
(localtime): Likewise.
* time/offtime.c: Replace time_t with __time64_t.
* time/tzset.c: Likewise.
|
|
|
|
|
|
|
| |
The DEBUG_MKTIME code no longer works in glibc or in Gnulib.
And it’s no longer needed now that glibc and Gnulib both have
their own testing mechanisms for mktime.
* time/mktime.c (DEBUG_MKTIME): Remove. All uses removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ#23789]
mktime was not properly reporting failures when the underlying
localtime_r fails with errno != EOVERFLOW; it incorrectly treated
them like EOVERFLOW failures, and set errno to EOVERFLOW.
The problem could happen on non-glibc platforms, with Gnulib.
* time/mktime.c (guess_time_tm): Remove, replacing with ...
(tm_diff): ... this simpler function, which does not change errno.
All callers changed to deal with errno themselves.
(ranged_convert, __mktime_internal): Return failure immediately if
the underlying function reports any failure other than EOVERFLOW.
(__mktime_internal): Set errno to EOVERFLOW if the spring-forward
gap code fails.
|
|
|
|
|
|
|
|
| |
[BZ#23789]
* time/mktime.c (ranged_convert): On 32-bit platforms, don’t
mishandle a DST transition that jumps over the Y2038 boundary.
No such DST transitions are known so this is only a theoretical
bug, but we might as well do things right.
|
|
|
|
|
|
|
| |
[BZ#23789]
* time/mktime.c (long_int): Now 4⨯ int, not just 3⨯.
This is so that we can add tm_diff results to a previous guess,
which will be useful in a later patch.
|
|
|
|
|
| |
[BZ#23789]
* time/mktime.c (__mktime_internal): Omit excess precision.
|
|
|
|
|
|
|
|
| |
[BZ#23789]
Based on a test suggested by Albert Aribaud in:
https://www.sourceware.org/ml/libc-alpha/2018-10/msg00662.html
* time/Makefile (tests): Add bug-mktime4.
* time/bug-mktime4.c: New file.
|
|
|
|
|
|
|
| |
[BZ#23789]
* time/mktime.c [!_LIBC && !DEBUG_MKTIME]:
Include libc-config.h, not config.h, for __set_errno.
(guess_time_tm, __mktime_internal): Set errno to EOVERFLOW on overflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc support for 64-bit time_t on 32-bit architectures
will involve:
- Using 64-bit times inside glibc, with conversions
to and from 32-bit times taking place as necessary
for interfaces using such times.
- Adding 64-bit-time support in the glibc public API.
This support should be dynamic, i.e. glibc should
provide both 32-bit and 64-bit implementations and
let user code choose at compile time whether to use
the 32-bit or 64-bit interfaces.
This requires a glibc-internal name for a type for times
that are always 64-bit.
Based on __TIMESIZE, a new macro is defined, __TIME64_T_TYPE,
which is always the right __*_T_TYPE to hold a 64-bit-time.
__TIME64_T_TYPE equals __TIME_T_TYPE if __TIMESIZE equals 64
and equals __SQUAD_T_TYPE otherwise.
__time64_t can then replace uses of internal_time_t.
This patch was tested by running 'make check' on branch
master then applying this patch and its predecessor and
running 'make check' again, and checking that both 'make
check' yield identical results. This was done on
x86_64-linux-gnu and i686-linux-gnu.
* bits/time64.h: New file.
* include/time.h: Replace internal_time_t with __time64_t.
* posix/bits/types (__time64_t): Add.
* stdlib/Makefile: Add bits/time64.h to includes.
* time/tzfile.c: Replace internal_time_t with __time64_t.
|
| |
|
|
|
|
|
| |
This removes all overrides of TIMEOUT that are less than or equal to the
default timeout.
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ#23745]
This fix affects only Gnulib. Problem discovered when
mktime.c was used as part of Gnulib in bleeding-edge Coreutils.
* time/mktime.c:
(my_tzset) [!_LIBC && !NEED_MKTIME_WORKING && !NEED_MKTIME_WINDOWS]:
Do not define since it is not used. Defining an unused static
function prompts a warning from GCC when Coreutils is configured
with --enable-gcc-warnings.
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ #23603]
* include/time.h (__mktime_internal): The localtime offset is now
of type long int instead of time_t. This is the longstanding type
in glibc, and it is more than enough to represent difference
between localtime and gmtime even if it is 32 bits and time_t is
64. Changing it now will let us avoid an unnecessary change when
time_t is widened to 64 bits on 32-bit platforms.
* time/mktime-internal.h (mktime_offset_t): Now long int.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ #23603][BZ #16346]
This fixes some obscure problems with integer overflow.
Although it looks scary, it is almost all a byte-for-byte copy
from Gnulib, and the Gnulib code has been tested reasonably well.
* include/intprops.h: New file, copied from Gnulib.
* include/verify.h, time/mktime-internal.h:
New tiny files, simplified from Gnulib.
* time/mktime.c: Copy from Gnulib. This has the following changes:
Do not include config.h if DEBUG_MKTIME is nonzero.
Include stdbool.h, intprops.h, verify.h.
Include string.h only if needed.
Include stdlib.h on MS-Windows.
Include mktime-internal.h.
(DEBUG_MKTIME): Default to 0, and simplify later uses.
(NEED_MKTIME_INTERNAL, NEED_MKTIME_WINDOWS)
(NEED_MKTIME_WORKING): Give default values to pacify -Wundef,
which glibc uses. Default NEED_MKTIME_WORKING to DEBUG_MKTIME, to
simplify later conditionals; default the others to zero. Use
these conditionals to express only the code needed on the current
platform. In uses of these conditionals, explicitly spell out how
_LIBC affects things, so it’s easier to review from a glibc
viewpoint.
(WRAPV): Remove; no longer needed now that we have
systematic overflow checking.
(my_tzset, __tzset) [!_LIBC]: New function and macro, to better
compartmentalize tzset issues. Move system-dependent tzsettish
code here from mktime.
(verify): Remove; now done by verify.h. All uses changed.
(long_int): Use a more-conservative definition, to avoid
integer overflow.
(SHR): Remove, replacing with ...
(shr): New function, which means we needn’t worry about side
effects in args, and conversion analysis is simpler.
(TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT, TYPE_SIGNED, TYPE_MINIMUM)
(TYPE_MAXIMUM, TIME_T_MIN, TIME_T_MAX, TIME_T_MIDPOINT)
(time_t_avg, time_t_add_ok): Remove.
(mktime_min, mktime_max): New constants.
(leapyear, isdst_differ): Use bool for booleans.
(ydhms_diff, guess_time_tm, ranged_convert, __mktime_internal):
Use long_int, not time_t, for mktime differences.
(long_int_avg): New function, replacing time_t_avg.
INT_ADD_WRAPV replaces time_t_add_ok.
(guess_time_tm): 6th arg is now long_int, not time_t const *.
All uses changed.
(convert_time): New function.
(ranged_convert): Use it.
(__mktime_internal): Last arg now points to mktime_offset_t, not
time_t. All uses changed. This is a no-op on glibc, where
mktime_offset_t is always time_t. Use int, not time_t, for UTC
offset guess. Directly check for integer overflow instead of
using a heuristic that works only 99.9...% of the time.
Access *OFFSET only once, to avoid an unlikely race if the
compiler delays a load and if this cascades into a signed integer
overflow.
(mktime): Move tzsettish code to my_tzset, and move
localtime_offset to within mktime so that it doesn’t
need a separate ifdef.
(main) [DEBUG_MKTIME]: Speed up by using localtime_r
instead of localtime.
* time/timegm.c: Copy from Gnulib. This has the following changes:
Include mktime-internal.h.
[!_LIBC]: Include config.h and time.h. Do not include
timegm.h or time_r.h. Make __mktime_internal a macro,
and include mktime-internal.h to get its declaration.
(timegm): Temporary is now mktime_offset_t, not time_t.
This affects only Gnulib.
|
|
|
|
|
| |
[BZ #21716]
* time/tzfile.c (__tzfile_read): Simplify slightly.
|
|
|
|
|
|
| |
[BZ #21716]
* time/tzfile.c (__tzfile_read): Check for memory exhaustion
when registering time zone abbreviations.
|
|
|
|
|
|
|
|
|
|
| |
After commit d76d3703551a362b472c866b5b6089f66f8daa8e ("Fix missing
timespec definition for sys/stat.h (BZ #21371)") in combination with
kernel UAPI changes, GCC sanitizer builds start to fail due to a
conflicting definition of struct timespec in <linux/time.h>. Use
_STRUCT_TIMESPEC as the header file inclusion guard, which is already
checked in the kernel header, to support including <linux/time.h> and
<sys/stat.h> in the same translation unit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 22639 reports localtime failing to handle time offset transitions
correctly in 2039 and later on platforms with 64-bit time_t.
The problem is the use of SECSPERDAY (constant 86400) in calculations
such as
t = ((year - 1970) * 365
+ /* Compute the number of leapdays between 1970 and YEAR
(exclusive). There is a leapday every 4th year ... */
+ ((year - 1) / 4 - 1970 / 4)
/* ... except every 100th year ... */
- ((year - 1) / 100 - 1970 / 100)
/* ... but still every 400th year. */
+ ((year - 1) / 400 - 1970 / 400)) * SECSPERDAY;
where t is of type time_t and year is of type int. Before my commit
92bd70fb85bce57ac47ba5d8af008736832c955a (an update from tzcode,
included in 2.26 and later releases), SECSPERDAY was obtained from a
file imported from tzcode, where the value included a cast to
int_fast32_t. On 64-bit platforms, glibc defines int_fast32_t to be
long int, so 64-bit, but my patch resulted in it changing to int.
(The bug would probably have existed even before my patch for x32,
which has 64-bit time_t but 32-bit int_fast32_t, but I haven't
verified that.)
This patch fixes the problem by including a cast to time_t in the
definition of SECSPERDAY. (64-bit time support for 32-bit systems
should move such code that isn't a public interface to using the
internal 64-bit version of time_t throughout.)
Tested for x86_64 and x86.
[BZ #22639]
* time/tzset.c (SECSPERDAY): Cast to time_t.
* time/tst-y2039.c: New file.
* time/Makefile (tests): Add tst-y2039.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing the fixes for linknamespace and localplt test failures with
-Os that arise from functions not being inlined in that case, this
patch fixes such failures for getc_unlocked.
__getc_unlocked already exists; this patch makes it explicitly hidden,
calls it where needed for namespace reasons, adds an inline function
for it when inline functions are used and adds libc_hidden_proto /
libc_hidden_weak for getc_unlocked.
Tested for x86_64 (both without -Os to make sure that case continues
to work, and with -Os to make sure all the relevant linknamespace and
localplt test failures are resolved). Because of other such failures
that remain after this patch, neither of the bugs can yet be closed.
[BZ #15105]
[BZ #19463]
* libio/getc_u.c (getc_unlocked): Use libc_hidden_weak.
* include/stdio.h [!_ISOMAC] (__getc_unlocked): Use
attribute_hidden, and define inline if [__USE_EXTERN_INLINES].
[!_ISOMAC] (getc_unlocked): Use libc_hidden_proto.
* misc/getttyent.c (__getttyent): Call __getc_unlocked instead of
getc_unlocked.
* time/tzfile.c (__tzfile_read): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing the fixes for linknamespace and localplt test failures with
-Os that arise from functions not being inlined in that case, this
patch fixes such failures for ferror_unlocked.
The usual approach is followed of adding __ferror_unlocked (inlined
when ferror_unlocked is), making calls use it when required for
namespace reasons (only one such call), and using libc_hidden_proto /
libc_hidden_weak for the ferror_unlocked weak alias when only localplt
but not namespace issues are involved.
Tested for x86_64 (both without -Os to make sure that case continues
to work, and with -Os to make sure all the relevant linknamespace and
localplt test failures are resolved). Because of other such failures
that remain after this patch, neither of the bugs can yet be closed.
[BZ #15105]
[BZ #19463]
* libio/ferror_u.c (ferror_unlocked): Rename to __ferror_unlocked
and define as weak alias of __ferror_unlocked. Use
libc_hidden_weak.
* include/stdio.h [!_ISOMAC] (ferror_unlocked): Use
libc_hidden_proto.
[!_ISOMAC] (__ferror_unlocked) New declaration, and inline
function if [__USE_EXTERN_INLINES].
* time/getdate.c (__getdate_r): Call __ferror_unlocked instead of
ferror_unlocked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing the fixes for linknamespace and localplt test failures with
-Os that arise from functions not being inlined in that case, this
patch fixes such failures for feof_unlocked.
The usual approach is followed of adding __feof_unlocked (inlined when
feof_unlocked is), making calls use it when required for namespace
reasons, and using libc_hidden_proto / libc_hidden_weak for the
feof_unlocked weak alias when only localplt but not namespace issues
are involved. In the case of getaddrinfo.c, use of __feof_unlocked
needs to be conditional since that code is also used in nscd (where
__feof_unlocked is not available).
Tested for x86_64 (both without -Os to make sure that case continues
to work, and with -Os to make sure all the relevant linknamespace and
localplt test failures are resolved). Because of other such failures
that remain after this patch, neither of the bugs can yet be closed.
[BZ #15105]
[BZ #19463]
* libio/feof_u.c (feof_unlocked): Rename to __feof_unlocked and
define as weak alias of __feof_unlocked. Use libc_hidden_weak.
* include/stdio.h (feof_unlocked): Use libc_hidden_proto.
(__feof_unlocked): New declaration, and inline function if
[__USE_EXTERN_INLINES].
* iconv/gconv_conf.c (read_conf_file): Call __feof_unlocked
instead of feof_unlocked.
* intl/localealias.c [_LIBC] (FEOF): Likewise.
* nss/nsswitch.c (nss_parse_file): Likewise.
* sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area):
Likewise.
* time/getdate.c (__getdate_r): Likewise.
* sysdeps/posix/getaddrinfo.c [IS_IN (libc)] (feof_unlocked):
Define as macro to call __feof_unlocked.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ #10871]
* localedata/locales/ru_RU (mon): Rename to...
(alt_mon): This.
(abmon): Rename to...
(ab_alt_mon): This.
(mon): Import from CLDR (genitive case).
(abmon): Copy from the old content except the 5th month which is
now in the genitive case, even when abbreviated.
* localedata/locales/ru_UA: Likewise.
* time/tst-strptime.c (day_tests): Add an actual example of
a difference between %b and %Ob in Russian.
|
|
|
|
|
|
|
|
| |
[BZ #10871]
* localedata/locales/pl_PL: Alternative month names added,
primary month names are genitive now.
* time/tst-strptime.c (day_tests): Actually use a genitive case
of a month name in Polish language.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the previous changes also repeated to support abbreviated
alternative month names. In most languages which have declension and
need nominative/genitive month names the abbreviated forms for both
cases are the same. An example where they do differ is May in Russian:
this name is too short to be abbreviated so even the abbreviated form
features the declension suffixes.
[BZ #10871]
* locale/C-time.c (_nl_C_LC_TIME): Add abbreviated alternative month
names, define them as the same as abbreviated month names explicitly.
* locale/categories.def (LC_TIME): Add ab_alt_mon and wide-ab_alt_mon.
* locale/langinfo.h: (_NL_ABALTMON_1, _NL_ABALTMON_2, _NL_ABALTMON_3,
_NL_ABALTMON_4, _NL_ABALTMON_5, _NL_ABALTMON_6, _NL_ABALTMON_7,
_NL_ABALTMON_8, _NL_ABALTMON_9, _NL_ABALTMON_10, _NL_ABALTMON_11,
_NL_ABALTMON_12, _NL_WABALTMON_1, _NL_WABALTMON_2, _NL_WABALTMON_3,
_NL_WABALTMON_4, _NL_WABALTMON_5, _NL_WABALTMON_6, _NL_WABALTMON_7,
_NL_WABALTMON_8, _NL_WABALTMON_9, _NL_WABALTMON_10, _NL_WABALTMON_11,
_NL_WABALTMON_12): New enum constants.
* locale/programs/ld-time.c (struct locale_time_t): Add ab_alt_mon,
wab_alt_mon, and ab_alt_mon_defined members.
(time_output): Output ab_alt_mon and wab_alt_mon members.
(time_read): Read them, initialize them as copies of abmon and wabmon
respectively if they are missing, initialize ab_alt_mon_defined.
* locale/programs/locfile-kw.gperf (ab_alt_mon): Define.
* locale/programs/locfile-kw.h: Regenerate.
* locale/programs/locfile-token.h (tok_ab_alt_mon): New enum constant.
* time/Makefile [$(run-built-tests) = yes] (LOCALES): Add es_ES.UTF-8
and ru_RU.UTF-8.
* time/strftime_l.c (a_altmonth, aam_len): New macros.
[!COMPILE_WIDE] (ABALTMON_1): New macro.
(__strftime_internal): Handle %Ob and %Oh formats.
* time/strptime_l.c [_LIBC] (ab_alt_month_name): New macro.
(__strptime_internal): Handle %Ob and %Oh formats.
* time/tst-strptime.c (day_tests): Add more tests to parse different
forms of month names including the new %Ob format specifier.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some languages (Slavic, Baltic, etc.) require a genitive case of the
month name when formatting a full date (with the day number) while
they require a nominative case when referring to the month standalone.
This requirement cannot be fulfilled without providing two forms for
each month name. From now it is specified that nl_langinfo(MON_1)
series (up to MON_12) and strftime("%B") generate the month names in
the grammatical form used when the month is a part of a complete date.
If the grammatical form used when the month is named by itself is needed,
the new values nl_langinfo(ALTMON_1) (up to ALTMON_12) and
strftime("%OB") are supported. This new feature is optional so the
languages which do not need it or do not yet provide the updated
locales simply do not use it and their behaviour is unchanged.
[BZ #10871]
* locale/C-time.c (_nl_C_LC_TIME): Add alternative month names,
define them as the same as primary full month names explicitly.
* locale/categories.def (LC_TIME): Add alt_mon and wide-alt_mon.
* locale/langinfo.h (__ALTMON_1, __ALTMON_2, __ALTMON_3, __ALTMON_4,
__ALTMON_5, __ALTMON_6, __ALTMON_7, __ALTMON_8, __ALTMON_9, __ALTMON_10,
__ALTMON_11, __ALTMON_12, _NL_WALTMON_1, _NL_WALTMON_2, _NL_WALTMON_3,
_NL_WALTMON_4, _NL_WALTMON_5, _NL_WALTMON_6, _NL_WALTMON_7,
_NL_WALTMON_8, _NL_WALTMON_9, _NL_WALTMON_10, _NL_WALTMON_11,
_NL_WALTMON_12): New enum constants.
[__USE_GNU] (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6,
ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12): New
macros.
* locale/programs/ld-time.c (struct locale_time_t): Add alt_mon,
walt_mon, and alt_mon_defined members.
(time_output): Output alt_mon and walt_mon members.
(time_read): Read them, initialize them as copies of mon and wmon
respectively if they are missing, initialize alt_mon_defined.
* locale/programs/locfile-kw.gperf (alt_mon): Define.
* locale/programs/locfile-kw.h: Regenerate.
* locale/programs/locfile-token.h (tok_alt_mon): New enum constant.
* localedata/tst-langinfo.c (map): Add tests for the new constants
ALTMON_1 .. ALTMON_12.
* time/Makefile [$(run-built-tests) = yes] (LOCALES): Add fr_FR.UTF-8
and pl_PL.UTF-8.
* time/strftime_l.c (f_altmonth): New macro.
(__strftime_internal): Handle %OB format.
* time/strptime_l.c [_LIBC] (alt_month_name): New macro.
(__strptime_internal): Handle %OB format.
* time/tst-strptime.c (day_tests): Add tests to parse different forms
of month names including the new %OB format specifier.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace = with += in CFLAGS-xxx.c and CPPFLAGS-xxx.c to allow Makefile
under sysdeps to define CFLAGS-xx.c and CPPFLAGS-xxx.c.
* argp/Makefile (CFLAGS-argp-help.c): Replace = with +=.
(CFLAGS-argp-parse.c): Likewise.
(CFLAGS-argp-fmtstream.c): Likewise.
* crypt/Makefile (CPPFLAGS-sha256-crypt.c): Likewise.
(CPPFLAGS-sha512-crypt.c): Likewise.
(CPPFLAGS-md5-crypt.c): Likewise.
* debug/Makefile (CFLAGS-stack_chk_fail.c): Likewise.
(CFLAGS-stack_chk_fail_local.c): Likewise.
(CFLAGS-backtrace.c): Likewise.
(CFLAGS-sprintf_chk.c): Likewise.
(CFLAGS-snprintf_chk.c): Likewise.
(CFLAGS-vsprintf_chk.c): Likewise.
(CFLAGS-vsnprintf_chk.c): Likewise.
(CFLAGS-asprintf_chk.c): Likewise.
(CFLAGS-vasprintf_chk.c): Likewise.
(CFLAGS-obprintf_chk.c): Likewise.
(CFLAGS-dprintf_chk.c): Likewise.
(CFLAGS-vdprintf_chk.c): Likewise.
(CFLAGS-printf_chk.c): Likewise.
(CFLAGS-fprintf_chk.c): Likewise.
(CFLAGS-vprintf_chk.c): Likewise.
(CFLAGS-vfprintf_chk.c): Likewise.
(CFLAGS-gets_chk.c): Likewise.
(CFLAGS-fgets_chk.c): Likewise.
(CFLAGS-fgets_u_chk.c): Likewise.
(CFLAGS-fread_chk.c): Likewise.
(CFLAGS-fread_u_chk.c): Likewise.
(CFLAGS-swprintf_chk.c): Likewise.
(CFLAGS-vswprintf_chk.c): Likewise.
(CFLAGS-wprintf_chk.c): Likewise.
(CFLAGS-fwprintf_chk.c): Likewise.
(CFLAGS-vwprintf_chk.c): Likewise.
(CFLAGS-vfwprintf_chk.c): Likewise.
(CFLAGS-fgetws_chk.c): Likewise.
(CFLAGS-fgetws_u_chk.c): Likewise.
(CFLAGS-read_chk.c): Likewise.
(CFLAGS-pread_chk.c): Likewise.
(CFLAGS-pread64_chk.c): Likewise.
(CFLAGS-recv_chk.c): Likewise.
(CFLAGS-recvfrom_chk.c): Likewise.
(CFLAGS-tst-longjmp_chk.c): Likewise.
(CPPFLAGS-tst-longjmp_chk.c): Likewise.
(CFLAGS-tst-longjmp_chk2.c): Likewise.
(CPPFLAGS-tst-longjmp_chk2.c): Likewise.
(CFLAGS-tst-longjmp_chk3.c): Likewise.
(CPPFLAGS-tst-longjmp_chk3.c): Likewise.
(CFLAGS-tst-chk1.c): Likewise.
(CFLAGS-tst-chk2.c): Likewise.
(CFLAGS-tst-chk3.c): Likewise.
(CFLAGS-tst-chk4.cc): Likewise.
(CFLAGS-tst-chk5.cc): Likewise.
(CFLAGS-tst-chk6.cc): Likewise.
(CFLAGS-tst-lfschk1.c): Likewise.
(CFLAGS-tst-lfschk2.c): Likewise.
(CFLAGS-tst-lfschk3.c): Likewise.
(CFLAGS-tst-lfschk4.cc): Likewise.
(CFLAGS-tst-lfschk5.cc): Likewise.
(CFLAGS-tst-lfschk6.cc): Likewise.
(CFLAGS-tst-ssp-1.c): Likewise.
* dirent/Makefile (CFLAGS-scandir.c): Likewise.
(CFLAGS-scandir64.c): Likewise.
(CFLAGS-scandir-tail.c): Likewise.
(CFLAGS-scandir64-tail.c): Likewise.
* elf/Makefile (CPPFLAGS-dl-tunables.c): Likewise.
(CFLAGS-dl-tunables.c): Likewise.
(CFLAGS-dl-runtime.c): Likewise.
(CFLAGS-dl-lookup.c): Likewise.
(CFLAGS-dl-iterate-phdr.c): Likewise.
(CFLAGS-vismain.c): Likewise.
(CFLAGS-tst-linkall-static.c): Likewise.
(CFLAGS-tst-linkall-static.c): Likewise.
(CPPFLAGS-dl-load.c): Likewise.
(CFLAGS-ldconfig.c): Likewise.
(CFLAGS-dl-cache.c): Likewise.
(CFLAGS-cache.c): Likewise.
(CFLAGS-rtld.c): Likewise.
(CFLAGS-multiload.c): Likewise.
(CFLAGS-filtmod1.c): Likewise.
(CFLAGS-tst-align.c): Likewise.
(CFLAGS-tst-align2.c): Likewise.
(CFLAGS-tst-alignmod.c): Likewise.
(CFLAGS-tst-alignmod2.c): Likewise.
(CPPFLAGS-tst-execstack.c): Likewise.
(CFLAGS-tst-ptrguard1-static.c): Likewise.
(CFLAGS-tst-latepthreadmod.c): Likewise.
* grp/Makefile (CFLAGS-getgrgid_r.c): Likewise.
(CFLAGS-getgrnam_r.c): Likewise.
(CFLAGS-getgrent_r.c): Likewise.
(CFLAGS-getgrent.c): Likewise.
(CFLAGS-fgetgrent.c): Likewise.
(CFLAGS-fgetgrent_r.c): Likewise.
(CFLAGS-putgrent.c): Likewise.
(CFLAGS-initgroups.c): Likewise.
(CFLAGS-getgrgid.c): Likewise.
* gshadow/Makefile (CFLAGS-getsgent_r.c): Likewise.
(CFLAGS-getsgent.c): Likewise.
(CFLAGS-fgetsgent.c): Likewise.
(CFLAGS-fgetsgent_r.c): Likewise.
(CFLAGS-putsgent.c): Likewise.
(CFLAGS-getsgnam.c): Likewise.
(CFLAGS-getsgnam_r.c): Likewise.
* iconv/Makefile (CFLAGS-iconv_prog.c): Likewise.
(CFLAGS-iconv_charmap.c): Likewise.
(CFLAGS-dummy-repertoire.c): Likewise.
(CFLAGS-charmap.c): Likewise.
(CFLAGS-linereader.c): Likewise.
(CFLAGS-simple-hash.c): Likewise.
(CFLAGS-gconv_conf.c): Likewise.
(CFLAGS-iconvconfig.c): Likewise.
* inet/Makefile (CFLAGS-gethstbyad_r.c): Likewise.
(CFLAGS-gethstbyad.c): Likewise.
(CFLAGS-gethstbynm_r.c): Likewise.
(CFLAGS-gethstbynm.c): Likewise.
(CFLAGS-gethstbynm2_r.c): Likewise.
(CFLAGS-gethstbynm2.c): Likewise.
(CFLAGS-gethstent_r.c): Likewise.
(CFLAGS-gethstent.c): Likewise.
(CFLAGS-rcmd.c): Likewise.
(CFLAGS-getnetbynm_r.c): Likewise.
(CFLAGS-getnetbynm.c): Likewise.
(CFLAGS-getnetbyad_r.c): Likewise.
(CFLAGS-getnetbyad.c): Likewise.
(CFLAGS-getnetent_r.c): Likewise.
(CFLAGS-getnetent.c): Likewise.
(CFLAGS-getaliasent_r.c): Likewise.
(CFLAGS-getaliasent.c): Likewise.
(CFLAGS-getrpcent_r.c): Likewise.
(CFLAGS-getrpcent.c): Likewise.
(CFLAGS-getservent_r.c): Likewise.
(CFLAGS-getservent.c): Likewise.
(CFLAGS-getprtent_r.c): Likewise.
(CFLAGS-getprtent.c): Likewise.
(CFLAGS-either_ntoh.c): Likewise.
(CFLAGS-either_hton.c): Likewise.
(CFLAGS-getnetgrent.c): Likewise.
(CFLAGS-getnetgrent_r.c): Likewise.
(CFLAGS-tst-checks-posix.c): Likewise.
(CFLAGS-tst-sockaddr.c): Likewise.
* intl/Makefile (CFLAGS-tst-gettext.c): Likewise.
(CFLAGS-tst-translit.c): Likewise.
(CFLAGS-tst-gettext2.c): Likewise.
(CFLAGS-tst-codeset.c): Likewise.
(CFLAGS-tst-gettext3.c): Likewise.
(CFLAGS-tst-gettext4.c): Likewise.
(CFLAGS-tst-gettext5.c): Likewise.
(CFLAGS-tst-gettext6.c): Likewise.
* io/Makefile (CFLAGS-open.c): Likewise.
(CFLAGS-open64.c): Likewise.
(CFLAGS-creat.c): Likewise.
(CFLAGS-creat64.c): Likewise.
(CFLAGS-fcntl.c): Likewise.
(CFLAGS-poll.c): Likewise.
(CFLAGS-ppoll.c): Likewise.
(CFLAGS-lockf.c): Likewise.
(CFLAGS-statfs.c): Likewise.
(CFLAGS-fstatfs.c): Likewise.
(CFLAGS-statvfs.c): Likewise.
(CFLAGS-fstatvfs.c): Likewise.
(CFLAGS-fts.c): Likewise.
(CFLAGS-fts64.c): Likewise.
(CFLAGS-ftw.c): Likewise.
(CFLAGS-ftw64.c): Likewise.
(CFLAGS-lockf.c): Likewise.
(CFLAGS-posix_fallocate.c): Likewise.
(CFLAGS-posix_fallocate64.c): Likewise.
(CFLAGS-fallocate.c): Likewise.
(CFLAGS-fallocate64.c): Likewise.
(CFLAGS-read.c): Likewise.
(CFLAGS-write.c): Likewise.
(CFLAGS-test-stat.c): Likewise.
(CFLAGS-test-lfs.c): Likewise.
* libio/Makefile (CFLAGS-fileops.c): Likewise.
(CFLAGS-fputc.c): Likewise.
(CFLAGS-fputwc.c): Likewise.
(CFLAGS-freopen64.c): Likewise.
(CFLAGS-freopen.c): Likewise.
(CFLAGS-fseek.c): Likewise.
(CFLAGS-fseeko64.c): Likewise.
(CFLAGS-fseeko.c): Likewise.
(CFLAGS-ftello64.c): Likewise.
(CFLAGS-ftello.c): Likewise.
(CFLAGS-fwide.c): Likewise.
(CFLAGS-genops.c): Likewise.
(CFLAGS-getc.c): Likewise.
(CFLAGS-getchar.c): Likewise.
(CFLAGS-getwc.c): Likewise.
(CFLAGS-getwchar.c): Likewise.
(CFLAGS-iofclose.c): Likewise.
(CFLAGS-iofflush.c): Likewise.
(CFLAGS-iofgetpos64.c): Likewise.
(CFLAGS-iofgetpos.c): Likewise.
(CFLAGS-iofgets.c): Likewise.
(CFLAGS-iofgetws.c): Likewise.
(CFLAGS-iofputs.c): Likewise.
(CFLAGS-iofputws.c): Likewise.
(CFLAGS-iofread.c): Likewise.
(CFLAGS-iofsetpos64.c): Likewise.
(CFLAGS-iofsetpos.c): Likewise.
(CFLAGS-ioftell.c): Likewise.
(CFLAGS-iofwrite.c): Likewise.
(CFLAGS-iogetdelim.c): Likewise.
(CFLAGS-iogetline.c): Likewise.
(CFLAGS-iogets.c): Likewise.
(CFLAGS-iogetwline.c): Likewise.
(CFLAGS-ioputs.c): Likewise.
(CFLAGS-ioseekoff.c): Likewise.
(CFLAGS-ioseekpos.c): Likewise.
(CFLAGS-iosetbuffer.c): Likewise.
(CFLAGS-iosetvbuf.c): Likewise.
(CFLAGS-ioungetc.c): Likewise.
(CFLAGS-ioungetwc.c): Likewise.
(CFLAGS-oldfileops.c): Likewise.
(CFLAGS-oldiofclose.c): Likewise.
(CFLAGS-oldiofgetpos64.c): Likewise.
(CFLAGS-oldiofgetpos.c): Likewise.
(CFLAGS-oldiofsetpos64.c): Likewise.
(CFLAGS-oldiofsetpos.c): Likewise.
(CFLAGS-peekc.c): Likewise.
(CFLAGS-putc.c): Likewise.
(CFLAGS-putchar.c): Likewise.
(CFLAGS-putwc.c): Likewise.
(CFLAGS-putwchar.c): Likewise.
(CFLAGS-rewind.c): Likewise.
(CFLAGS-wfileops.c): Likewise.
(CFLAGS-wgenops.c): Likewise.
(CFLAGS-oldiofopen.c): Likewise.
(CFLAGS-iofopen.c): Likewise.
(CFLAGS-iofopen64.c): Likewise.
(CFLAGS-oldtmpfile.c): Likewise.
(CFLAGS-tst_putwc.c): Likewise.
* locale/Makefile (CFLAGS-md5.c): Likewise.
(CFLAGS-charmap.c): Likewise.
(CFLAGS-locfile.c): Likewise.
(CFLAGS-charmap-dir.c): Likewise.
* login/Makefile (CFLAGS-grantpt.c): Likewise.
(CFLAGS-getpt.c): Likewise.
(CFLAGS-pt_chown.c): Likewise.
* malloc/Makefile (CFLAGS-mcheck-init.c): Likewise.
(CFLAGS-obstack.c): Likewise.
* math/Makefile (CFLAGS-test-tgmath3.c): Likewise.
(CFLAGS-test-double-vlen4-wrappers.c): Likewise.
(CFLAGS-test-double-vlen8-wrappers.c): Likewise.
(CFLAGS-test-float-vlen8-wrappers.c): Likewise.
(CFLAGS-test-float-vlen16-wrappers.c): Likewise.
(CFLAGS-test-tgmath.c): Likewise.
(CFLAGS-test-tgmath2.c): Likewise.
(CFLAGS-test-tgmath-ret.c): Likewise.
(CFLAGS-test-powl.c): Likewise.
(CFLAGS-test-snan.c): Likewise.
(CFLAGS-test-signgam-finite.c): Likewise.
(CFLAGS-test-signgam-finite-c99.c): Likewise.
(CFLAGS-test-signgam-finite-c11.c): Likewise.
(CFLAGS-test-signgam-uchar.c): Likewise.
(CFLAGS-test-signgam-uchar-init.c): Likewise.
(CFLAGS-test-signgam-uchar-static.c): Likewise.
(CFLAGS-test-signgam-uchar-init-static.c): Likewise.
(CFLAGS-test-signgam-uint.c): Likewise.
(CFLAGS-test-signgam-uint-init.c): Likewise.
(CFLAGS-test-signgam-uint-static.c): Likewise.
(CFLAGS-test-signgam-uint-init-static.c): Likewise.
(CFLAGS-test-signgam-ullong.c): Likewise.
(CFLAGS-test-signgam-ullong-init.c): Likewise.
(CFLAGS-test-signgam-ullong-static.c): Likewise.
(CFLAGS-test-signgam-ullong-init-static.c): Likewise.
(CFLAGS-test-math-cxx11.cc): Likewise.
(CFLAGS-test-math-isinff.cc): Likewise.
(CFLAGS-test-math-iszero.cc): Likewise.
(CFLAGS-test-math-issignaling.cc): Likewise.
(CFLAGS-test-math-iscanonical.cc): Likewise.
(CFLAGS-test-iszero-excess-precision.c): Likewise.
(CFLAGS-test-iseqsig-excess-precision.c): Likewise.
(CFLAGS-test-flt-eval-method.c): Likewise.
(CFLAGS-test-fe-snans-always-signal.c): Likewise.
(CFLAGS-test-finite-macros.c): Likewise.
* misc/Makefile (CFLAGS-select.c): Likewise.
(CFLAGS-tsearch.c): Likewise.
(CFLAGS-lsearch.c): Likewise.
(CFLAGS-pselect.c): Likewise.
(CFLAGS-readv.c): Likewise.
(CFLAGS-writev.c): Likewise.
(CFLAGS-preadv.c): Likewise.
(CFLAGS-preadv64.c): Likewise.
(CFLAGS-pwritev.c): Likewise.
(CFLAGS-pwritev64.c): Likewise.
(CFLAGS-preadv2.c): Likewise.
(CFLAGS-preadv64v2.c): Likewise.
(CFLAGS-pwritev2.c): Likewise.
(CFLAGS-pwritev64v2.c): Likewise.
(CFLAGS-usleep.c): Likewise.
(CFLAGS-syslog.c): Likewise.
(CFLAGS-error.c): Likewise.
(CFLAGS-getpass.c): Likewise.
(CFLAGS-mkstemp.c): Likewise.
(CFLAGS-mkstemp64.c): Likewise.
(CFLAGS-getsysstats.c): Likewise.
(CFLAGS-getusershell.c): Likewise.
(CFLAGS-err.c): Likewise.
(CFLAGS-tst-tsearch.c): Likewise.
(CFLAGS-msync.c): Likewise.
(CFLAGS-fdatasync.c): Likewise.
(CFLAGS-fsync.c): Likewise.
* nptl/Makefile (CFLAGS-nptl-init.c): Likewise.
(CFLAGS-unwind.c): Likewise.
(CFLAGS-unwind-forcedunwind.c): Likewise.
(CFLAGS-pthread_cancel.c): Likewise.
(CFLAGS-pthread_setcancelstate.c): Likewise.
(CFLAGS-pthread_setcanceltype.c): Likewise.
(CFLAGS-cancellation.c): Likewise.
(CFLAGS-libc-cancellation.c): Likewise.
(CFLAGS-pthread_exit.c): Likewise.
(CFLAGS-forward.c): Likewise.
(CFLAGS-pthread_testcancel.c): Likewise.
(CFLAGS-pthread_join.c): Likewise.
(CFLAGS-pthread_timedjoin.c): Likewise.
(CFLAGS-pthread_once.c): Likewise.
(CFLAGS-pthread_cond_wait.c): Likewise.
(CFLAGS-sem_wait.c): Likewise.
(CFLAGS-sem_timedwait.c): Likewise.
(CFLAGS-fcntl.c): Likewise.
(CFLAGS-lockf.c): Likewise.
(CFLAGS-pread.c): Likewise.
(CFLAGS-pread64.c): Likewise.
(CFLAGS-pwrite.c): Likewise.
(CFLAGS-pwrite64.c): Likewise.
(CFLAGS-wait.c): Likewise.
(CFLAGS-waitpid.c): Likewise.
(CFLAGS-sigwait.c): Likewise.
(CFLAGS-msgrcv.c): Likewise.
(CFLAGS-msgsnd.c): Likewise.
(CFLAGS-tcdrain.c): Likewise.
(CFLAGS-open.c): Likewise.
(CFLAGS-open64.c): Likewise.
(CFLAGS-pause.c): Likewise.
(CFLAGS-recv.c): Likewise.
(CFLAGS-send.c): Likewise.
(CFLAGS-accept.c): Likewise.
(CFLAGS-sendto.c): Likewise.
(CFLAGS-connect.c): Likewise.
(CFLAGS-recvfrom.c): Likewise.
(CFLAGS-recvmsg.c): Likewise.
(CFLAGS-sendmsg.c): Likewise.
(CFLAGS-close.c): Likewise.
(CFLAGS-read.c): Likewise.
(CFLAGS-write.c): Likewise.
(CFLAGS-nanosleep.c): Likewise.
(CFLAGS-sigsuspend.c): Likewise.
(CFLAGS-msync.c): Likewise.
(CFLAGS-fdatasync.c): Likewise.
(CFLAGS-fsync.c): Likewise.
(CFLAGS-pt-system.c): Likewise.
(CFLAGS-tst-cleanup2.c): Likewise.
(CFLAGS-tst-cleanupx2.c): Likewise.
(CFLAGS-flockfile.c): Likewise.
(CFLAGS-ftrylockfile.c): Likewise.
(CFLAGS-funlockfile.c): Likewise.
(CFLAGS-tst-initializers1.c): Likewise.
(CFLAGS-tst-initializers1-c89.c): Likewise.
(CFLAGS-tst-initializers1-c99.c): Likewise.
(CFLAGS-tst-initializers1-c11.c): Likewise.
(CFLAGS-tst-initializers1-gnu89.c): Likewise.
(CFLAGS-tst-initializers1-gnu99.c): Likewise.
(CFLAGS-tst-initializers1-gnu11.c): Likewise.
* nscd/Makefile (CFLAGS-nscd_getpw_r.c): Likewise.
(CFLAGS-nscd_getgr_r.c): Likewise.
(CFLAGS-nscd_gethst_r.c): Likewise.
(CFLAGS-nscd_getai.c): Likewise.
(CFLAGS-nscd_initgroups.c): Likewise.
* posix/Makefile (CFLAGS-getaddrinfo.c): Likewise.
(CFLAGS-pause.c): Likewise.
(CFLAGS-pread.c): Likewise.
(CFLAGS-pread64.c): Likewise.
(CFLAGS-pwrite.c): Likewise.
(CFLAGS-pwrite64.c): Likewise.
(CFLAGS-sleep.c): Likewise.
(CFLAGS-wait.c): Likewise.
(CFLAGS-waitid.c): Likewise.
(CFLAGS-waitpid.c): Likewise.
(CFLAGS-getopt.c): Likewise.
(CFLAGS-wordexp.c): Likewise.
(CFLAGS-sysconf.c): Likewise.
(CFLAGS-pathconf.c): Likewise.
(CFLAGS-fpathconf.c): Likewise.
(CFLAGS-spawn.c): Likewise.
(CFLAGS-spawnp.c): Likewise.
(CFLAGS-spawni.c): Likewise.
(CFLAGS-glob.c): Likewise.
(CFLAGS-glob64.c): Likewise.
(CFLAGS-getconf.c): Likewise.
(CFLAGS-nanosleep.c): Likewise.
* pwd/Makefile (CFLAGS-getpwent_r.c): Likewise.
(CFLAGS-getpwent.c): Likewise.
(CFLAGS-getpw.c): Likewise.
(CFLAGS-fgetpwent_r.c): Likewise.
* resolv/Makefile (CFLAGS-res_hconf.c): Likewise.
* rt/Makefile (CFLAGS-aio_suspend.c): Likewise.
(CFLAGS-mq_timedreceive.c): Likewise.
(CFLAGS-mq_timedsend.c): Likewise.
(CFLAGS-clock_nanosleep.c): Likewise.
(CFLAGS-librt-cancellation.c): Likewise.
* shadow/Makefile (CFLAGS-getspent_r.c): Likewise.
(CFLAGS-getspent.c): Likewise.
(CFLAGS-fgetspent.c): Likewise.
(CFLAGS-fgetspent_r.c): Likewise.
(CFLAGS-putspent.c): Likewise.
(CFLAGS-getspnam.c): Likewise.
(CFLAGS-getspnam_r.c): Likewise.
* signal/Makefile (CFLAGS-sigpause.c): Likewise.
(CFLAGS-sigsuspend.c): Likewise.
(CFLAGS-sigtimedwait.c): Likewise.
(CFLAGS-sigwait.c): Likewise.
(CFLAGS-sigwaitinfo.c): Likewise.
(CFLAGS-sigreturn.c): Likewise.
* stdio-common/Makefile (CFLAGS-vfprintf.c): Likewise.
(CFLAGS-vfwprintf.c): Likewise.
(CFLAGS-tmpfile.c): Likewise.
(CFLAGS-tmpfile64.c): Likewise.
(CFLAGS-tempname.c): Likewise.
(CFLAGS-psignal.c): Likewise.
(CFLAGS-vprintf.c): Likewise.
(CFLAGS-cuserid.c): Likewise.
(CFLAGS-errlist.c): Likewise.
(CFLAGS-siglist.c): Likewise.
(CFLAGS-scanf15.c): Likewise.
(CFLAGS-scanf17.c): Likewise.
* stdlib/Makefile (CFLAGS-bsearch.c): Likewise.
(CFLAGS-msort.c): Likewise.
(CFLAGS-qsort.c): Likewise.
(CFLAGS-system.c): Likewise.
(CFLAGS-fmtmsg.c): Likewise.
(CFLAGS-strfmon.c): Likewise.
(CFLAGS-strfmon_l.c): Likewise.
(CFLAGS-strfromd.c): Likewise.
(CFLAGS-strfromf.c): Likewise.
(CFLAGS-strfroml.c): Likewise.
(CFLAGS-tst-bsearch.c): Likewise.
(CFLAGS-tst-qsort.c): Likewise.
(CFLAGS-tst-makecontext2.c): Likewise.
* sunrpc/Makefile (CFLAGS-xbootparam_prot.c): Likewise.
(CFLAGS-xnlm_prot.c): Likewise.
(CFLAGS-xrstat.c): Likewise.
(CFLAGS-xyppasswd.c): Likewise.
(CFLAGS-xklm_prot.c): Likewise.
(CFLAGS-xrex.c): Likewise.
(CFLAGS-xsm_inter.c): Likewise.
(CFLAGS-xmount.c): Likewise.
(CFLAGS-xrusers.c): Likewise.
(CFLAGS-xspray.c): Likewise.
(CFLAGS-xnfs_prot.c): Likewise.
(CFLAGS-xrquota.c): Likewise.
(CFLAGS-xkey_prot.c): Likewise.
(CFLAGS-auth_unix.c): Likewise.
(CFLAGS-key_call.c): Likewise.
(CFLAGS-pmap_rmt.c): Likewise.
(CFLAGS-clnt_perr.c): Likewise.
(CFLAGS-openchild.c): Likewise.
* sysvipc/Makefile (CFLAGS-msgrcv.c): Likewise.
(CFLAGS-msgsnd.c): Likewise.
* termios/Makefile (CFLAGS-tcdrain.c): Likewise.
* time/Makefile (CFLAGS-tzfile.c): Likewise.
(CFLAGS-tzset.c): Likewise.
(CFLAGS-getdate.c): Likewise.
(CFLAGS-test_time.c): Likewise.
(CPPFLAGS-tst-tzname.c): Likewise.
* timezone/Makefile (CFLAGS-zdump.c): Likewise.
(CFLAGS-zic.c): Likewise.
* wcsmbs/Makefile (CFLAGS-wcwidth.c): Likewise.
(CFLAGS-wcswidth.c): Likewise.
(CFLAGS-wcstol.c): Likewise.
(CFLAGS-wcstoul.c): Likewise.
(CFLAGS-wcstoll.c): Likewise.
(CFLAGS-wcstoull.c): Likewise.
(CFLAGS-wcstod.c): Likewise.
(CFLAGS-wcstold.c): Likewise.
(CFLAGS-wcstof128.c): Likewise.
(CFLAGS-wcstof.c): Likewise.
(CFLAGS-wcstol_l.c): Likewise.
(CFLAGS-wcstoul_l.c): Likewise.
(CFLAGS-wcstoll_l.c): Likewise.
(CFLAGS-wcstoull_l.c): Likewise.
(CFLAGS-wcstod_l.c): Likewise.
(CFLAGS-wcstold_l.c): Likewise.
(CFLAGS-wcstof128_l.c): Likewise.
(CFLAGS-wcstof_l.c): Likewise.
(CPPFLAGS-tst-wchar-h.c): Likewise.
(CPPFLAGS-wcstold_l.c): Likewise.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
|
| |
|
|
|
|
| |
Also adjust parts of the time subdirectory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building with current GCC mainline fails with:
strftime_l.c: In function '__strftime_internal':
strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros]
digits = d > width ? d : width; \
^
strftime_l.c:1260:6: note: in expansion of macro 'DO_NUMBER'
DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
^~~~~~~~~
strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this 'else' clause
else
^~~~
In fact this particular instance is harmless; the code looks like:
if (modifier == L_('O'))
goto bad_format;
else
DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
and because of the goto, it doesn't matter that part of the expansion
isn't under the "else" conditional. But it's also clearly bad style
to rely on that. This patch changes DO_NUMBER and DO_NUMBER_SPACEPAD
to use do { } while (0) to avoid such problems.
Tested (full testsuite) for x86_64 (GCC 6), and with
build-many-glibcs.py with GCC mainline, in conjunction with my libgcc
patch <https://gcc.gnu.org/ml/gcc-patches/2017-06/msg02032.html>.
* time/strftime_l.c (DO_NUMBER): Define using do { } while (0).
(DO_NUMBER_SPACEPAD): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t. Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.
* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
* include/monetary.h, include/stdlib.h, include/time.h
* include/wchar.h, locale/duplocale.c, locale/freelocale.c
* locale/global-locale.c, locale/langinfo.h, locale/locale.h
* locale/localeinfo.h, locale/newlocale.c
* locale/nl_langinfo_l.c, locale/uselocale.c
* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* string/strcasecmp.c, string/strcoll_l.c, string/string.h
* string/strings.h, string/strncase.c, string/strxfrm_l.c
* sysdeps/ieee754/float128/strtof128_l.c
* sysdeps/ieee754/float128/wcstof128.c
* sysdeps/ieee754/float128/wcstof128_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
* sysdeps/x86_64/strcasecmp_l-nonascii.c
* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
* wctype/towctrans_l.c, wctype/wcfuncs_l.c
* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
Change all uses of __locale_t to locale_t.
|