Collin Funk [Wed, 21 Feb 2024 16:54:51 +0000 (08:54 -0800)]
gnulib-tool.py: Fix undefined variable while emitting testdir.
* pygnulib/GLTestDir.py (GLTestDir.execute): Fix undefined
variable refrence caused by commit 01cd78f9d682ff75cc5ab1c2d21b911bdd9215b8.
Restore the previous auxdir when finished writing the
configure.ac file in the test directory.
Bruno Haible [Wed, 21 Feb 2024 14:49:23 +0000 (15:49 +0100)]
*printf-posix: Disable support for the 'n' directive by default.
* m4/printf-with-n-directive.m4: New file.
* modules/printf-with-n-directive: New file.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): If
gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the value of the
gl_cv_func_printf_directive_n variable.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): If
gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the values of the
gl_cv_func_printf_directive_n and gl_cv_func_snprintf_directive_n
variables.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
* lib/printf-parse.c (PRINTF_PARSE): If NEED_PRINTF_WITH_N_DIRECTIVE is
not defined, treat the 'n' directive like an unknown directive.
* lib/vasnprintf.c (VASNPRINTF): If NEED_PRINTF_WITH_N_DIRECTIVE is not
defined, disable the processing of the 'n' directive.
* tests/test-snprintf-posix.h (test_function): If
NEED_PRINTF_WITH_N_DIRECTIVE is not defined, skip the %n test.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/posix-functions/dprintf.texi: Mention that support for the 'n'
directive is only enabled together with the module
'printf-with-n-directive'.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
* NEWS: Mention the change.
Bruno Haible [Tue, 20 Feb 2024 23:59:05 +0000 (00:59 +0100)]
unimetadata/u-version: New module.
* lib/gen-uni-tables.c (output_version): New function.
(main): Invoke it.
* lib/unimetadata/u-version.c: New generated file.
* modules/unimetadata/u-version: New file.
Jim Meyering [Mon, 19 Feb 2024 04:23:28 +0000 (20:23 -0800)]
maint.mk: improve new syntax-check rule
* top/maint.mk (sc_prefer_angle_bracket_headers): Rename from
sc_verify_absolute_include_headers. Simplify to run a single
invocation of grep, rather than usually many. Derive a regular
expression matching the selected headers, and warn about any
offending matches via what is usually a single grep invocation.
Collin Funk [Mon, 19 Feb 2024 00:52:45 +0000 (16:52 -0800)]
gnulib-tool.py: Fix function call on incorrect object.
* pygnulib/GLImport.py: Call checkInclTestCategory on the
GLConfig member instead of the GLImport object itself.
* pygnulib/__init__.py: Update copyright dates.
* pygnulib/constants.py: Update copyright dates.
Bruno Haible [Thu, 15 Feb 2024 19:47:28 +0000 (20:47 +0100)]
localename-unsafe-limited: New module.
* m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro.
* modules/localename-unsafe-limited: New file.
* modules/localename-unsafe (Depends-on): Add localename-unsafe-limited.
(Makefile.am): Compile localename-unsafe.c only if the module
localename-unsafe-limited does not already do it.
Bruno Haible [Thu, 15 Feb 2024 08:47:08 +0000 (09:47 +0100)]
setlocale-null: Refactor.
* lib/setlocale_null.c
(setlocale_null_r_with_lock): Renamed from setlocale_null_with_lock.
(setlocale_null_r_unlocked): Renamed from setlocale_null_unlocked.
(setlocale_null_unlocked): Renamed from setlocale_null_androidfix.
Bruno Haible [Thu, 15 Feb 2024 18:23:25 +0000 (19:23 +0100)]
localename-unsafe: New module.
* lib/localename.h (gl_locale_name_unsafe, gl_locale_name_thread_unsafe,
gl_locale_name_posix_unsafe): New declarations.
* lib/localename-unsafe.c: New file, based on lib/localename.c.
(gl_locale_name_thread_unsafe): Renamed from gl_locale_name_thread.
(gl_locale_name_posix_unsafe): Renamed from gl_locale_name_posix.
(gl_locale_name_unsafe): Renamed from gl_locale_name.
(struniq): Define only on platforms that need it.
* lib/localename.c: Remove code that was moved to
lib/localename-unsafe.c.
(gl_locale_name_thread): Just call gl_locale_name_thread_unsafe and
struniq.
(gl_locale_name_posix): Just call gl_locale_name_posix_unsafe and
struniq.
* lib/locale.in.h: Test @GNULIB_LOCALENAME_UNSAFE@ instead of
@GNULIB_LOCALENAME@.
* m4/locale_h.m4 (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize
GNULIB_LOCALENAME_UNSAFE instead of GNULIB_LOCALENAME.
* modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME_UNSAFE
instead of GNULIB_LOCALENAME.
* m4/localename.m4 (gl_LOCALENAME_UNSAFE): Renamed from gl_LOCALENAME.
* modules/localename-unsafe: New file, based on modules/localename.
* modules/localename: Greatly simplify.
(Depends-on): Add localename-unsafe.
Bruno Haible [Thu, 15 Feb 2024 15:00:59 +0000 (16:00 +0100)]
localename: Speed up lookup of the LC_MESSAGES name on AIX ≥ 7.2.
* m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): On AIX, test
for the 'locale_name' member.
* lib/localename.c (get_locale_t_name): For the LC_MESSAGES category,
use the 'locale_name' member if available.
Bruno Haible [Thu, 15 Feb 2024 09:48:50 +0000 (10:48 +0100)]
localename: Add parameter validation.
* lib/localename.c (get_locale_t_name, gl_locale_name_thread_unsafe,
gl_locale_name_thread, gl_locale_name_posix, gl_locale_name): Verify
that the category argument is not LC_ALL.
Bruno Haible [Wed, 14 Feb 2024 22:16:15 +0000 (23:16 +0100)]
Improve support of Citrus/FreeBSD iconv.
* lib/striconveh.c (iconveh_open): Use //TRANSLIT with all iconv
implementations that support it.
* lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
* lib/propername.c (proper_name_utf8): Likewise.
Paul Eggert [Wed, 14 Feb 2024 06:29:27 +0000 (22:29 -0800)]
nstrftime: allow opt-out of AM/PM adjustment
For Emacs I would rather avoid bringing in the Gnulib locking code,
since Emacs has its own idea about locks and its main engine is
single-threaded anyway.
Provide a way to use the nstrftime module while avoiding its
recently-added localename dependency, which entails locking code.
(It’s not clear to me that the locking code is needed for nstrftime,
as NetBSD has strftime_z and Solaris locales could be inspected in
some thread-safe way, e.g., by probing strftime month names.
Anyway, all that’s more hassle than I want to put up with right now
for the trivial matter of AM/PM behavior.)
* lib/strftime.c (REQUIRE_GNUISH_STRFTIME_AM_PM):
New macro, which can be overridden by config.h.
(should_remove_ampm, __strftime_internal):
Use it instead of !USE_C_LOCALE when deciding to
implement Gnuish AM/PM behavior.
* m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Pass
a pointer of the correct type to pthread_mutex_timedlock.
* m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Pass a pointer of the correct
type to pthread_spin_init.
Bruno Haible [Sun, 11 Feb 2024 10:23:14 +0000 (11:23 +0100)]
time_r: Add tests.
* lib/time_r.c: Add comment.
* tests/test-gmtime_r.c: New file.
* tests/test-gmtime_r-mt.c: New file, based on
tests/test-nl_langinfo-mt.c.
* tests/test-localtime_r.c: New file.
* tests/test-localtime_r-mt.c: New file, based on
tests/test-nl_langinfo-mt.c.
* modules/time_r-tests: New file.
Paul Eggert [Sun, 11 Feb 2024 01:53:34 +0000 (17:53 -0800)]
doc: improve warnings about ctime etc.
* doc/posix-functions/asctime.texi (asctime):
* doc/posix-functions/asctime_r.texi (asctime_r):
Say why these functions are typically used mistakenly.
* doc/posix-functions/ctime.texi (ctime):
* doc/posix-functions/ctime_r.texi (ctimef):
Say that they can dump core due to an internal null pointer, too.
* doc/posix-functions/ctime.texi (ctime):
Don’t recommend ctime_r.
Bruno Haible [Fri, 9 Feb 2024 19:42:53 +0000 (20:42 +0100)]
ctime, localtime, tzset, wcsftime: Make multithread-safe.
* lib/ctime.c: Include <wchar.h>.
(rpl_ctime): Modify _environ and _wenviron without using _putenv.
* lib/localtime.c: Include <wchar.h>.
(rpl_localtime): Modify _environ and _wenviron without using _putenv.
* lib/tzset.c: Include <wchar.h>.
(rpl_tzset): Modify _environ and _wenviron without using _putenv.
* lib/wcsftime.c (rpl_wcsftime): Likewise.
Bruno Haible [Thu, 8 Feb 2024 14:34:34 +0000 (15:34 +0100)]
nstrtime: Fix %p, %P, %r directives' results on NetBSD, Solaris.
* lib/strftime.c: Include <locale.h>, localename.h.
(should_remove_ampm): New function.
(__strftime_internal): On NetBSD and Solaris, remove the AM/PM indicator
from the %p, %r directives' results in specific locales.
* modules/nstrftime (Depends-on): Add localename.
* tests/test-nstrftime.h (locales_test): Update the expected result of
the %r directive.
* doc/posix-functions/strftime.texi: Mention the problem of the %p and
%r directives on NetBSD and Solaris.
Bruno Haible [Thu, 8 Feb 2024 00:24:12 +0000 (01:24 +0100)]
c-nstrftime: Add tests.
* tests/test-c-nstrftime.c: New file, based on tests/test-nstrftime.c.
* tests/test-c-nstrftime-1.sh: New file, based on
tests/test-nstrftime-1.sh.
* tests/test-c-nstrftime-2.sh: New file, based on
tests/test-nstrftime-2.sh.
* modules/c-nstrftime-tests: New file.
Bruno Haible [Thu, 8 Feb 2024 00:09:08 +0000 (01:09 +0100)]
c-nstrftime: New module.
Suggested by Paul Eggert.
* lib/strftime.h (c_nstrftime): New declaration.
* lib/c-nstrftime.c: New file.
* lib/strftime.c (FPRINTFTIME): Move fallback definition before its
first use.
(USE_C_LOCALE): Add fallback definition.
If USE_C_LOCALE is set, include c-ctype.h instead of <ctype.h>.
Conditionally include <locale.h>.
(TOUPPER, TOLOWER): Define differently if USE_C_LOCALE is set.
(c_locale_cache, c_locale): New definitions, copied from lib/c-strtod.c.
(c_weekday_names, c_month_names): New variables, based on
glibc/time/strftime_l.c.
(__strftime_internal): Define a_wkday, aw_len, f_wkday, a_month, am_len,
f_month, ampm, ap_len differently for USE_C_LOCALE. Avoid a
'goto underlying_strftime' if USE_C_LOCALE && !HAVE_STRFTIME_L. Make the
strftime fallback declaration ISO C 23 compliant. If USE_C_LOCALE, use
strftime_l() with the C locale object instead of strftime().
* m4/c-nstrftime.m4: New file, based on m4/nstrftime.m4.
* modules/c-nstrftime: New file, based on modules/nstrftime.
Bruno Haible [Wed, 7 Feb 2024 22:53:09 +0000 (23:53 +0100)]
nstrftime: Add tests of all directives, also in non-trivial locales.
* tests/test-nstrftime.h (language_t): New type.
(locales_test): New function.
* tests/test-nstrftime.c: Include <locale.h>, <stdlib.h>.
(main): Invoke setlocale and locales_test.
* tests/test-nstrftime-1.sh: New file.
* tests/test-nstrftime-2.sh: New file, based on tests/test-strtod1.sh.
* modules/nstrftime-tests (Files): Add them. Add m4/locale-fr.m4,
m4/codeset.m4, m4/musl.m4.
(configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8, gl_MUSL_LIBC.
(Makefile.am): Link test-nstrftime with $(SETLOCALE_LIB). Test
test-nstrftime-*.sh instead of test-nstrftime.
Paul Eggert [Wed, 7 Feb 2024 21:01:09 +0000 (13:01 -0800)]
Assume ‘long long’ support
* modules/strtoimax, modules/strtoumax (Depends-on):
Assume the compiler supports ‘long long’.
This was overlooked in the 2019-12-22 patch
<https://lists.gnu.org/r/bug-gnulib/2019-12/msg00190.html>.
Bruno Haible [Wed, 7 Feb 2024 11:38:44 +0000 (12:38 +0100)]
nstrftime tests: Allow reuse with another function.
* tests/test-nstrftime.h: New file, extracted from
tests/test-nstrftime.c.
(FUNC_NAME, STRINGIFY): New macros.
(posixtm_test, tzalloc_test, quarter_test, errno_test): Use FUNC or
FUNC_NAME instead of nstrftime.
(quarter_test): Rename local variable 'result' to 'fail'.
* tests/test-nstrftime.c: Remove code that moved to test-nstrftime.h.
Include test-nstrftime.h.
(STREQ): Remove redundant macro.
* modules/nstrftime-tests (Files): Add tests/test-nstrftime.h.
Bruno Haible [Tue, 6 Feb 2024 20:59:01 +0000 (21:59 +0100)]
nl_langinfo: Fix fallback list of month names (regression 2014-07-07).
* lib/nl_langinfo.c (nl_langinfo): In the implementation for native
Windows, fix the results for MON_8..MON_12, ALTMON_8..ALTMON_12,
ABMON_8..ABMON_12.
Paul Eggert [Tue, 6 Feb 2024 06:48:29 +0000 (22:48 -0800)]
ctime: improve doc
* doc/posix-functions/asctime.texi (asctime):
* doc/posix-functions/asctime_r.texi (asctime_r):
* doc/posix-functions/ctime_r.texi (ctime_r):
* doc/posix-functions/ctime.texi (ctime):
Mention locale problem of strftime more consistently. Improve
wording. For ctime and ctime_r, mention that localtime_r can
fail.
* doc/posix-functions/ctime.texi (ctime): Move history section
to end and spiff up a bit.
* doc/posix-functions/ctime_r.texi (ctime_r): Omit commentary that
assumes traditional SunOS ctime_r API; it was confusing and not
useful for Gnulib apps, which assume the POSIX API.
Paul Eggert [Sun, 4 Feb 2024 07:53:13 +0000 (23:53 -0800)]
xalloc-oversized: omit unnecessary cast
* lib/xalloc-oversized.h (__xalloc_oversized): Omit unnecessary
cast of a positive in-range value to size_t. This seems to be
left over from an older version of the code.
Paul Eggert [Sat, 3 Feb 2024 20:05:17 +0000 (12:05 -0800)]
ctime: fix false positive
Problem reported by Bjarni Ingi Gislason in:
https://lists.gnu.org/r/bug-gnulib/2024-02/msg00006.html
* lib/time.in.h (ctime): Do not warn about ctime portability,
as there is a more serious warning about it crashing,
and the two warning directives can cause false alarms.
Bruno Haible [Tue, 30 Jan 2024 16:08:49 +0000 (17:08 +0100)]
Update to Unicode 15.1.0.
* lib/gen-uni-tables.c (PROP_SENTENCE_TERMINAL): Renamed from
PROP_STERM.
(PROP_IDS_UNARY_OPERATOR, PROP_ID_COMPAT_MATH_CONTINUE,
PROP_ID_COMPAT_MATH_START): New enum items.
(UC_INDIC_CONJUNCT_BREAK_*): New enum items.
(unicode_indic_conjunct_break): New variable.
(fill_properties): Rename local variable propvalue to propcode. Handle
the properties IDS_Unary_Operator, ID_Compat_Math_Continue,
ID_Compat_Math_Start. Parse the InCB values from file
DerivedCoreProperties.txt.
(indic_conjunct_break_as_c_identifier,
output_indic_conjunct_break_test): New functions.
(indic_conjunct_break_table): New variable.
(output_indic_conjunct_break): New function.
(fill_width): Accept spaces at the end of field0 and at the start and
end of field1.
(LBP_QU1, LBP_QU2, LBP_QU3): New enum items, for Unicode TR #14 rules
(LB15a) and (LB15b).
(LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
scripts.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
(debug_output_lbp): Print either LBP_QU1 or LBP_QU2 or LBP_QU3 as
LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
(fill_org_lbp): Accept spaces at the end of field0 and at the start and
end of field1. Recognize LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
(debug_output_org_lbp): Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
(lbp_value_to_string): Handle LBP_QU1, LBP_QU2, LBP_QU3 instead of
LBP_QU. Handle LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF.
(output_lbrk_rules_as_tables): Treat LBP_QU as macro that maps to three
table rows/columns. Replace rule (LB15) with rules (LB15b) and (LB15a).
(get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
(main): Invoke output_indic_conjunct_break_test and
output_indic_conjunct_break.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* lib/unilbrk/lbrktables.h (LBP_QU1, LBP_QU2, LBP_QU3): New enum items,
for Unicode TR #14 rules (LB15a) and (LB15b).
(LBP_QU): Remove enum item.
(LBP_AP, LBP_AK, LBP_AS, LBP_VI, LBP_VF): New enum items, for Brahmic
scripts.
(unilbrk_table): Update array bounds.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
Conditionally replace LBP_QU2 with LBP_QU1, for rule (LB15a).
Conditionally replace LBP_QU3 with LBP_QU1, for rule (LB15b).
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
Likewise.
* lib/unictype.in.h (UC_INDIC_CONJUNCT_BREAK_*): New enum values.
(uc_indic_conjunct_break_name, uc_indic_conjunct_break_byname,
uc_indic_conjunct_break): New declarations.
* lib/unictype/incb_byname.c: New file.
* lib/unictype/incb_byname.gperf: New file.
* lib/unictype/incb_name.c: New file.
* lib/unictype/incb_name.h: New file.
* lib/unictype/incb_of.c: New file.
* lib/unictype/incb_of.h: New generated file.
* modules/unictype/incb-all: New file.
* modules/unictype/incb-byname: New file.
* modules/unictype/incb-name: New file.
* modules/unictype/incb-of: New file.
* tests/unictype/test-incb_byname.c: New file.
* tests/unictype/test-incb_name.c: New file.
* tests/unictype/test-incb_of.c: New file.
* tests/unictype/test-incb_of.h: New generated file.
* modules/unictype/incb-byname-tests: New file.
* modules/unictype/incb-name-tests: New file.
* modules/unictype/incb-of-tests: New file.
Bruno Haible [Tue, 30 Jan 2024 16:03:05 +0000 (17:03 +0100)]
gen-uni-tables: Refactor, based on UAX #14 version 49.
* lib/gen-uni-tables.c (get_lbp): Reorder, based on
<https://www.unicode.org/reports/tr14/tr14-49.html#DescriptionOfProperties>.
For LBP_EB, use the "emoji modifier base" property.
Bruno Haible [Tue, 30 Jan 2024 16:00:44 +0000 (17:00 +0100)]
unigbrk tests: Tweak error reporting.
* tests/unigbrk/test-ulc-grapheme-breaks.c (main): Print byte values in
upper-case hexadecimal.
* tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
Print unit values in upper-case hexadecimal.
* tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
Print unit values with at least 4 hexadecimal digits.
* tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
Likewise.
* tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
Print characters with at least 4 hexadecimal digits.
Patrice Dumas [Mon, 29 Jan 2024 17:39:44 +0000 (18:39 +0100)]
gendocs: get only targetted manual source and includes, when possible
* build-aux/gendocs.sh: if makeinfo, based on version, has the
--trace-includes option, gather only the targetted manual srcfile and
the included files obtained with makeinfo --trace-includes. In that
case output include files to tar stdin and use -T-. Bruno Haible for
the version comparison and use of tar.
Bruno Haible [Mon, 29 Jan 2024 17:26:41 +0000 (18:26 +0100)]
Port FALLTHROUGH to Mac OS X 10.9.
Report and fix by Ryan Carsten Schmidt <gnulib@ryandesign.com>
at <https://savannah.gnu.org/bugs/?63866>.
* m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_HAS_ATTRIBUTE, don't use
__has_attribute for Apple clang versions < 7000000.
* lib/cdefs.h (__glibc_has_attribute): Don't use __has_attribute for
Apple clang versions < 7000000.
Bruno Haible [Sun, 28 Jan 2024 19:23:10 +0000 (20:23 +0100)]
host-cpu-c-abi: Let gl_HOST_CPU_C_ABI_32BIT never return 'unknown'.
Reported by Mohammad-Reza Nabipoor <mnabipoor@gnu.org>.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Use the list of
always-32-bit CPUs and the list of always-64-bit CPUs also when
gl_HOST_CPU_C_ABI has already been run. As a fallback, use a test of
'sizeof (void *)' to always return 'yes' or 'no', never 'unknown'.
Bruno Haible [Fri, 26 Jan 2024 00:12:08 +0000 (01:12 +0100)]
execute tests: Avoid test failure on macOS 14.
Reported by Guangyu Li <gl343@cornell.edu> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-01/msg00006.html>.
* tests/test-execute-main.c (main): In the tests 17, 18, 19, 20, use the
file descriptors 15, 16 instead of 10, 11, respectively.
* tests/test-execute-child.c (main): Likewise.
Bruno Haible [Thu, 25 Jan 2024 23:55:45 +0000 (00:55 +0100)]
Resolve conflicts for functions introduced in Android API level 35.
* lib/time.in.h (timespec_getres): Consider REPLACE_TIMESPEC_GETRES.
* m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GETRES.
* modules/time-h (Makefile.am): Substitute REPLACE_TIMESPEC_GETRES.
* m4/timespec_getres.m4 (gl_FUNC_TIMESPEC_GETRES): Test for
timespec_getres using gl_CHECK_FUNCS_ANDROID instead of
AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_TIMESPEC_GETRES.
* modules/timespec_getres (Depends-on, configure.ac): Consider
REPLACE_TIMESPEC_GETRES.
* m4/gettime.m4 (gl_GETTIME_RES): Test for timespec_getres using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* doc/posix-functions/timespec_getres.texi: Mention the Android API
levels.
Bruno Haible [Thu, 25 Jan 2024 23:18:55 +0000 (00:18 +0100)]
Resolve conflicts for functions introduced in Android API level 34.
* m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): On platforms without
glibc, test for copy_file_range using gl_CHECK_FUNCS_ANDROID instead of
AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_COPY_FILE_RANGE.
* doc/glibc-functions/copy_file_range.texi: Mention the Android API
levels.
Bruno Haible [Thu, 25 Jan 2024 23:18:52 +0000 (00:18 +0100)]
Resolve conflicts for functions introduced in Android API level 34.
* m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for
posix_spawn_file_actions_addchdir_np and
posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.
* m4/posix_spawn_faction_addchdir.m4
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for
posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.
* m4/posix_spawn_faction_addfchdir.m4
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for
posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.
* doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
the Android API levels.
* doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
Likewise.
Bruno Haible [Thu, 25 Jan 2024 23:18:45 +0000 (00:18 +0100)]
Resolve conflicts for functions introduced in Android API level 34.
* m4/freadahead.m4 (gl_FUNC_FREADAHEAD): Test for __freadahead using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* lib/freadahead.h: Update comment.