diff options
516 files changed, 3347 insertions, 11098 deletions
| @@ -52,6 +52,7 @@ NP-VERSION-FILE | |||
| 52 | 52 | ||
| 53 | # /gl/ | 53 | # /gl/ |
| 54 | /gl/.deps | 54 | /gl/.deps |
| 55 | /gl/*/.deps | ||
| 55 | /gl/alloca.h | 56 | /gl/alloca.h |
| 56 | /gl/arpa | 57 | /gl/arpa |
| 57 | /gl/arpa_inet.h | 58 | /gl/arpa_inet.h |
| @@ -93,9 +94,17 @@ NP-VERSION-FILE | |||
| 93 | /gl/wctype.h | 94 | /gl/wctype.h |
| 94 | /gl/inttypes.h | 95 | /gl/inttypes.h |
| 95 | /gl/limits.h | 96 | /gl/limits.h |
| 97 | /gl/pthread.h | ||
| 98 | /gl/sched.h | ||
| 99 | /gl/uchar.h | ||
| 100 | /gl/unicase.h | ||
| 101 | /gl/unictype.h | ||
| 102 | /gl/uninorm.h | ||
| 103 | /gl/unitypes.h | ||
| 104 | /gl/uniwidth.h | ||
| 105 | /gl/stdckdint.h | ||
| 96 | /gl/malloc/dynarray-skeleton.gl.h | 106 | /gl/malloc/dynarray-skeleton.gl.h |
| 97 | /gl/malloc/dynarray.gl.h | 107 | /gl/malloc/dynarray.gl.h |
| 98 | /gl/stdckdint.h | ||
| 99 | 108 | ||
| 100 | # /lib/ | 109 | # /lib/ |
| 101 | /lib/.deps | 110 | /lib/.deps |
diff --git a/gl/Makefile.am b/gl/Makefile.am index f462fdb7..6f50b0c5 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ## DO NOT EDIT! GENERATED AUTOMATICALLY! | 1 | ## DO NOT EDIT! GENERATED AUTOMATICALLY! |
| 2 | ## Process this file with automake to produce Makefile.in. | 2 | ## Process this file with automake to produce Makefile.in. |
| 3 | # Copyright (C) 2002-2025 Free Software Foundation, Inc. | 3 | # Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 4 | # | 4 | # |
| 5 | # This file is free software; you can redistribute it and/or modify | 5 | # This file is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
| @@ -59,6 +59,7 @@ | |||
| 59 | AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects | 59 | AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects |
| 60 | 60 | ||
| 61 | SUBDIRS = | 61 | SUBDIRS = |
| 62 | TESTS_ENVIRONMENT = | ||
| 62 | noinst_HEADERS = | 63 | noinst_HEADERS = |
| 63 | noinst_LIBRARIES = | 64 | noinst_LIBRARIES = |
| 64 | noinst_LTLIBRARIES = | 65 | noinst_LTLIBRARIES = |
| @@ -449,12 +450,6 @@ errno.h: errno.in.h $(top_builddir)/config.status | |||
| 449 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 450 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 450 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 451 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 451 | -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ | 452 | -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ |
| 452 | -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ | ||
| 453 | -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ | ||
| 454 | -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ | ||
| 455 | -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ | ||
| 456 | -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ | ||
| 457 | -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ | ||
| 458 | $(srcdir)/errno.in.h > $@-t | 453 | $(srcdir)/errno.in.h > $@-t |
| 459 | $(AM_V_at)mv $@-t $@ | 454 | $(AM_V_at)mv $@-t $@ |
| 460 | else | 455 | else |
| @@ -533,10 +528,12 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 533 | -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \ | 528 | -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \ |
| 534 | -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \ | 529 | -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \ |
| 535 | -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \ | 530 | -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \ |
| 531 | -e 's/@''GNULIB_OPENAT2''@/$(GL_GNULIB_OPENAT2)/g' \ | ||
| 536 | -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \ | 532 | -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \ |
| 537 | -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \ | 533 | -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \ |
| 538 | -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ | 534 | -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ |
| 539 | -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ | 535 | -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ |
| 536 | -e 's|@''HAVE_OPENAT2''@|$(HAVE_OPENAT2)|g' \ | ||
| 540 | -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \ | 537 | -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \ |
| 541 | -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ | 538 | -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ |
| 542 | -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ | 539 | -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ |
| @@ -1055,11 +1052,9 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U | |||
| 1055 | -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ | 1052 | -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ |
| 1056 | -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \ | 1053 | -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \ |
| 1057 | -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ | 1054 | -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ |
| 1058 | -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ | ||
| 1059 | -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \ | 1055 | -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \ |
| 1060 | -e 's|@''HAVE_LANGINFO_ABALTMON''@|$(HAVE_LANGINFO_ABALTMON)|g' \ | 1056 | -e 's|@''HAVE_LANGINFO_ABALTMON''@|$(HAVE_LANGINFO_ABALTMON)|g' \ |
| 1061 | -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ | 1057 | -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ |
| 1062 | -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ | ||
| 1063 | -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ | 1058 | -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ |
| 1064 | -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ | 1059 | -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ |
| 1065 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | 1060 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ |
| @@ -1284,8 +1279,11 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1284 | -e 's/@''GNULIB_ILOGBF''@/$(GL_GNULIB_ILOGBF)/g' \ | 1279 | -e 's/@''GNULIB_ILOGBF''@/$(GL_GNULIB_ILOGBF)/g' \ |
| 1285 | -e 's/@''GNULIB_ILOGBL''@/$(GL_GNULIB_ILOGBL)/g' \ | 1280 | -e 's/@''GNULIB_ILOGBL''@/$(GL_GNULIB_ILOGBL)/g' \ |
| 1286 | -e 's/@''GNULIB_ISFINITE''@/$(GL_GNULIB_ISFINITE)/g' \ | 1281 | -e 's/@''GNULIB_ISFINITE''@/$(GL_GNULIB_ISFINITE)/g' \ |
| 1282 | -e 's/@''GNULIB_ISFINITE_NO_CXX''@/$(GL_GNULIB_ISFINITE_NO_CXX)/g' \ | ||
| 1287 | -e 's/@''GNULIB_ISINF''@/$(GL_GNULIB_ISINF)/g' \ | 1283 | -e 's/@''GNULIB_ISINF''@/$(GL_GNULIB_ISINF)/g' \ |
| 1284 | -e 's/@''GNULIB_ISINF_NO_CXX''@/$(GL_GNULIB_ISINF_NO_CXX)/g' \ | ||
| 1288 | -e 's/@''GNULIB_ISNAN''@/$(GL_GNULIB_ISNAN)/g' \ | 1285 | -e 's/@''GNULIB_ISNAN''@/$(GL_GNULIB_ISNAN)/g' \ |
| 1286 | -e 's/@''GNULIB_ISNAN_NO_CXX''@/$(GL_GNULIB_ISNAN_NO_CXX)/g' \ | ||
| 1289 | -e 's/@''GNULIB_ISNANF''@/$(GL_GNULIB_ISNANF)/g' \ | 1287 | -e 's/@''GNULIB_ISNANF''@/$(GL_GNULIB_ISNANF)/g' \ |
| 1290 | -e 's/@''GNULIB_ISNAND''@/$(GL_GNULIB_ISNAND)/g' \ | 1288 | -e 's/@''GNULIB_ISNAND''@/$(GL_GNULIB_ISNAND)/g' \ |
| 1291 | -e 's/@''GNULIB_ISNANL''@/$(GL_GNULIB_ISNANL)/g' \ | 1289 | -e 's/@''GNULIB_ISNANL''@/$(GL_GNULIB_ISNANL)/g' \ |
| @@ -1330,6 +1328,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1330 | -e 's/@''GNULIB_SETPAYLOADSIGF''@/$(GL_GNULIB_SETPAYLOADSIGF)/g' \ | 1328 | -e 's/@''GNULIB_SETPAYLOADSIGF''@/$(GL_GNULIB_SETPAYLOADSIGF)/g' \ |
| 1331 | -e 's/@''GNULIB_SETPAYLOADSIGL''@/$(GL_GNULIB_SETPAYLOADSIGL)/g' \ | 1329 | -e 's/@''GNULIB_SETPAYLOADSIGL''@/$(GL_GNULIB_SETPAYLOADSIGL)/g' \ |
| 1332 | -e 's/@''GNULIB_SIGNBIT''@/$(GL_GNULIB_SIGNBIT)/g' \ | 1330 | -e 's/@''GNULIB_SIGNBIT''@/$(GL_GNULIB_SIGNBIT)/g' \ |
| 1331 | -e 's/@''GNULIB_SIGNBIT_NO_CXX''@/$(GL_GNULIB_SIGNBIT_NO_CXX)/g' \ | ||
| 1333 | -e 's/@''GNULIB_SINF''@/$(GL_GNULIB_SINF)/g' \ | 1332 | -e 's/@''GNULIB_SINF''@/$(GL_GNULIB_SINF)/g' \ |
| 1334 | -e 's/@''GNULIB_SINL''@/$(GL_GNULIB_SINL)/g' \ | 1333 | -e 's/@''GNULIB_SINL''@/$(GL_GNULIB_SINL)/g' \ |
| 1335 | -e 's/@''GNULIB_SINHF''@/$(GL_GNULIB_SINHF)/g' \ | 1334 | -e 's/@''GNULIB_SINHF''@/$(GL_GNULIB_SINHF)/g' \ |
| @@ -1366,14 +1365,19 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1366 | -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ | 1365 | -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ |
| 1367 | -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ | 1366 | -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ |
| 1368 | -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ | 1367 | -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ |
| 1368 | -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \ | ||
| 1369 | -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ | 1369 | -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ |
| 1370 | -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ | 1370 | -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ |
| 1371 | -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ | 1371 | -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ |
| 1372 | -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ | 1372 | -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ |
| 1373 | -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ | 1373 | -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ |
| 1374 | -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ | 1374 | -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ |
| 1375 | -e 's|@''HAVE_EXP2''@|$(HAVE_EXP2)|g' \ | ||
| 1376 | -e 's|@''HAVE_EXP2F''@|$(HAVE_EXP2F)|g' \ | ||
| 1377 | -e 's|@''HAVE_EXP2L''@|$(HAVE_EXP2L)|g' \ | ||
| 1375 | -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ | 1378 | -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ |
| 1376 | -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ | 1379 | -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ |
| 1380 | -e 's|@''HAVE_EXPM1L''@|$(HAVE_EXPM1L)|g' \ | ||
| 1377 | -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ | 1381 | -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ |
| 1378 | -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ | 1382 | -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ |
| 1379 | -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ | 1383 | -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ |
| @@ -1401,6 +1405,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1401 | -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ | 1405 | -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ |
| 1402 | -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ | 1406 | -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ |
| 1403 | -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ | 1407 | -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ |
| 1408 | -e 's|@''HAVE_LOG2''@|$(HAVE_LOG2)|g' \ | ||
| 1409 | -e 's|@''HAVE_LOG2F''@|$(HAVE_LOG2F)|g' \ | ||
| 1410 | -e 's|@''HAVE_LOG2L''@|$(HAVE_LOG2L)|g' \ | ||
| 1404 | -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ | 1411 | -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ |
| 1405 | -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ | 1412 | -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ |
| 1406 | -e 's|@''HAVE_LOGP1''@|$(HAVE_LOGP1)|g' \ | 1413 | -e 's|@''HAVE_LOGP1''@|$(HAVE_LOGP1)|g' \ |
| @@ -1411,8 +1418,13 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1411 | -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ | 1418 | -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ |
| 1412 | -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ | 1419 | -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ |
| 1413 | -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ | 1420 | -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ |
| 1421 | -e 's|@''HAVE_REMAINDERL''@|$(HAVE_REMAINDERL)|g' \ | ||
| 1414 | -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ | 1422 | -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ |
| 1423 | -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \ | ||
| 1415 | -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ | 1424 | -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ |
| 1425 | -e 's|@''HAVE_ROUND''@|$(HAVE_ROUND)|g' \ | ||
| 1426 | -e 's|@''HAVE_ROUNDF''@|$(HAVE_ROUNDF)|g' \ | ||
| 1427 | -e 's|@''HAVE_ROUNDL''@|$(HAVE_ROUNDL)|g' \ | ||
| 1416 | -e 's|@''HAVE_SETPAYLOAD''@|$(HAVE_SETPAYLOAD)|g' \ | 1428 | -e 's|@''HAVE_SETPAYLOAD''@|$(HAVE_SETPAYLOAD)|g' \ |
| 1417 | -e 's|@''HAVE_SETPAYLOADF''@|$(HAVE_SETPAYLOADF)|g' \ | 1429 | -e 's|@''HAVE_SETPAYLOADF''@|$(HAVE_SETPAYLOADF)|g' \ |
| 1418 | -e 's|@''HAVE_SETPAYLOADL''@|$(HAVE_SETPAYLOADL)|g' \ | 1430 | -e 's|@''HAVE_SETPAYLOADL''@|$(HAVE_SETPAYLOADL)|g' \ |
| @@ -1438,33 +1450,17 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( | |||
| 1438 | -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ | 1450 | -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ |
| 1439 | -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ | 1451 | -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ |
| 1440 | -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ | 1452 | -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ |
| 1441 | -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \ | ||
| 1442 | -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \ | ||
| 1443 | -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ | 1453 | -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ |
| 1444 | -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ | 1454 | -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ |
| 1445 | -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \ | ||
| 1446 | -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ | 1455 | -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ |
| 1447 | -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ | 1456 | -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ |
| 1448 | -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \ | ||
| 1449 | -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \ | ||
| 1450 | -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \ | ||
| 1451 | -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \ | ||
| 1452 | -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ | 1457 | -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ |
| 1453 | -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ | 1458 | -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ |
| 1454 | -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ | 1459 | -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ |
| 1455 | -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ | 1460 | -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ |
| 1456 | -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ | 1461 | -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ |
| 1457 | -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ | 1462 | -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ |
| 1458 | -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \ | ||
| 1459 | -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \ | ||
| 1460 | -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \ | ||
| 1461 | -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ | 1463 | -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ |
| 1462 | -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \ | ||
| 1463 | -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \ | ||
| 1464 | -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \ | ||
| 1465 | -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ | ||
| 1466 | -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ | ||
| 1467 | -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ | ||
| 1468 | -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ | 1464 | -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ |
| 1469 | -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ | 1465 | -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ |
| 1470 | -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ | 1466 | -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ |
| @@ -2395,9 +2391,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 2395 | $(AM_V_at)mv $@-t3 $@ | 2391 | $(AM_V_at)mv $@-t3 $@ |
| 2396 | MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3 | 2392 | MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3 |
| 2397 | 2393 | ||
| 2398 | if GL_COND_OBJ_STDIO_CONSOLESAFE | ||
| 2399 | libgnu_a_SOURCES += stdio-consolesafe.c | ||
| 2400 | endif | ||
| 2401 | if GL_COND_OBJ_STDIO_READ | 2394 | if GL_COND_OBJ_STDIO_READ |
| 2402 | libgnu_a_SOURCES += stdio-read.c | 2395 | libgnu_a_SOURCES += stdio-read.c |
| 2403 | endif | 2396 | endif |
| @@ -2409,6 +2402,14 @@ EXTRA_DIST += stdio.in.h | |||
| 2409 | 2402 | ||
| 2410 | ## end gnulib module stdio-h | 2403 | ## end gnulib module stdio-h |
| 2411 | 2404 | ||
| 2405 | ## begin gnulib module stdio-windows | ||
| 2406 | |||
| 2407 | if GL_COND_OBJ_STDIO_CONSOLESAFE | ||
| 2408 | libgnu_a_SOURCES += stdio-consolesafe.c | ||
| 2409 | endif | ||
| 2410 | |||
| 2411 | ## end gnulib module stdio-windows | ||
| 2412 | |||
| 2412 | ## begin gnulib module stdlib-h | 2413 | ## begin gnulib module stdlib-h |
| 2413 | 2414 | ||
| 2414 | BUILT_SOURCES += stdlib.h | 2415 | BUILT_SOURCES += stdlib.h |
| @@ -2503,7 +2504,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2503 | -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ | 2504 | -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ |
| 2504 | -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ | 2505 | -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ |
| 2505 | -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ | 2506 | -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ |
| 2506 | -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ | ||
| 2507 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ | 2507 | -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ |
| 2508 | -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ | 2508 | -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ |
| 2509 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ | 2509 | -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ |
| @@ -2521,6 +2521,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2521 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ | 2521 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ |
| 2522 | -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ | 2522 | -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ |
| 2523 | -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ | 2523 | -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ |
| 2524 | -e 's|@''HAVE_SYS_PROCESS_H''@|$(HAVE_SYS_PROCESS_H)|g' \ | ||
| 2524 | -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ | 2525 | -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ |
| 2525 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ | 2526 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ |
| 2526 | < $@-t1 > $@-t2 | 2527 | < $@-t1 > $@-t2 |
| @@ -2674,6 +2675,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 2674 | -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \ | 2675 | -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \ |
| 2675 | -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \ | 2676 | -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \ |
| 2676 | -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \ | 2677 | -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \ |
| 2678 | -e 's/@''GNULIB_STRINGEQ''@/$(GL_GNULIB_STRINGEQ)/g' \ | ||
| 2677 | -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \ | 2679 | -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \ |
| 2678 | -e 's/@''GNULIB_STRNCPY''@/$(GL_GNULIB_STRNCPY)/g' \ | 2680 | -e 's/@''GNULIB_STRNCPY''@/$(GL_GNULIB_STRNCPY)/g' \ |
| 2679 | -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \ | 2681 | -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \ |
| @@ -2702,6 +2704,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 2702 | -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ | 2704 | -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ |
| 2703 | -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ | 2705 | -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ |
| 2704 | -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ | 2706 | -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ |
| 2707 | -e 's|@''HAVE_DECL_MEMEQ''@|$(HAVE_DECL_MEMEQ)|g' \ | ||
| 2705 | -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ | 2708 | -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ |
| 2706 | -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ | 2709 | -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ |
| 2707 | -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ | 2710 | -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ |
| @@ -2711,6 +2714,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 2711 | -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ | 2714 | -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ |
| 2712 | -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ | 2715 | -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ |
| 2713 | -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ | 2716 | -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ |
| 2717 | -e 's|@''HAVE_DECL_STREQ''@|$(HAVE_DECL_STREQ)|g' \ | ||
| 2714 | -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ | 2718 | -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ |
| 2715 | -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ | 2719 | -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ |
| 2716 | -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ | 2720 | -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ |
| @@ -2760,6 +2764,12 @@ EXTRA_DIST += string.in.h | |||
| 2760 | 2764 | ||
| 2761 | ## end gnulib module string-h | 2765 | ## end gnulib module string-h |
| 2762 | 2766 | ||
| 2767 | ## begin gnulib module stringeq | ||
| 2768 | |||
| 2769 | libgnu_a_SOURCES += string.c | ||
| 2770 | |||
| 2771 | ## end gnulib module stringeq | ||
| 2772 | |||
| 2763 | ## begin gnulib module strings-h | 2773 | ## begin gnulib module strings-h |
| 2764 | 2774 | ||
| 2765 | BUILT_SOURCES += strings.h | 2775 | BUILT_SOURCES += strings.h |
| @@ -3918,7 +3928,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 3918 | -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ | 3928 | -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ |
| 3919 | -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ | 3929 | -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ |
| 3920 | -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ | 3930 | -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ |
| 3921 | -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ | 3931 | -e 's|@''HAVE_WCTOB''@|$(HAVE_WCTOB)|g' \ |
| 3922 | -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \ | 3932 | -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \ |
| 3923 | -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | 3933 | -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ |
| 3924 | < $@-t1 > $@-t2 | 3934 | < $@-t1 > $@-t2 |
diff --git a/gl/_Noreturn.h b/gl/_Noreturn.h index d42f15ee..0bab051e 100644 --- a/gl/_Noreturn.h +++ b/gl/_Noreturn.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for declaring that a function does not return. | 1 | /* A C macro for declaring that a function does not return. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU Lesser General Public License as published | 5 | under the terms of the GNU Lesser General Public License as published |
diff --git a/gl/af_alg.c b/gl/af_alg.c index cfa96954..91f3df15 100644 --- a/gl/af_alg.c +++ b/gl/af_alg.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* af_alg.c - Compute message digests from file streams and buffers. | 1 | /* af_alg.c - Compute message digests from file streams and buffers. |
| 2 | Copyright (C) 2018-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -112,100 +112,102 @@ afalg_stream (FILE *stream, const char *alg, | |||
| 112 | read-write loop work around an empty-input bug noted below. */ | 112 | read-write loop work around an empty-input bug noted below. */ |
| 113 | int fd = fileno (stream); | 113 | int fd = fileno (stream); |
| 114 | int result; | 114 | int result; |
| 115 | struct stat st; | 115 | { |
| 116 | off_t off = ftello (stream); | 116 | struct stat st; |
| 117 | if (0 <= off && fstat (fd, &st) == 0 | 117 | off_t off = ftello (stream); |
| 118 | && (S_ISREG (st.st_mode) || S_TYPEISSHM (&st) || S_TYPEISTMO (&st)) | 118 | if (0 <= off && fstat (fd, &st) == 0 |
| 119 | && off < st.st_size && st.st_size - off < SYS_BUFSIZE_MAX) | 119 | && (S_ISREG (st.st_mode) || S_TYPEISSHM (&st) || S_TYPEISTMO (&st)) |
| 120 | { | 120 | && off < st.st_size && st.st_size - off < SYS_BUFSIZE_MAX) |
| 121 | /* Make sure the offset of fileno (stream) reflects how many bytes | 121 | { |
| 122 | have been read from stream before this function got invoked. | 122 | /* Make sure the offset of fileno (stream) reflects how many bytes |
| 123 | Note: fflush on an input stream after ungetc does not work as expected | 123 | have been read from stream before this function got invoked. |
| 124 | on some platforms. Therefore this situation is not supported here. */ | 124 | Note: fflush on an input stream after ungetc does not work as expected |
| 125 | if (fflush (stream)) | 125 | on some platforms. Therefore this situation is not supported here. */ |
| 126 | result = -EIO; | 126 | if (fflush (stream)) |
| 127 | else | 127 | result = -EIO; |
| 128 | { | 128 | else |
| 129 | off_t nbytes = st.st_size - off; | 129 | { |
| 130 | if (sendfile (ofd, fd, &off, nbytes) == nbytes) | 130 | off_t nbytes = st.st_size - off; |
| 131 | { | 131 | if (sendfile (ofd, fd, &off, nbytes) == nbytes) |
| 132 | if (read (ofd, resblock, hashlen) == hashlen) | 132 | { |
| 133 | { | 133 | if (read (ofd, resblock, hashlen) == hashlen) |
| 134 | /* The input buffers of stream are no longer valid. */ | 134 | { |
| 135 | if (lseek (fd, off, SEEK_SET) != (off_t)-1) | 135 | /* The input buffers of stream are no longer valid. */ |
| 136 | result = 0; | 136 | if (lseek (fd, off, SEEK_SET) != (off_t)-1) |
| 137 | else | 137 | result = 0; |
| 138 | /* The file position of fd has not changed. */ | 138 | else |
| 139 | /* The file position of fd has not changed. */ | ||
| 140 | result = -EAFNOSUPPORT; | ||
| 141 | } | ||
| 142 | else | ||
| 143 | /* The file position of fd has not changed. */ | ||
| 144 | result = -EAFNOSUPPORT; | ||
| 145 | } | ||
| 146 | else | ||
| 147 | /* The file position of fd has not changed. */ | ||
| 148 | result = -EAFNOSUPPORT; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | else | ||
| 152 | { | ||
| 153 | /* sendfile not possible, do a classic read-write loop. */ | ||
| 154 | |||
| 155 | /* Number of bytes to seek (backwards) in case of error. */ | ||
| 156 | off_t nseek = 0; | ||
| 157 | |||
| 158 | for (;;) | ||
| 159 | { | ||
| 160 | char buf[BLOCKSIZE]; | ||
| 161 | /* When the stream is not seekable, start with a single-byte block, | ||
| 162 | so that we can use ungetc() in the case that send() fails. */ | ||
| 163 | size_t blocksize = (nseek == 0 && off < 0 ? 1 : BLOCKSIZE); | ||
| 164 | ssize_t size = fread (buf, 1, blocksize, stream); | ||
| 165 | if (size == 0) | ||
| 166 | { | ||
| 167 | /* On Linux < 4.9, the value for an empty stream is wrong (all 0). | ||
| 168 | See <https://patchwork.kernel.org/patch/9308641/>. | ||
| 169 | This was not fixed properly until November 2016, | ||
| 170 | see <https://patchwork.kernel.org/patch/9434741/>. */ | ||
| 171 | result = ferror (stream) ? -EIO : nseek == 0 ? -EAFNOSUPPORT : 0; | ||
| 172 | break; | ||
| 173 | } | ||
| 174 | nseek -= size; | ||
| 175 | if (send (ofd, buf, size, MSG_MORE) != size) | ||
| 176 | { | ||
| 177 | if (nseek == -1) | ||
| 178 | { | ||
| 179 | /* 1 byte of pushback buffer is guaranteed on stream, even | ||
| 180 | if stream is not seekable. */ | ||
| 181 | ungetc ((unsigned char) buf[0], stream); | ||
| 139 | result = -EAFNOSUPPORT; | 182 | result = -EAFNOSUPPORT; |
| 140 | } | 183 | } |
| 141 | else | 184 | else if (fseeko (stream, nseek, SEEK_CUR) == 0) |
| 142 | /* The file position of fd has not changed. */ | 185 | /* The position of stream has been restored. */ |
| 143 | result = -EAFNOSUPPORT; | ||
| 144 | } | ||
| 145 | else | ||
| 146 | /* The file position of fd has not changed. */ | ||
| 147 | result = -EAFNOSUPPORT; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | else | ||
| 151 | { | ||
| 152 | /* sendfile not possible, do a classic read-write loop. */ | ||
| 153 | |||
| 154 | /* Number of bytes to seek (backwards) in case of error. */ | ||
| 155 | off_t nseek = 0; | ||
| 156 | |||
| 157 | for (;;) | ||
| 158 | { | ||
| 159 | char buf[BLOCKSIZE]; | ||
| 160 | /* When the stream is not seekable, start with a single-byte block, | ||
| 161 | so that we can use ungetc() in the case that send() fails. */ | ||
| 162 | size_t blocksize = (nseek == 0 && off < 0 ? 1 : BLOCKSIZE); | ||
| 163 | ssize_t size = fread (buf, 1, blocksize, stream); | ||
| 164 | if (size == 0) | ||
| 165 | { | ||
| 166 | /* On Linux < 4.9, the value for an empty stream is wrong (all 0). | ||
| 167 | See <https://patchwork.kernel.org/patch/9308641/>. | ||
| 168 | This was not fixed properly until November 2016, | ||
| 169 | see <https://patchwork.kernel.org/patch/9434741/>. */ | ||
| 170 | result = ferror (stream) ? -EIO : nseek == 0 ? -EAFNOSUPPORT : 0; | ||
| 171 | break; | ||
| 172 | } | ||
| 173 | nseek -= size; | ||
| 174 | if (send (ofd, buf, size, MSG_MORE) != size) | ||
| 175 | { | ||
| 176 | if (nseek == -1) | ||
| 177 | { | ||
| 178 | /* 1 byte of pushback buffer is guaranteed on stream, even | ||
| 179 | if stream is not seekable. */ | ||
| 180 | ungetc ((unsigned char) buf[0], stream); | ||
| 181 | result = -EAFNOSUPPORT; | 186 | result = -EAFNOSUPPORT; |
| 182 | } | 187 | else |
| 183 | else if (fseeko (stream, nseek, SEEK_CUR) == 0) | 188 | result = -EIO; |
| 184 | /* The position of stream has been restored. */ | 189 | break; |
| 185 | result = -EAFNOSUPPORT; | 190 | } |
| 186 | else | 191 | |
| 187 | result = -EIO; | 192 | /* Don't assume that EOF is sticky. See: |
| 188 | break; | 193 | <https://sourceware.org/PR19476>. */ |
| 189 | } | 194 | if (feof (stream)) |
| 190 | 195 | { | |
| 191 | /* Don't assume that EOF is sticky. See: | 196 | result = 0; |
| 192 | <https://sourceware.org/bugzilla/show_bug.cgi?id=19476>. */ | 197 | break; |
| 193 | if (feof (stream)) | 198 | } |
| 194 | { | 199 | } |
| 195 | result = 0; | 200 | |
| 196 | break; | 201 | if (result == 0 && read (ofd, resblock, hashlen) != hashlen) |
| 197 | } | 202 | { |
| 198 | } | 203 | if (nseek == 0 || fseeko (stream, nseek, SEEK_CUR) == 0) |
| 199 | 204 | /* The position of stream has been restored. */ | |
| 200 | if (result == 0 && read (ofd, resblock, hashlen) != hashlen) | 205 | result = -EAFNOSUPPORT; |
| 201 | { | 206 | else |
| 202 | if (nseek == 0 || fseeko (stream, nseek, SEEK_CUR) == 0) | 207 | result = -EIO; |
| 203 | /* The position of stream has been restored. */ | 208 | } |
| 204 | result = -EAFNOSUPPORT; | 209 | } |
| 205 | else | 210 | } |
| 206 | result = -EIO; | ||
| 207 | } | ||
| 208 | } | ||
| 209 | close (ofd); | 211 | close (ofd); |
| 210 | return result; | 212 | return result; |
| 211 | } | 213 | } |
diff --git a/gl/af_alg.h b/gl/af_alg.h index 236659bc..1321970f 100644 --- a/gl/af_alg.h +++ b/gl/af_alg.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* af_alg.h - Compute message digests from file streams and buffers. | 1 | /* af_alg.h - Compute message digests from file streams and buffers. |
| 2 | Copyright (C) 2018-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/alloca.in.h b/gl/alloca.in.h index afb00caf..bb2cb881 100644 --- a/gl/alloca.in.h +++ b/gl/alloca.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Memory allocation on the stack. | 1 | /* Memory allocation on the stack. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2025 Free Software Foundation, | 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2026 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/arg-nonnull.h b/gl/arg-nonnull.h index 747bb413..d370d139 100644 --- a/gl/arg-nonnull.h +++ b/gl/arg-nonnull.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for declaring that specific arguments must not be NULL. | 1 | /* A C macro for declaring that specific arguments must not be NULL. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU Lesser General Public License as published | 5 | under the terms of the GNU Lesser General Public License as published |
diff --git a/gl/arpa_inet.c b/gl/arpa_inet.c index fae7c241..d0ff3a31 100644 --- a/gl/arpa_inet.c +++ b/gl/arpa_inet.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <arpa/inet.h>. | 1 | /* Inline functions for <arpa/inet.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define _GL_ARPA_INET_INLINE _GL_EXTERN_INLINE | 18 | #define _GL_ARPA_INET_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include <arpa/inet.h> | 20 | #include <arpa/inet.h> |
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h index d7417bfd..a9c93d07 100644 --- a/gl/arpa_inet.in.h +++ b/gl/arpa_inet.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <arpa/inet.h>. | 1 | /* A GNU-like <arpa/inet.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -159,7 +159,6 @@ _GL_CXXALIAS_SYS_CAST (inet_ntop, const char *, | |||
| 159 | _GL_CXXALIASWARN (inet_ntop); | 159 | _GL_CXXALIASWARN (inet_ntop); |
| 160 | # endif | 160 | # endif |
| 161 | #elif defined GNULIB_POSIXCHECK | 161 | #elif defined GNULIB_POSIXCHECK |
| 162 | # undef inet_ntop | ||
| 163 | # if HAVE_RAW_DECL_INET_NTOP | 162 | # if HAVE_RAW_DECL_INET_NTOP |
| 164 | _GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - " | 163 | _GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - " |
| 165 | "use gnulib module inet_ntop for portability"); | 164 | "use gnulib module inet_ntop for portability"); |
| @@ -190,7 +189,6 @@ _GL_CXXALIAS_SYS (inet_pton, int, | |||
| 190 | _GL_CXXALIASWARN (inet_pton); | 189 | _GL_CXXALIASWARN (inet_pton); |
| 191 | # endif | 190 | # endif |
| 192 | #elif defined GNULIB_POSIXCHECK | 191 | #elif defined GNULIB_POSIXCHECK |
| 193 | # undef inet_pton | ||
| 194 | # if HAVE_RAW_DECL_INET_PTON | 192 | # if HAVE_RAW_DECL_INET_PTON |
| 195 | _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - " | 193 | _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - " |
| 196 | "use gnulib module inet_pton for portability"); | 194 | "use gnulib module inet_pton for portability"); |
diff --git a/gl/asnprintf.c b/gl/asnprintf.c index 0488b6be..05582499 100644 --- a/gl/asnprintf.c +++ b/gl/asnprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 1999, 2002, 2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2002, 2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -25,10 +25,8 @@ char * | |||
| 25 | asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) | 25 | asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) |
| 26 | { | 26 | { |
| 27 | va_list args; | 27 | va_list args; |
| 28 | char *result; | ||
| 29 | |||
| 30 | va_start (args, format); | 28 | va_start (args, format); |
| 31 | result = vasnprintf (resultbuf, lengthp, format, args); | 29 | char *result = vasnprintf (resultbuf, lengthp, format, args); |
| 32 | va_end (args); | 30 | va_end (args); |
| 33 | return result; | 31 | return result; |
| 34 | } | 32 | } |
diff --git a/gl/asprintf.c b/gl/asprintf.c index 336700be..5da2d085 100644 --- a/gl/asprintf.c +++ b/gl/asprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 1999, 2002, 2006-2007, 2009-2025 Free Software Foundation, | 2 | Copyright (C) 1999, 2002, 2006-2007, 2009-2026 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -30,10 +30,8 @@ int | |||
| 30 | asprintf (char **resultp, const char *format, ...) | 30 | asprintf (char **resultp, const char *format, ...) |
| 31 | { | 31 | { |
| 32 | va_list args; | 32 | va_list args; |
| 33 | int result; | ||
| 34 | |||
| 35 | va_start (args, format); | 33 | va_start (args, format); |
| 36 | result = vasprintf (resultp, format, args); | 34 | int result = vasprintf (resultp, format, args); |
| 37 | va_end (args); | 35 | va_end (args); |
| 38 | return result; | 36 | return result; |
| 39 | } | 37 | } |
diff --git a/gl/assert.in.h b/gl/assert.in.h index 87339abc..8a564670 100644 --- a/gl/assert.in.h +++ b/gl/assert.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for and wrapper around <assert.h> | 1 | /* Substitute for and wrapper around <assert.h> |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/attribute.h b/gl/attribute.h index c85412d9..c50befdf 100644 --- a/gl/attribute.h +++ b/gl/attribute.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers | 1 | /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers |
| 2 | 2 | ||
| 3 | Copyright 2020-2025 Free Software Foundation, Inc. | 3 | Copyright 2020-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -89,7 +89,7 @@ | |||
| 89 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING, | 89 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING, |
| 90 | _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE, | 90 | _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE, |
| 91 | _GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL, | 91 | _GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL, |
| 92 | _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED. */ | 92 | _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED, _GL_UNNAMED. */ |
| 93 | #if !_GL_CONFIG_H_INCLUDED | 93 | #if !_GL_CONFIG_H_INCLUDED |
| 94 | #error "Please include config.h first." | 94 | #error "Please include config.h first." |
| 95 | #endif | 95 | #endif |
| @@ -240,62 +240,68 @@ | |||
| 240 | /* Applies to: functions. */ | 240 | /* Applies to: functions. */ |
| 241 | #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE | 241 | #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE |
| 242 | 242 | ||
| 243 | /* It is OK for a compiler to move calls to the function and to omit | 243 | /* It is OK for a compiler to move a call, or omit a duplicate call |
| 244 | calls to the function if another call has the same arguments or the | 244 | and reuse a cached return value, even if the state changes between calls. |
| 245 | result is not used. | 245 | It is also OK to omit a call if the result is not used. |
| 246 | This attribute is safe for a function that neither depends on | 246 | This attribute is safe if the function does not change observable state, |
| 247 | nor affects state, and always returns exactly once - | 247 | returns a value determined solely by its arguments' values |
| 248 | without examining state, and always returns exactly once - | ||
| 248 | e.g., does not raise an exception, call longjmp, or loop forever. | 249 | e.g., does not raise an exception, call longjmp, or loop forever. |
| 249 | (This attribute is stricter than ATTRIBUTE_PURE because the | 250 | (This attribute is stricter than _GL_ATTRIBUTE_PURE because the |
| 250 | function cannot observe state. It is stricter than UNSEQUENCED | 251 | function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED |
| 251 | because the function must return exactly once and cannot depend on | 252 | the function must return exactly once and cannot access state |
| 252 | state addressed by its arguments.) */ | 253 | addressed by its pointer arguments or that happens to have the same |
| 254 | value for all calls to the function, but the function is allowed to | ||
| 255 | return a pointer to storage that can be modified later. */ | ||
| 253 | /* Applies to: functions. */ | 256 | /* Applies to: functions. */ |
| 254 | #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST | 257 | #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST |
| 255 | 258 | ||
| 256 | /* It is OK for a compiler to move calls to the function and to omit duplicate | 259 | /* It is OK for a compiler to move a call, or omit a duplicate call |
| 257 | calls to the function with the same arguments, so long as the state | 260 | and reuse a cached value returned either directly or indirectly via |
| 258 | addressed by its arguments is the same. | 261 | a pointer, if the state addressed by its pointer arguments is the same; |
| 262 | however, pointer arguments cannot alias. | ||
| 259 | This attribute is safe for a function that is effectless, idempotent, | 263 | This attribute is safe for a function that is effectless, idempotent, |
| 260 | stateless, and independent; see ISO C 23 § 6.7.12.7 for a definition of | 264 | stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of |
| 261 | these terms. | 265 | these terms. |
| 262 | (This attribute is stricter than REPRODUCIBLE because the function | 266 | (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because |
| 263 | must be stateless and independent. It is looser than ATTRIBUTE_CONST | 267 | the function must be stateless and independent. Unlike |
| 264 | because the function need not return exactly once and can depend | 268 | _GL_ATTRIBUTE_CONST the function need not return exactly once, and |
| 265 | on state addressed by its arguments.) | 269 | can depend on state accessed via its pointer arguments or that |
| 270 | happens to have the same value for all calls to the function, but | ||
| 271 | the function cannot return a pointer to storage whose contents | ||
| 272 | change later.) | ||
| 266 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and | 273 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and |
| 267 | <https://stackoverflow.com/questions/76847905/>. | 274 | <https://stackoverflow.com/questions/76847905/>. */ |
| 268 | ATTENTION! Efforts are underway to change the meaning of this attribute. | ||
| 269 | See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ | ||
| 270 | /* Applies to: functions, pointer to functions, function type. */ | 275 | /* Applies to: functions, pointer to functions, function type. */ |
| 271 | #define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED | 276 | #define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED |
| 272 | 277 | ||
| 273 | /* It is OK for a compiler to move calls to the function and to omit | 278 | /* It is OK for a compiler to move a call, or omit a duplicate call |
| 274 | calls to the function if another call has the same arguments or the | 279 | and reuse a cached return value, if observable state is the same. |
| 275 | result is not used, and if observable state is the same. | 280 | It is also OK to omit a call if the return value is not used. |
| 276 | This attribute is safe for a function that does not affect observable state | 281 | This attribute is safe if the function does not change observable state, |
| 277 | and always returns exactly once. | 282 | returns a value determined solely by its arguments's values |
| 278 | (This attribute is looser than ATTRIBUTE_CONST because the function | 283 | together with observable state, and always returns exactly once. |
| 279 | can depend on observable state. It is stricter than REPRODUCIBLE | 284 | (This attribute is looser than _GL_ATTRIBUTE_CONST because the function |
| 280 | because the function must return exactly once and cannot affect | 285 | can depend on observable state. |
| 281 | state addressed by its arguments.) */ | 286 | Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly |
| 287 | once and cannot change state addressed by its arguments, but the | ||
| 288 | function can return a pointer to storage whose contents change later.) */ | ||
| 282 | /* Applies to: functions. */ | 289 | /* Applies to: functions. */ |
| 283 | #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE | 290 | #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE |
| 284 | 291 | ||
| 285 | /* It is OK for a compiler to move calls to the function and to omit duplicate | 292 | /* It is OK for a compiler to move a call, or omit a duplicate call |
| 286 | calls to the function with the same arguments, so long as the state | 293 | and reuse a cached value returned either directly or indirectly via |
| 287 | addressed by its arguments is the same and is updated in time for | 294 | a pointer, if other observable state is the same; |
| 288 | the rest of the program. | 295 | however, pointer arguments cannot alias. |
| 289 | This attribute is safe for a function that is effectless and idempotent; see | 296 | This attribute is safe for a function that is effectless and idempotent; |
| 290 | ISO C 23 § 6.7.12.7 for a definition of these terms. | 297 | see ISO C 23 § 6.7.13.8 for a definition of these terms. |
| 291 | (This attribute is looser than UNSEQUENCED because the function need | 298 | (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because |
| 292 | not be stateless and idempotent. It is looser than ATTRIBUTE_PURE | 299 | the function need not be stateless or independent. |
| 293 | because the function need not return exactly once and can affect | 300 | Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once |
| 294 | state addressed by its arguments.) | 301 | and can change state addressed by its pointer arguments, but the |
| 302 | function cannot return a pointer to storage whose contents change later.) | ||
| 295 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and | 303 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and |
| 296 | <https://stackoverflow.com/questions/76847905/>. | 304 | <https://stackoverflow.com/questions/76847905/>. */ |
| 297 | ATTENTION! Efforts are underway to change the meaning of this attribute. | ||
| 298 | See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ | ||
| 299 | /* Applies to: functions, pointer to functions, function type. */ | 305 | /* Applies to: functions, pointer to functions, function type. */ |
| 300 | #define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE | 306 | #define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE |
| 301 | 307 | ||
| @@ -328,4 +334,18 @@ | |||
| 328 | #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS | 334 | #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS |
| 329 | 335 | ||
| 330 | 336 | ||
| 337 | /* ==================== Unnamed function parameters ======================== */ | ||
| 338 | |||
| 339 | /* Although UNNAMED is not an attribute, it is related to MAYBE_UNUSED | ||
| 340 | and so is defined here for convenience. */ | ||
| 341 | |||
| 342 | /* UNNAMED (ID) is the "name" of an unnamed function parameter. | ||
| 343 | Each of the function's unnamed parameters should have a unique "name". | ||
| 344 | The "name" cannot be used. This ports both to C17 and earlier, which | ||
| 345 | lack unnamed parameters, and to C++ and later C, which have them. */ | ||
| 346 | /* Applies to: | ||
| 347 | - function parameters. */ | ||
| 348 | #define UNNAMED(id) _GL_UNNAMED (id) | ||
| 349 | |||
| 350 | |||
| 331 | #endif /* _GL_ATTRIBUTE_H */ | 351 | #endif /* _GL_ATTRIBUTE_H */ |
diff --git a/gl/base64.c b/gl/base64.c index 8a0edd4a..77ee371b 100644 --- a/gl/base64.c +++ b/gl/base64.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* base64.c -- Encode binary data using printable characters. | 1 | /* base64.c -- Encode binary data using printable characters. |
| 2 | Copyright (C) 1999-2001, 2004-2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2001, 2004-2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -39,10 +39,10 @@ | |||
| 39 | * | 39 | * |
| 40 | */ | 40 | */ |
| 41 | 41 | ||
| 42 | #define BASE64_INLINE _GL_EXTERN_INLINE | ||
| 42 | #include <config.h> | 43 | #include <config.h> |
| 43 | 44 | ||
| 44 | /* Get prototype. */ | 45 | /* Get prototype. */ |
| 45 | #define BASE64_INLINE _GL_EXTERN_INLINE | ||
| 46 | #include "base64.h" | 46 | #include "base64.h" |
| 47 | 47 | ||
| 48 | /* Get imalloc. */ | 48 | /* Get imalloc. */ |
| @@ -372,13 +372,14 @@ static bool | |||
| 372 | decode_4 (char const *restrict in, idx_t inlen, | 372 | decode_4 (char const *restrict in, idx_t inlen, |
| 373 | char *restrict *outp, idx_t *outleft) | 373 | char *restrict *outp, idx_t *outleft) |
| 374 | { | 374 | { |
| 375 | char *out = *outp; | ||
| 376 | if (inlen < 2) | 375 | if (inlen < 2) |
| 377 | return false; | 376 | return false; |
| 378 | 377 | ||
| 379 | if (!isbase64 (in[0]) || !isbase64 (in[1])) | 378 | if (!isbase64 (in[0]) || !isbase64 (in[1])) |
| 380 | return false; | 379 | return false; |
| 381 | 380 | ||
| 381 | char *out = *outp; | ||
| 382 | |||
| 382 | if (*outleft) | 383 | if (*outleft) |
| 383 | { | 384 | { |
| 384 | *out++ = ((base64_to_int[to_uchar (in[0])] << 2) | 385 | *out++ = ((base64_to_int[to_uchar (in[0])] << 2) |
| @@ -466,7 +467,6 @@ base64_decode_ctx (struct base64_decode_context *ctx, | |||
| 466 | const char *restrict in, idx_t inlen, | 467 | const char *restrict in, idx_t inlen, |
| 467 | char *restrict out, idx_t *outlen) | 468 | char *restrict out, idx_t *outlen) |
| 468 | { | 469 | { |
| 469 | idx_t outleft = *outlen; | ||
| 470 | bool ignore_newlines = ctx != NULL; | 470 | bool ignore_newlines = ctx != NULL; |
| 471 | bool flush_ctx = false; | 471 | bool flush_ctx = false; |
| 472 | unsigned int ctx_i = 0; | 472 | unsigned int ctx_i = 0; |
| @@ -477,6 +477,7 @@ base64_decode_ctx (struct base64_decode_context *ctx, | |||
| 477 | flush_ctx = inlen == 0; | 477 | flush_ctx = inlen == 0; |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | idx_t outleft = *outlen; | ||
| 480 | 481 | ||
| 481 | while (true) | 482 | while (true) |
| 482 | { | 483 | { |
| @@ -505,35 +506,36 @@ base64_decode_ctx (struct base64_decode_context *ctx, | |||
| 505 | { | 506 | { |
| 506 | ++in; | 507 | ++in; |
| 507 | --inlen; | 508 | --inlen; |
| 508 | continue; | ||
| 509 | } | 509 | } |
| 510 | else | ||
| 511 | { | ||
| 512 | /* Restore OUT and OUTLEFT. */ | ||
| 513 | out -= outleft_save - outleft; | ||
| 514 | outleft = outleft_save; | ||
| 510 | 515 | ||
| 511 | /* Restore OUT and OUTLEFT. */ | ||
| 512 | out -= outleft_save - outleft; | ||
| 513 | outleft = outleft_save; | ||
| 514 | |||
| 515 | { | ||
| 516 | char const *in_end = in + inlen; | ||
| 517 | char const *non_nl; | ||
| 518 | |||
| 519 | if (ignore_newlines) | ||
| 520 | non_nl = get_4 (ctx, &in, in_end, &inlen); | ||
| 521 | else | ||
| 522 | non_nl = in; /* Might have nl in this case. */ | ||
| 523 | |||
| 524 | /* If the input is empty or consists solely of newlines (0 non-newlines), | ||
| 525 | then we're done. Likewise if there are fewer than 4 bytes when not | ||
| 526 | flushing context and not treating newlines as garbage. */ | ||
| 527 | if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines)) | ||
| 528 | { | 516 | { |
| 529 | inlen = 0; | 517 | char const *in_end = in + inlen; |
| 530 | break; | 518 | |
| 531 | } | 519 | char const *non_nl; |
| 532 | if (!decode_4 (non_nl, inlen, &out, &outleft)) | 520 | if (ignore_newlines) |
| 533 | break; | 521 | non_nl = get_4 (ctx, &in, in_end, &inlen); |
| 522 | else | ||
| 523 | non_nl = in; /* Might have nl in this case. */ | ||
| 524 | |||
| 525 | /* If the input is empty or consists solely of newlines (0 non-newlines), | ||
| 526 | then we're done. Likewise if there are fewer than 4 bytes when not | ||
| 527 | flushing context and not treating newlines as garbage. */ | ||
| 528 | if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines)) | ||
| 529 | { | ||
| 530 | inlen = 0; | ||
| 531 | break; | ||
| 532 | } | ||
| 533 | if (!decode_4 (non_nl, inlen, &out, &outleft)) | ||
| 534 | break; | ||
| 534 | 535 | ||
| 535 | inlen = in_end - in; | 536 | inlen = in_end - in; |
| 536 | } | 537 | } |
| 538 | } | ||
| 537 | } | 539 | } |
| 538 | 540 | ||
| 539 | *outlen -= outleft; | 541 | *outlen -= outleft; |
diff --git a/gl/base64.h b/gl/base64.h index cdafdac9..35f8a30b 100644 --- a/gl/base64.h +++ b/gl/base64.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* base64.h -- Encode binary data using printable characters. | 1 | /* base64.h -- Encode binary data using printable characters. |
| 2 | Copyright (C) 2004-2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2004-2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Simon Josefsson. | 3 | Written by Simon Josefsson. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c index 2aecb0dd..53f3bae5 100644 --- a/gl/basename-lgpl.c +++ b/gl/basename-lgpl.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* basename.c -- return the last element in a file name | 1 | /* basename.c -- return the last element in a file name |
| 2 | 2 | ||
| 3 | Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2025 Free Software | 3 | Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -29,13 +29,11 @@ char * | |||
| 29 | last_component (char const *name) | 29 | last_component (char const *name) |
| 30 | { | 30 | { |
| 31 | char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); | 31 | char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); |
| 32 | char const *p; | ||
| 33 | bool last_was_slash = false; | ||
| 34 | |||
| 35 | while (ISSLASH (*base)) | 32 | while (ISSLASH (*base)) |
| 36 | base++; | 33 | base++; |
| 37 | 34 | ||
| 38 | for (p = base; *p; p++) | 35 | bool last_was_slash = false; |
| 36 | for (char const *p = base; *p; p++) | ||
| 39 | { | 37 | { |
| 40 | if (ISSLASH (*p)) | 38 | if (ISSLASH (*p)) |
| 41 | last_was_slash = true; | 39 | last_was_slash = true; |
| @@ -53,8 +51,6 @@ size_t | |||
| 53 | base_len (char const *name) | 51 | base_len (char const *name) |
| 54 | { | 52 | { |
| 55 | size_t len; | 53 | size_t len; |
| 56 | size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); | ||
| 57 | |||
| 58 | for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) | 54 | for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) |
| 59 | continue; | 55 | continue; |
| 60 | 56 | ||
| @@ -62,6 +58,7 @@ base_len (char const *name) | |||
| 62 | && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) | 58 | && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) |
| 63 | return 2; | 59 | return 2; |
| 64 | 60 | ||
| 61 | size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); | ||
| 65 | if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len | 62 | if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len |
| 66 | && len == prefix_len && ISSLASH (name[prefix_len])) | 63 | && len == prefix_len && ISSLASH (name[prefix_len])) |
| 67 | return prefix_len + 1; | 64 | return prefix_len + 1; |
diff --git a/gl/basename-lgpl.h b/gl/basename-lgpl.h index 120bd1cf..fa43cffb 100644 --- a/gl/basename-lgpl.h +++ b/gl/basename-lgpl.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Extract the last component (base name) of a file name. | 1 | /* Extract the last component (base name) of a file name. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998, 2001, 2003-2006, 2009-2025 Free Software Foundation, | 3 | Copyright (C) 1998, 2001, 2003-2006, 2009-2026 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/basename.c b/gl/basename.c index 9d2852d4..3a825981 100644 --- a/gl/basename.c +++ b/gl/basename.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* basename.c -- return the last element in a file name | 1 | /* basename.c -- return the last element in a file name |
| 2 | 2 | ||
| 3 | Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2025 Free Software | 3 | Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert unibyte character to wide character. | 1 | /* Convert unibyte character to wide character. |
| 2 | Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/byteswap.c b/gl/byteswap.c index 97f7fc9e..e01eaa9a 100644 --- a/gl/byteswap.c +++ b/gl/byteswap.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <byteswap.h>. | 1 | /* Inline functions for <byteswap.h>. |
| 2 | 2 | ||
| 3 | Copyright 2024-2025 Free Software Foundation, Inc. | 3 | Copyright 2024-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define _GL_BYTESWAP_INLINE _GL_EXTERN_INLINE | 18 | #define _GL_BYTESWAP_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include <byteswap.h> | 20 | #include <byteswap.h> |
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h index 6b4fbabf..b2b26af8 100644 --- a/gl/byteswap.in.h +++ b/gl/byteswap.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* byteswap.h - Byte swapping | 1 | /* byteswap.h - Byte swapping |
| 2 | Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. | 3 | Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/c++defs.h b/gl/c++defs.h index df98a5ae..cfe68cb1 100644 --- a/gl/c++defs.h +++ b/gl/c++defs.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* C++ compatible function declaration macros. | 1 | /* C++ compatible function declaration macros. |
| 2 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU Lesser General Public License as published | 5 | under the terms of the GNU Lesser General Public License as published |
| @@ -127,6 +127,16 @@ | |||
| 127 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | 127 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ |
| 128 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | 128 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters |
| 129 | 129 | ||
| 130 | /* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to | ||
| 131 | parenthesized func otherwise. Parenthesization is needed in C23 if | ||
| 132 | the function is like strchr and so is a qualifier-generic macro | ||
| 133 | that expands to something more complicated. */ | ||
| 134 | #ifdef __cplusplus | ||
| 135 | # define _GL_FUNCDECL_SYS_NAME(func) func | ||
| 136 | #else | ||
| 137 | # define _GL_FUNCDECL_SYS_NAME(func) (func) | ||
| 138 | #endif | ||
| 139 | |||
| 130 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); | 140 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); |
| 131 | declares the system function, named func, with the given prototype, | 141 | declares the system function, named func, with the given prototype, |
| 132 | consisting of return type, parameters, and attributes. | 142 | consisting of return type, parameters, and attributes. |
| @@ -139,7 +149,7 @@ | |||
| 139 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | 149 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); |
| 140 | */ | 150 | */ |
| 141 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | 151 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ |
| 142 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters | 152 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters |
| 143 | 153 | ||
| 144 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | 154 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); |
| 145 | declares a C++ alias called GNULIB_NAMESPACE::func | 155 | declares a C++ alias called GNULIB_NAMESPACE::func |
| @@ -310,7 +320,7 @@ | |||
| 310 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | 320 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
| 311 | # define _GL_CXXALIASWARN_1(func,namespace) \ | 321 | # define _GL_CXXALIASWARN_1(func,namespace) \ |
| 312 | _GL_CXXALIASWARN_2 (func, namespace) | 322 | _GL_CXXALIASWARN_2 (func, namespace) |
| 313 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, | 323 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, |
| 314 | we enable the warning only when not optimizing. */ | 324 | we enable the warning only when not optimizing. */ |
| 315 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | 325 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
| 316 | # define _GL_CXXALIASWARN_2(func,namespace) \ | 326 | # define _GL_CXXALIASWARN_2(func,namespace) \ |
| @@ -338,7 +348,7 @@ | |||
| 338 | GNULIB_NAMESPACE) | 348 | GNULIB_NAMESPACE) |
| 339 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | 349 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
| 340 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | 350 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
| 341 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, | 351 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, |
| 342 | we enable the warning only when not optimizing. */ | 352 | we enable the warning only when not optimizing. */ |
| 343 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | 353 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
| 344 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | 354 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
diff --git a/gl/c-ctype.c b/gl/c-ctype.c index ecf2c083..cd9a205a 100644 --- a/gl/c-ctype.c +++ b/gl/c-ctype.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Character handling in C locale. | 1 | /* Character handling in C locale. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2003-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define C_CTYPE_INLINE _GL_EXTERN_INLINE | 18 | #define C_CTYPE_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include "c-ctype.h" | 20 | #include "c-ctype.h" |
diff --git a/gl/c-ctype.h b/gl/c-ctype.h index 39063142..e3448a43 100644 --- a/gl/c-ctype.h +++ b/gl/c-ctype.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | <ctype.h> functions' behaviour depends on the current locale set via | 5 | <ctype.h> functions' behaviour depends on the current locale set via |
| 6 | setlocale. | 6 | setlocale. |
| 7 | 7 | ||
| 8 | Copyright (C) 2000-2003, 2006, 2008-2025 Free Software Foundation, Inc. | 8 | Copyright (C) 2000-2003, 2006, 2008-2026 Free Software Foundation, Inc. |
| 9 | 9 | ||
| 10 | This file is free software: you can redistribute it and/or modify | 10 | This file is free software: you can redistribute it and/or modify |
| 11 | it under the terms of the GNU Lesser General Public License as | 11 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32is-impl.h b/gl/c32is-impl.h index 8366035d..7fa79291 100644 --- a/gl/c32is-impl.h +++ b/gl/c32is-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test whether a 32-bit wide character belongs to a specific character class. | 1 | /* Test whether a 32-bit wide character belongs to a specific character class. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -43,7 +43,7 @@ FUNC (wint_t wc) | |||
| 43 | /* The char32_t encoding of a multibyte character is defined by the way | 43 | /* The char32_t encoding of a multibyte character is defined by the way |
| 44 | mbrtoc32() is defined. */ | 44 | mbrtoc32() is defined. */ |
| 45 | 45 | ||
| 46 | #if GNULIB_defined_mbstate_t /* AIX, IRIX */ | 46 | #if GNULIB_defined_mbstate_t /* AIX */ |
| 47 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales | 47 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales |
| 48 | and directly for the UTF-8 locales. */ | 48 | and directly for the UTF-8 locales. */ |
| 49 | if (wc != WEOF) | 49 | if (wc != WEOF) |
diff --git a/gl/c32isalnum.c b/gl/c32isalnum.c index 7d0ebcf5..0972d5be 100644 --- a/gl/c32isalnum.c +++ b/gl/c32isalnum.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being alphanumeric. | 1 | /* Test 32-bit wide character for being alphanumeric. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isalpha.c b/gl/c32isalpha.c index 308fd76a..1dde246d 100644 --- a/gl/c32isalpha.c +++ b/gl/c32isalpha.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being alphabetic. | 1 | /* Test 32-bit wide character for being alphabetic. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isblank.c b/gl/c32isblank.c index 1a03c2db..36f21ec1 100644 --- a/gl/c32isblank.c +++ b/gl/c32isblank.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being blank. | 1 | /* Test 32-bit wide character for being blank. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32iscntrl.c b/gl/c32iscntrl.c index 1d004087..dcb32705 100644 --- a/gl/c32iscntrl.c +++ b/gl/c32iscntrl.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being a control character. | 1 | /* Test 32-bit wide character for being a control character. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isdigit.c b/gl/c32isdigit.c index 7d3bda81..96374718 100644 --- a/gl/c32isdigit.c +++ b/gl/c32isdigit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being a digit. | 1 | /* Test 32-bit wide character for being a digit. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isgraph.c b/gl/c32isgraph.c index 8b68ae39..f660ceba 100644 --- a/gl/c32isgraph.c +++ b/gl/c32isgraph.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being graphic. | 1 | /* Test 32-bit wide character for being graphic. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32islower.c b/gl/c32islower.c index 1ce08cf4..98abb8a2 100644 --- a/gl/c32islower.c +++ b/gl/c32islower.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being lowercase. | 1 | /* Test 32-bit wide character for being lowercase. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isprint.c b/gl/c32isprint.c index d47ce1f8..72975751 100644 --- a/gl/c32isprint.c +++ b/gl/c32isprint.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being printable. | 1 | /* Test 32-bit wide character for being printable. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32ispunct.c b/gl/c32ispunct.c index 41ac3d70..1945c6c5 100644 --- a/gl/c32ispunct.c +++ b/gl/c32ispunct.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being a punctuation or symbol character. | 1 | /* Test 32-bit wide character for being a punctuation or symbol character. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isspace.c b/gl/c32isspace.c index 2393142b..58e2a02a 100644 --- a/gl/c32isspace.c +++ b/gl/c32isspace.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being white-space. | 1 | /* Test 32-bit wide character for being white-space. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isupper.c b/gl/c32isupper.c index bfe4a148..29558234 100644 --- a/gl/c32isupper.c +++ b/gl/c32isupper.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being uppercase. | 1 | /* Test 32-bit wide character for being uppercase. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32isxdigit.c b/gl/c32isxdigit.c index b38d7f1f..c9262b58 100644 --- a/gl/c32isxdigit.c +++ b/gl/c32isxdigit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test 32-bit wide character for being a hexadecimal digit. | 1 | /* Test 32-bit wide character for being a hexadecimal digit. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32to-impl.h b/gl/c32to-impl.h index a63a25b6..2528e51d 100644 --- a/gl/c32to-impl.h +++ b/gl/c32to-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Case mapping of a 32-bit wide character. | 1 | /* Case mapping of a 32-bit wide character. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -39,7 +39,7 @@ FUNC (wint_t wc) | |||
| 39 | /* The char32_t encoding of a multibyte character is defined by the way | 39 | /* The char32_t encoding of a multibyte character is defined by the way |
| 40 | mbrtoc32() is defined. */ | 40 | mbrtoc32() is defined. */ |
| 41 | 41 | ||
| 42 | #if GNULIB_defined_mbstate_t /* AIX, IRIX */ | 42 | #if GNULIB_defined_mbstate_t /* AIX */ |
| 43 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales | 43 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales |
| 44 | and directly for the UTF-8 locales. */ | 44 | and directly for the UTF-8 locales. */ |
| 45 | if (wc != WEOF) | 45 | if (wc != WEOF) |
diff --git a/gl/c32tolower.c b/gl/c32tolower.c index a0b0523f..15608d88 100644 --- a/gl/c32tolower.c +++ b/gl/c32tolower.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Map a 32-bit wide character to lowercase. | 1 | /* Map a 32-bit wide character to lowercase. |
| 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/c32width.c b/gl/c32width.c index 442a432c..727c2bd3 100644 --- a/gl/c32width.c +++ b/gl/c32width.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Determine the number of screen columns needed for a 32-bit wide character. | 1 | /* Determine the number of screen columns needed for a 32-bit wide character. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -49,7 +49,7 @@ c32width (char32_t wc) | |||
| 49 | /* The char32_t encoding of a multibyte character is defined by the way | 49 | /* The char32_t encoding of a multibyte character is defined by the way |
| 50 | mbrtoc32() is defined. */ | 50 | mbrtoc32() is defined. */ |
| 51 | 51 | ||
| 52 | #if GNULIB_defined_mbstate_t /* AIX, IRIX */ | 52 | #if GNULIB_defined_mbstate_t /* AIX */ |
| 53 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales | 53 | /* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales |
| 54 | and directly for the UTF-8 locales. */ | 54 | and directly for the UTF-8 locales. */ |
| 55 | const char *encoding = locale_charset (); | 55 | const char *encoding = locale_charset (); |
diff --git a/gl/calloc.c b/gl/calloc.c index 5258c5de..b4ca8f89 100644 --- a/gl/calloc.c +++ b/gl/calloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* calloc() function that is glibc compatible. | 1 | /* calloc() function that is glibc compatible. |
| 2 | This wrapper function is required at least on Tru64 UNIX 5.1 and mingw. | 2 | This wrapper function is required at least on mingw. |
| 3 | Copyright (C) 2004-2007, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2004-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1992-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2026 Free Software Foundation, Inc. |
| 2 | Copyright The GNU Toolchain Authors. | 2 | Copyright The GNU Toolchain Authors. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
diff --git a/gl/cloexec.c b/gl/cloexec.c index 8ab5591f..3d4f916b 100644 --- a/gl/cloexec.c +++ b/gl/cloexec.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag | 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag |
| 2 | 2 | ||
| 3 | Copyright (C) 1991, 2004-2006, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1991, 2004-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/cloexec.h b/gl/cloexec.h index 0eb9fa09..3716bd72 100644 --- a/gl/cloexec.h +++ b/gl/cloexec.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag | 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag |
| 2 | 2 | ||
| 3 | Copyright (C) 2004, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* close replacement. | 1 | /* close replacement. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c index 9e0ec565..9f772e0f 100644 --- a/gl/dirname-lgpl.c +++ b/gl/dirname-lgpl.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* dirname.c -- return all but the last element in a file name | 1 | /* dirname.c -- return all but the last element in a file name |
| 2 | 2 | ||
| 3 | Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2025 Free Software | 3 | Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -32,7 +32,6 @@ size_t | |||
| 32 | dir_len (char const *file) | 32 | dir_len (char const *file) |
| 33 | { | 33 | { |
| 34 | size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); | 34 | size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); |
| 35 | size_t length; | ||
| 36 | 35 | ||
| 37 | /* Advance prefix_length beyond important leading slashes. */ | 36 | /* Advance prefix_length beyond important leading slashes. */ |
| 38 | prefix_length += (prefix_length != 0 | 37 | prefix_length += (prefix_length != 0 |
| @@ -45,8 +44,10 @@ dir_len (char const *file) | |||
| 45 | : 0)); | 44 | : 0)); |
| 46 | 45 | ||
| 47 | /* Strip the basename and any redundant slashes before it. */ | 46 | /* Strip the basename and any redundant slashes before it. */ |
| 47 | size_t length; | ||
| 48 | for (length = last_component (file) - file; | 48 | for (length = last_component (file) - file; |
| 49 | prefix_length < length; length--) | 49 | prefix_length < length; |
| 50 | length--) | ||
| 50 | if (! ISSLASH (file[length - 1])) | 51 | if (! ISSLASH (file[length - 1])) |
| 51 | break; | 52 | break; |
| 52 | return length; | 53 | return length; |
diff --git a/gl/dirname.c b/gl/dirname.c index e747fcaf..a67c7593 100644 --- a/gl/dirname.c +++ b/gl/dirname.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* dirname.c -- return all but the last element in a file name | 1 | /* dirname.c -- return all but the last element in a file name |
| 2 | 2 | ||
| 3 | Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2025 Free Software | 3 | Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/gl/dirname.h b/gl/dirname.h index d4d03f66..8ecbb9e6 100644 --- a/gl/dirname.h +++ b/gl/dirname.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Take file names apart into directory and base names. | 1 | /* Take file names apart into directory and base names. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998, 2001, 2003-2006, 2009-2025 Free Software Foundation, | 3 | Copyright (C) 1998, 2001, 2003-2006, 2009-2026 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Duplicate an open file descriptor to a specified file descriptor. | 1 | /* Duplicate an open file descriptor to a specified file descriptor. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2004-2007, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1999, 2004-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -70,8 +70,6 @@ dup2_nothrow (int fd, int desired_fd) | |||
| 70 | static int | 70 | static int |
| 71 | ms_windows_dup2 (int fd, int desired_fd) | 71 | ms_windows_dup2 (int fd, int desired_fd) |
| 72 | { | 72 | { |
| 73 | int result; | ||
| 74 | |||
| 75 | /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, | 73 | /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, |
| 76 | dup2 (fd, fd) returns 0, but all further attempts to use fd in | 74 | dup2 (fd, fd) returns 0, but all further attempts to use fd in |
| 77 | future dup2 calls will hang. */ | 75 | future dup2 calls will hang. */ |
| @@ -93,7 +91,7 @@ ms_windows_dup2 (int fd, int desired_fd) | |||
| 93 | return -1; | 91 | return -1; |
| 94 | } | 92 | } |
| 95 | 93 | ||
| 96 | result = dup2_nothrow (fd, desired_fd); | 94 | int result = dup2_nothrow (fd, desired_fd); |
| 97 | 95 | ||
| 98 | if (result == 0) | 96 | if (result == 0) |
| 99 | result = desired_fd; | 97 | result = desired_fd; |
| @@ -110,14 +108,11 @@ ms_windows_dup2 (int fd, int desired_fd) | |||
| 110 | static int | 108 | static int |
| 111 | klibc_dup2dirfd (int fd, int desired_fd) | 109 | klibc_dup2dirfd (int fd, int desired_fd) |
| 112 | { | 110 | { |
| 113 | int tempfd; | 111 | int tempfd = open ("NUL", O_RDONLY); |
| 114 | int dupfd; | 112 | if (tempfd < 0) |
| 115 | 113 | return tempfd; | |
| 116 | tempfd = open ("NUL", O_RDONLY); | ||
| 117 | if (tempfd == -1) | ||
| 118 | return -1; | ||
| 119 | 114 | ||
| 120 | if (tempfd == desired_fd) | 115 | if (tempfd >= desired_fd) |
| 121 | { | 116 | { |
| 122 | close (tempfd); | 117 | close (tempfd); |
| 123 | 118 | ||
| @@ -125,10 +120,32 @@ klibc_dup2dirfd (int fd, int desired_fd) | |||
| 125 | if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) | 120 | if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) |
| 126 | return -1; | 121 | return -1; |
| 127 | 122 | ||
| 128 | return open(path, O_RDONLY); | 123 | for (;;) |
| 124 | { | ||
| 125 | close (desired_fd); | ||
| 126 | |||
| 127 | int dupfd = open (path, O_RDONLY); | ||
| 128 | if (dupfd < 0) | ||
| 129 | return dupfd; | ||
| 130 | |||
| 131 | if (dupfd == desired_fd) | ||
| 132 | return dupfd; | ||
| 133 | |||
| 134 | /* If lower FD was closed by other threads, fill again. */ | ||
| 135 | if (dupfd < desired_fd) | ||
| 136 | { | ||
| 137 | tempfd = dupfd; | ||
| 138 | break; | ||
| 139 | } | ||
| 140 | |||
| 141 | /* desired_fd was opened by other threads. Try again. */ | ||
| 142 | /* FIXME: Closing desired_fd opened by other threads may lead to | ||
| 143 | unexpected behavior. */ | ||
| 144 | close (dupfd); | ||
| 145 | } | ||
| 129 | } | 146 | } |
| 130 | 147 | ||
| 131 | dupfd = klibc_dup2dirfd (fd, desired_fd); | 148 | int dupfd = klibc_dup2dirfd (fd, desired_fd); |
| 132 | 149 | ||
| 133 | close (tempfd); | 150 | close (tempfd); |
| 134 | 151 | ||
| @@ -138,16 +155,16 @@ klibc_dup2dirfd (int fd, int desired_fd) | |||
| 138 | static int | 155 | static int |
| 139 | klibc_dup2 (int fd, int desired_fd) | 156 | klibc_dup2 (int fd, int desired_fd) |
| 140 | { | 157 | { |
| 141 | int dupfd; | 158 | int dupfd = dup2 (fd, desired_fd); |
| 142 | struct stat sbuf; | 159 | if (dupfd < 0 && errno == ENOTSUP) |
| 143 | |||
| 144 | dupfd = dup2 (fd, desired_fd); | ||
| 145 | if (dupfd == -1 && errno == ENOTSUP \ | ||
| 146 | && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) | ||
| 147 | { | 160 | { |
| 148 | close (desired_fd); | 161 | struct stat sbuf; |
| 162 | if (!fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) | ||
| 163 | { | ||
| 164 | close (desired_fd); | ||
| 149 | 165 | ||
| 150 | return klibc_dup2dirfd (fd, desired_fd); | 166 | return klibc_dup2dirfd (fd, desired_fd); |
| 167 | } | ||
| 151 | } | 168 | } |
| 152 | 169 | ||
| 153 | return dupfd; | 170 | return dupfd; |
| @@ -159,8 +176,6 @@ klibc_dup2 (int fd, int desired_fd) | |||
| 159 | int | 176 | int |
| 160 | rpl_dup2 (int fd, int desired_fd) | 177 | rpl_dup2 (int fd, int desired_fd) |
| 161 | { | 178 | { |
| 162 | int result; | ||
| 163 | |||
| 164 | #ifdef F_GETFL | 179 | #ifdef F_GETFL |
| 165 | /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. | 180 | /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. |
| 166 | On Cygwin 1.5.x, dup2 (1, 1) returns 0. | 181 | On Cygwin 1.5.x, dup2 (1, 1) returns 0. |
| @@ -176,13 +191,14 @@ rpl_dup2 (int fd, int desired_fd) | |||
| 176 | return fcntl (fd, F_GETFL) == -1 ? -1 : fd; | 191 | return fcntl (fd, F_GETFL) == -1 ? -1 : fd; |
| 177 | #endif | 192 | #endif |
| 178 | 193 | ||
| 179 | result = dup2 (fd, desired_fd); | 194 | int result = dup2 (fd, desired_fd); |
| 180 | 195 | ||
| 181 | /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ | 196 | /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ |
| 182 | if (result == -1 && errno == EMFILE) | 197 | if (result < 0 && errno == EMFILE) |
| 183 | errno = EBADF; | 198 | errno = EBADF; |
| 199 | |||
| 184 | #if REPLACE_FCHDIR | 200 | #if REPLACE_FCHDIR |
| 185 | if (fd != desired_fd && result != -1) | 201 | if (! (result < 0 || fd == desired_fd)) |
| 186 | result = _gl_register_dup (fd, result); | 202 | result = _gl_register_dup (fd, result); |
| 187 | #endif | 203 | #endif |
| 188 | return result; | 204 | return result; |
diff --git a/gl/dynarray.h b/gl/dynarray.h index 74471ea2..a5cdf630 100644 --- a/gl/dynarray.h +++ b/gl/dynarray.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Type-safe arrays which grow dynamically. | 1 | /* Type-safe arrays which grow dynamically. |
| 2 | Copyright 2021-2025 Free Software Foundation, Inc. | 2 | Copyright 2021-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/errno.in.h b/gl/errno.in.h index ba5dd371..784a4018 100644 --- a/gl/errno.in.h +++ b/gl/errno.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A POSIX-like <errno.h>. | 1 | /* A POSIX-like <errno.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -148,27 +148,11 @@ | |||
| 148 | # endif | 148 | # endif |
| 149 | 149 | ||
| 150 | 150 | ||
| 151 | /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros | ||
| 152 | EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ | ||
| 153 | # if @EMULTIHOP_HIDDEN@ | ||
| 154 | # define EMULTIHOP @EMULTIHOP_VALUE@ | ||
| 155 | # define GNULIB_defined_EMULTIHOP 1 | ||
| 156 | # endif | ||
| 157 | # if @ENOLINK_HIDDEN@ | ||
| 158 | # define ENOLINK @ENOLINK_VALUE@ | ||
| 159 | # define GNULIB_defined_ENOLINK 1 | ||
| 160 | # endif | ||
| 161 | # if @EOVERFLOW_HIDDEN@ | ||
| 162 | # define EOVERFLOW @EOVERFLOW_VALUE@ | ||
| 163 | # define GNULIB_defined_EOVERFLOW 1 | ||
| 164 | # endif | ||
| 165 | |||
| 166 | |||
| 167 | /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, | 151 | /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, |
| 168 | EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. | 152 | EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. |
| 169 | Likewise, on NonStop Kernel, EDQUOT is not defined. | 153 | Likewise, on NonStop Kernel, EDQUOT is not defined. |
| 170 | Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, | 154 | Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, |
| 171 | HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. | 155 | HP-UX EWOULDBLOCK = 246. |
| 172 | 156 | ||
| 173 | Note: When one of these systems defines some of these macros some day, | 157 | Note: When one of these systems defines some of these macros some day, |
| 174 | binaries will have to be recompiled so that they recognizes the new | 158 | binaries will have to be recompiled so that they recognizes the new |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Error handler for noninteractive utilities | 1 | /* Error handler for noninteractive utilities |
| 2 | Copyright (C) 1990-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1990-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| @@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | #if !_LIBC && ENABLE_NLS | 39 | #if !_LIBC && ENABLE_NLS |
| 40 | # include "gettext.h" | 40 | # include "gettext.h" |
| 41 | # define _(msgid) dgettext ("gnulib", msgid) | 41 | # define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid) |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #ifdef _LIBC | 44 | #ifdef _LIBC |
diff --git a/gl/error.in.h b/gl/error.in.h index 6c512ec8..3355fb3b 100644 --- a/gl/error.in.h +++ b/gl/error.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for error-reporting functions. | 1 | /* Declarations for error-reporting functions. |
| 2 | Copyright (C) 1995-1997, 2003, 2006, 2008-2025 Free Software Foundation, | 2 | Copyright (C) 1995-1997, 2003, 2006, 2008-2026 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
diff --git a/gl/exitfail.c b/gl/exitfail.c index 5b37c10b..148468b7 100644 --- a/gl/exitfail.c +++ b/gl/exitfail.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Failure exit status | 1 | /* Failure exit status |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/exitfail.h b/gl/exitfail.h index 9d6b1528..64e2aa33 100644 --- a/gl/exitfail.h +++ b/gl/exitfail.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Failure exit status | 1 | /* Failure exit status |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide file descriptor control. | 1 | /* Provide file descriptor control. |
| 2 | 2 | ||
| 3 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -30,6 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | #ifdef __KLIBC__ | 31 | #ifdef __KLIBC__ |
| 32 | # include <emx/io.h> | 32 | # include <emx/io.h> |
| 33 | # include <InnoTekLIBC/backend.h> | ||
| 33 | #endif | 34 | #endif |
| 34 | 35 | ||
| 35 | #if defined _WIN32 && ! defined __CYGWIN__ | 36 | #if defined _WIN32 && ! defined __CYGWIN__ |
| @@ -55,19 +56,15 @@ dupfd (int oldfd, int newfd, int flags) | |||
| 55 | { | 56 | { |
| 56 | /* Mingw has no way to create an arbitrary fd. Iterate until all | 57 | /* Mingw has no way to create an arbitrary fd. Iterate until all |
| 57 | file descriptors less than newfd are filled up. */ | 58 | file descriptors less than newfd are filled up. */ |
| 58 | HANDLE curr_process = GetCurrentProcess (); | ||
| 59 | HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); | ||
| 60 | unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; | ||
| 61 | unsigned int fds_to_close_bound = 0; | ||
| 62 | int result; | ||
| 63 | BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; | ||
| 64 | int mode; | ||
| 65 | 59 | ||
| 66 | if (newfd < 0 || getdtablesize () <= newfd) | 60 | if (newfd < 0 || getdtablesize () <= newfd) |
| 67 | { | 61 | { |
| 68 | errno = EINVAL; | 62 | errno = EINVAL; |
| 69 | return -1; | 63 | return -1; |
| 70 | } | 64 | } |
| 65 | |||
| 66 | HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); | ||
| 67 | int mode; | ||
| 71 | if (old_handle == INVALID_HANDLE_VALUE | 68 | if (old_handle == INVALID_HANDLE_VALUE |
| 72 | || (mode = _setmode (oldfd, O_BINARY)) == -1) | 69 | || (mode = _setmode (oldfd, O_BINARY)) == -1) |
| 73 | { | 70 | { |
| @@ -79,6 +76,11 @@ dupfd (int oldfd, int newfd, int flags) | |||
| 79 | _setmode (oldfd, mode); | 76 | _setmode (oldfd, mode); |
| 80 | flags |= mode; | 77 | flags |= mode; |
| 81 | 78 | ||
| 79 | HANDLE curr_process = GetCurrentProcess (); | ||
| 80 | BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; | ||
| 81 | unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; | ||
| 82 | unsigned int fds_to_close_bound = 0; | ||
| 83 | int result; | ||
| 82 | for (;;) | 84 | for (;;) |
| 83 | { | 85 | { |
| 84 | HANDLE new_handle; | 86 | HANDLE new_handle; |
| @@ -145,9 +147,8 @@ dupfd (int oldfd, int newfd, int flags) | |||
| 145 | /* Close the previous fds that turned out to be too small. */ | 147 | /* Close the previous fds that turned out to be too small. */ |
| 146 | { | 148 | { |
| 147 | int saved_errno = errno; | 149 | int saved_errno = errno; |
| 148 | unsigned int duplicated_fd; | ||
| 149 | 150 | ||
| 150 | for (duplicated_fd = 0; | 151 | for (unsigned int duplicated_fd = 0; |
| 151 | duplicated_fd < fds_to_close_bound * CHAR_BIT; | 152 | duplicated_fd < fds_to_close_bound * CHAR_BIT; |
| 152 | duplicated_fd++) | 153 | duplicated_fd++) |
| 153 | if ((fds_to_close[duplicated_fd / CHAR_BIT] | 154 | if ((fds_to_close[duplicated_fd / CHAR_BIT] |
| @@ -205,8 +206,9 @@ fcntl (int fd, int action, /* arg */...) | |||
| 205 | #endif | 206 | #endif |
| 206 | { | 207 | { |
| 207 | va_list arg; | 208 | va_list arg; |
| 208 | int result = -1; | ||
| 209 | va_start (arg, action); | 209 | va_start (arg, action); |
| 210 | |||
| 211 | int result = -1; | ||
| 210 | switch (action) | 212 | switch (action) |
| 211 | { | 213 | { |
| 212 | case F_DUPFD: | 214 | case F_DUPFD: |
| @@ -375,12 +377,6 @@ fcntl (int fd, int action, /* arg */...) | |||
| 375 | #ifdef F_NOTIFY /* Linux */ | 377 | #ifdef F_NOTIFY /* Linux */ |
| 376 | case F_NOTIFY: | 378 | case F_NOTIFY: |
| 377 | #endif | 379 | #endif |
| 378 | #ifdef F_OPLKACK /* IRIX */ | ||
| 379 | case F_OPLKACK: | ||
| 380 | #endif | ||
| 381 | #ifdef F_OPLKREG /* IRIX */ | ||
| 382 | case F_OPLKREG: | ||
| 383 | #endif | ||
| 384 | #ifdef F_RDAHEAD /* macOS */ | 380 | #ifdef F_RDAHEAD /* macOS */ |
| 385 | case F_RDAHEAD: | 381 | case F_RDAHEAD: |
| 386 | #endif | 382 | #endif |
| @@ -438,7 +434,9 @@ fcntl (int fd, int action, /* arg */...) | |||
| 438 | break; | 434 | break; |
| 439 | } | 435 | } |
| 440 | } | 436 | } |
| 437 | |||
| 441 | va_end (arg); | 438 | va_end (arg); |
| 439 | |||
| 442 | return result; | 440 | return result; |
| 443 | } | 441 | } |
| 444 | 442 | ||
| @@ -545,86 +543,115 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | |||
| 545 | #undef fcntl | 543 | #undef fcntl |
| 546 | 544 | ||
| 547 | #ifdef __KLIBC__ | 545 | #ifdef __KLIBC__ |
| 548 | |||
| 549 | static int | 546 | static int |
| 550 | klibc_fcntl (int fd, int action, /* arg */...) | 547 | klibc_dupdirfd (int fd, int minfd) |
| 551 | { | 548 | { |
| 552 | va_list arg_ptr; | 549 | int tempfd = open ("NUL", O_RDONLY); |
| 553 | int arg; | 550 | if (tempfd == -1) |
| 554 | struct stat sbuf; | 551 | return -1; |
| 555 | int result; | ||
| 556 | 552 | ||
| 557 | va_start (arg_ptr, action); | 553 | if (tempfd >= minfd) |
| 558 | arg = va_arg (arg_ptr, int); | ||
| 559 | result = fcntl (fd, action, arg); | ||
| 560 | /* EPERM for F_DUPFD, ENOTSUP for others */ | ||
| 561 | if (result == -1 && (errno == EPERM || errno == ENOTSUP) | ||
| 562 | && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) | ||
| 563 | { | 554 | { |
| 564 | PLIBCFH pFH; | 555 | close (tempfd); |
| 565 | unsigned fFlags; | ||
| 566 | 556 | ||
| 567 | switch (action) | 557 | char path[_MAX_PATH]; |
| 568 | { | 558 | if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) |
| 569 | case F_DUPFD: | 559 | return -1; |
| 570 | /* Find available fd */ | ||
| 571 | while (fcntl (arg, F_GETFL) != -1 || errno != EBADF) | ||
| 572 | arg++; | ||
| 573 | 560 | ||
| 574 | result = dup2 (fd, arg); | 561 | int dupfd = open (path, O_RDONLY); |
| 575 | break; | 562 | if (dupfd == -1) |
| 563 | return -1; | ||
| 576 | 564 | ||
| 577 | case F_GETFD: | 565 | if (dupfd >= minfd) |
| 578 | pFH = __libc_FH (fd); | 566 | return dupfd; |
| 579 | if (!pFH) | ||
| 580 | { | ||
| 581 | errno = EBADF; | ||
| 582 | break; | ||
| 583 | } | ||
| 584 | 567 | ||
| 585 | result = (pFH->fFlags & ((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT ) | 568 | /* Lower FD was closed by other threads. Fill again. */ |
| 586 | | O_NOINHERIT)) ? FD_CLOEXEC : 0; | 569 | tempfd = dupfd; |
| 587 | break; | 570 | } |
| 588 | 571 | ||
| 589 | case F_SETFD: | 572 | int dupfd = klibc_dupdirfd (fd, minfd); |
| 590 | if (arg & ~FD_CLOEXEC) | ||
| 591 | break; | ||
| 592 | 573 | ||
| 593 | pFH = __libc_FH (fd); | 574 | close (tempfd); |
| 594 | if (!pFH) | 575 | |
| 576 | return dupfd; | ||
| 577 | } | ||
| 578 | |||
| 579 | static int | ||
| 580 | klibc_fcntl (int fd, int action, /* arg */...) | ||
| 581 | { | ||
| 582 | va_list arg_ptr; | ||
| 583 | va_start (arg_ptr, action); | ||
| 584 | |||
| 585 | int arg = va_arg (arg_ptr, int); | ||
| 586 | int result = fcntl (fd, action, arg); | ||
| 587 | /* EPERM for F_DUPFD, ENOTSUP for others */ | ||
| 588 | if (result == -1 && (errno == EPERM || errno == ENOTSUP)) | ||
| 589 | { | ||
| 590 | struct stat sbuf; | ||
| 591 | if (!fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) | ||
| 592 | { | ||
| 593 | switch (action) | ||
| 595 | { | 594 | { |
| 596 | errno = EBADF; | 595 | case F_DUPFD: |
| 596 | result = klibc_dupdirfd (fd, arg); | ||
| 597 | break; | 597 | break; |
| 598 | } | ||
| 599 | 598 | ||
| 600 | fFlags = pFH->fFlags; | 599 | case F_GETFD: |
| 601 | if (arg & FD_CLOEXEC) | 600 | { |
| 602 | fFlags |= (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT; | 601 | PLIBCFH pFH = __libc_FH (fd); |
| 603 | else | 602 | if (!pFH) |
| 604 | fFlags &= ~((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT); | 603 | { |
| 604 | errno = EBADF; | ||
| 605 | break; | ||
| 606 | } | ||
| 607 | |||
| 608 | result = (pFH->fFlags & ((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT ) | ||
| 609 | | O_NOINHERIT)) ? FD_CLOEXEC : 0; | ||
| 610 | } | ||
| 611 | break; | ||
| 605 | 612 | ||
| 606 | result = __libc_FHSetFlags (pFH, fd, fFlags); | 613 | case F_SETFD: |
| 607 | if (result < 0) | 614 | { |
| 608 | { | 615 | if (arg & ~FD_CLOEXEC) |
| 609 | errno = -result; | 616 | break; |
| 610 | result = -1; | 617 | |
| 611 | } | 618 | PLIBCFH pFH = __libc_FH (fd); |
| 612 | break; | 619 | if (!pFH) |
| 620 | { | ||
| 621 | errno = EBADF; | ||
| 622 | break; | ||
| 623 | } | ||
| 624 | |||
| 625 | unsigned fFlags = pFH->fFlags; | ||
| 626 | if (arg & FD_CLOEXEC) | ||
| 627 | fFlags |= (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT; | ||
| 628 | else | ||
| 629 | fFlags &= ~((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT); | ||
| 630 | |||
| 631 | result = __libc_FHSetFlags (pFH, fd, fFlags); | ||
| 632 | if (result < 0) | ||
| 633 | { | ||
| 634 | errno = -result; | ||
| 635 | result = -1; | ||
| 636 | } | ||
| 637 | } | ||
| 638 | break; | ||
| 613 | 639 | ||
| 614 | case F_GETFL: | 640 | case F_GETFL: |
| 615 | result = 0; | 641 | result = 0; |
| 616 | break; | 642 | break; |
| 617 | 643 | ||
| 618 | case F_SETFL: | 644 | case F_SETFL: |
| 619 | if (arg != 0) | 645 | if (arg != 0) |
| 620 | break; | 646 | break; |
| 621 | 647 | ||
| 622 | result = 0; | 648 | result = 0; |
| 623 | break; | 649 | break; |
| 624 | 650 | ||
| 625 | default: | 651 | default: |
| 626 | errno = EINVAL; | 652 | errno = EINVAL; |
| 627 | break; | 653 | break; |
| 654 | } | ||
| 628 | } | 655 | } |
| 629 | } | 656 | } |
| 630 | 657 | ||
diff --git a/gl/fcntl.in.h b/gl/fcntl.in.h index c5068ed4..52727074 100644 --- a/gl/fcntl.in.h +++ b/gl/fcntl.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Like <fcntl.h>, but with non-working flags defined to 0. | 1 | /* Like <fcntl.h>, but with non-working flags defined to 0. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -122,7 +122,6 @@ _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); | |||
| 122 | # endif | 122 | # endif |
| 123 | _GL_CXXALIASWARN (creat); | 123 | _GL_CXXALIASWARN (creat); |
| 124 | #elif defined GNULIB_POSIXCHECK | 124 | #elif defined GNULIB_POSIXCHECK |
| 125 | # undef creat | ||
| 126 | /* Assume creat is always declared. */ | 125 | /* Assume creat is always declared. */ |
| 127 | _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " | 126 | _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " |
| 128 | "use gnulib module creat for portability"); | 127 | "use gnulib module creat for portability"); |
| @@ -165,7 +164,6 @@ _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); | |||
| 165 | # endif | 164 | # endif |
| 166 | _GL_CXXALIASWARN (fcntl); | 165 | _GL_CXXALIASWARN (fcntl); |
| 167 | #elif defined GNULIB_POSIXCHECK | 166 | #elif defined GNULIB_POSIXCHECK |
| 168 | # undef fcntl | ||
| 169 | # if HAVE_RAW_DECL_FCNTL | 167 | # if HAVE_RAW_DECL_FCNTL |
| 170 | _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " | 168 | _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " |
| 171 | "use gnulib module fcntl for portability"); | 169 | "use gnulib module fcntl for portability"); |
| @@ -196,7 +194,6 @@ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); | |||
| 196 | _GL_CXXALIASWARN (open); | 194 | _GL_CXXALIASWARN (open); |
| 197 | # endif | 195 | # endif |
| 198 | #elif defined GNULIB_POSIXCHECK | 196 | #elif defined GNULIB_POSIXCHECK |
| 199 | # undef open | ||
| 200 | /* Assume open is always declared. */ | 197 | /* Assume open is always declared. */ |
| 201 | _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " | 198 | _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " |
| 202 | "use gnulib module open for portability"); | 199 | "use gnulib module open for portability"); |
| @@ -242,13 +239,51 @@ _GL_CXXALIAS_SYS (openat, int, | |||
| 242 | # endif | 239 | # endif |
| 243 | _GL_CXXALIASWARN (openat); | 240 | _GL_CXXALIASWARN (openat); |
| 244 | #elif defined GNULIB_POSIXCHECK | 241 | #elif defined GNULIB_POSIXCHECK |
| 245 | # undef openat | ||
| 246 | # if HAVE_RAW_DECL_OPENAT | 242 | # if HAVE_RAW_DECL_OPENAT |
| 247 | _GL_WARN_ON_USE (openat, "openat is not portable - " | 243 | _GL_WARN_ON_USE (openat, "openat is not portable - " |
| 248 | "use gnulib module openat for portability"); | 244 | "use gnulib module openat for portability"); |
| 249 | # endif | 245 | # endif |
| 250 | #endif | 246 | #endif |
| 251 | 247 | ||
| 248 | #if @GNULIB_OPENAT2@ | ||
| 249 | # if !defined RESOLVE_NO_XDEV && defined __has_include | ||
| 250 | # if __has_include (<linux/openat2.h>) | ||
| 251 | # include <linux/openat2.h> | ||
| 252 | # endif | ||
| 253 | # endif | ||
| 254 | # ifndef RESOLVE_NO_XDEV | ||
| 255 | struct open_how | ||
| 256 | { | ||
| 257 | # ifdef __UINT64_TYPE__ | ||
| 258 | __UINT64_TYPE__ flags, mode, resolve; | ||
| 259 | # else | ||
| 260 | unsigned long long int flags, mode, resolve; | ||
| 261 | # endif | ||
| 262 | }; | ||
| 263 | # define RESOLVE_NO_XDEV 0x01 | ||
| 264 | # define RESOLVE_NO_MAGICLINKS 0x02 | ||
| 265 | # define RESOLVE_NO_SYMLINKS 0x04 | ||
| 266 | # define RESOLVE_BENEATH 0x08 | ||
| 267 | # define RESOLVE_IN_ROOT 0x10 | ||
| 268 | # define RESOLVE_CACHED 0x20 | ||
| 269 | # endif | ||
| 270 | |||
| 271 | # if !@HAVE_OPENAT2@ | ||
| 272 | _GL_FUNCDECL_SYS (openat2, int, | ||
| 273 | (int fd, char const *file, struct open_how const *how, | ||
| 274 | size_t size), | ||
| 275 | _GL_ARG_NONNULL ((2, 3))); | ||
| 276 | # endif | ||
| 277 | _GL_CXXALIAS_SYS (openat2, int, | ||
| 278 | (int fd, char const *file, struct open_how const *how, | ||
| 279 | size_t size)); | ||
| 280 | _GL_CXXALIASWARN (openat2); | ||
| 281 | #elif defined GNULIB_POSIXCHECK | ||
| 282 | # if HAVE_RAW_DECL_OPENAT2 | ||
| 283 | _GL_WARN_ON_USE (openat2, "openat2 is not portable - " | ||
| 284 | "use gnulib module openat2 for portability"); | ||
| 285 | # endif | ||
| 286 | #endif | ||
| 252 | 287 | ||
| 253 | /* Fix up the FD_* macros, only known to be missing on mingw. */ | 288 | /* Fix up the FD_* macros, only known to be missing on mingw. */ |
| 254 | 289 | ||
| @@ -293,11 +328,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " | |||
| 293 | # endif | 328 | # endif |
| 294 | #endif | 329 | #endif |
| 295 | 330 | ||
| 296 | #if !defined O_DIRECT && defined O_DIRECTIO | ||
| 297 | /* Tru64 spells it 'O_DIRECTIO'. */ | ||
| 298 | # define O_DIRECT O_DIRECTIO | ||
| 299 | #endif | ||
| 300 | |||
| 301 | #if !defined O_CLOEXEC && defined O_NOINHERIT | 331 | #if !defined O_CLOEXEC && defined O_NOINHERIT |
| 302 | /* Mingw spells it 'O_NOINHERIT'. */ | 332 | /* Mingw spells it 'O_NOINHERIT'. */ |
| 303 | # define O_CLOEXEC O_NOINHERIT | 333 | # define O_CLOEXEC O_NOINHERIT |
| @@ -460,6 +490,15 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " | |||
| 460 | # define AT_NO_AUTOMOUNT 0 | 490 | # define AT_NO_AUTOMOUNT 0 |
| 461 | #endif | 491 | #endif |
| 462 | 492 | ||
| 493 | /* errno when openat+O_NOFOLLOW fails because the file is a symlink. */ | ||
| 494 | #if defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __DragonFly__ | ||
| 495 | # define _GL_OPENAT_ESYMLINK EMLINK | ||
| 496 | #elif defined __NetBSD__ | ||
| 497 | # define _GL_OPENAT_ESYMLINK EFTYPE | ||
| 498 | #else | ||
| 499 | # define _GL_OPENAT_ESYMLINK ELOOP | ||
| 500 | #endif | ||
| 501 | |||
| 463 | #endif /* _@GUARD_PREFIX@_FCNTL_H */ | 502 | #endif /* _@GUARD_PREFIX@_FCNTL_H */ |
| 464 | #endif /* _@GUARD_PREFIX@_FCNTL_H */ | 503 | #endif /* _@GUARD_PREFIX@_FCNTL_H */ |
| 465 | #endif | 504 | #endif |
diff --git a/gl/fd-hook.c b/gl/fd-hook.c index 4a5014eb..eef4e81e 100644 --- a/gl/fd-hook.c +++ b/gl/fd-hook.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Hook for making file descriptor functions close(), ioctl() extensible. | 1 | /* Hook for making file descriptor functions close(), ioctl() extensible. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/fd-hook.h b/gl/fd-hook.h index a960eaf3..0f029d42 100644 --- a/gl/fd-hook.h +++ b/gl/fd-hook.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Hook for making file descriptor functions close(), ioctl() extensible. | 1 | /* Hook for making file descriptor functions close(), ioctl() extensible. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/fflush.c b/gl/fflush.c index d8619082..862ff926 100644 --- a/gl/fflush.c +++ b/gl/fflush.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* fflush.c -- allow flushing input streams | 1 | /* fflush.c -- allow flushing input streams |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -65,7 +65,7 @@ clear_ungetc_buffer (FILE *fp) | |||
| 65 | fp->_ungetc_count = 0; | 65 | fp->_ungetc_count = 0; |
| 66 | fp->_rcount = - fp->_rcount; | 66 | fp->_rcount = - fp->_rcount; |
| 67 | } | 67 | } |
| 68 | # elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 68 | # elif defined _IOERR /* Minix, AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 69 | /* Nothing to do. */ | 69 | /* Nothing to do. */ |
| 70 | # else /* other implementations */ | 70 | # else /* other implementations */ |
| 71 | fseeko (fp, 0, SEEK_CUR); | 71 | fseeko (fp, 0, SEEK_CUR); |
diff --git a/gl/float+.h b/gl/float+.h index 37381146..58eca376 100644 --- a/gl/float+.h +++ b/gl/float+.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Supplemental information about the floating-point formats. | 1 | /* Supplemental information about the floating-point formats. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2007. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2007. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Auxiliary definitions for <float.h>. | 1 | /* Auxiliary definitions for <float.h>. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -21,10 +21,7 @@ | |||
| 21 | #include <float.h> | 21 | #include <float.h> |
| 22 | 22 | ||
| 23 | #if GNULIB_defined_long_double_union | 23 | #if GNULIB_defined_long_double_union |
| 24 | # if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ | 24 | # ifdef __i386__ |
| 25 | const union gl_long_double_union gl_LDBL_MAX = | ||
| 26 | { { DBL_MAX, DBL_MAX / 0x1p53 } }; | ||
| 27 | # elif defined __i386__ | ||
| 28 | const union gl_long_double_union gl_LDBL_MAX = | 25 | const union gl_long_double_union gl_LDBL_MAX = |
| 29 | { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; | 26 | { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; |
| 30 | # endif | 27 | # endif |
diff --git a/gl/float.in.h b/gl/float.in.h index d75a06e7..9f735cb9 100644 --- a/gl/float.in.h +++ b/gl/float.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A correct <float.h>. | 1 | /* A correct <float.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -113,69 +113,31 @@ extern const union gl_long_double_union gl_LDBL_MAX; | |||
| 113 | # define LDBL_MAX_10_EXP 4932 | 113 | # define LDBL_MAX_10_EXP 4932 |
| 114 | #endif | 114 | #endif |
| 115 | 115 | ||
| 116 | /* On PowerPC with gcc 15 when using __ibm128 long double, the value of | 116 | /* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are |
| 117 | LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX, and LDBL_NORM_MAX are wrong. */ | 117 | wrong. |
| 118 | On Linux/PowerPC with gcc 8.3, the values of LDBL_MAX and LDBL_EPSILON are | ||
| 119 | wrong. | ||
| 120 | Assume these bugs are fixed in any GCC new enough | ||
| 121 | to define __LDBL_NORM_MAX__. */ | ||
| 118 | #if (defined _ARCH_PPC && LDBL_MANT_DIG == 106 \ | 122 | #if (defined _ARCH_PPC && LDBL_MANT_DIG == 106 \ |
| 119 | && defined __GNUC__) | 123 | && defined __GNUC__ && !defined __LDBL_NORM_MAX__) |
| 120 | # undef LDBL_MIN_EXP | 124 | # undef LDBL_MIN_EXP |
| 121 | # define LDBL_MIN_EXP DBL_MIN_EXP | 125 | # define LDBL_MIN_EXP (-968) |
| 122 | # undef LDBL_MIN_10_EXP | 126 | # undef LDBL_MIN_10_EXP |
| 123 | # define LDBL_MIN_10_EXP DBL_MIN_10_EXP | 127 | # define LDBL_MIN_10_EXP (-291) |
| 124 | # undef LDBL_MIN | 128 | # undef LDBL_MIN |
| 125 | # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ | 129 | # define LDBL_MIN 0x1p-969L |
| 130 | |||
| 131 | /* IBM long double is tricky: it is represented as the sum of two doubles, | ||
| 132 | and the high double must equal the sum of the two parts rounded to nearest. | ||
| 133 | The maximum finite value for which this is true is | ||
| 134 | { 0x1.fffffffffffffp+1023, 0x1.ffffffffffffep+969 }, | ||
| 135 | which represents 0x1.fffffffffffff7ffffffffffff8p+1023L. | ||
| 136 | Although computations can yield representations of numbers larger than this, | ||
| 137 | these computations are considered to have overflowed and behavior is undefined. | ||
| 138 | See <https://gcc.gnu.org/PR120993>. */ | ||
| 126 | # undef LDBL_MAX | 139 | # undef LDBL_MAX |
| 127 | /* LDBL_MAX is 2**1024 - 2**918, represented as: { 0x7FEFFFFF, 0xFFFFFFFF, | 140 | # define LDBL_MAX 0x1.fffffffffffff7ffffffffffff8p+1023L |
| 128 | 0x7C9FFFFF, 0xFFFFFFFF }. | ||
| 129 | |||
| 130 | Do not write it as a constant expression, as GCC would likely treat | ||
| 131 | that as infinity due to the vagaries of this platform's funky arithmetic. | ||
| 132 | Instead, define it through a reference to an external variable. | ||
| 133 | Like the following, but using a union to avoid type mismatches: | ||
| 134 | |||
| 135 | const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / 0x1p53 }; | ||
| 136 | extern const long double LDBL_MAX; | ||
| 137 | |||
| 138 | The following alternative would not work as well when GCC is optimizing: | ||
| 139 | |||
| 140 | #define LDBL_MAX (*(long double const *) (double[]) | ||
| 141 | { DBL_MAX, DBL_MAX / 0x1p53 }) | ||
| 142 | |||
| 143 | The following alternative would require GCC 6 or later: | ||
| 144 | |||
| 145 | #define LDBL_MAX __builtin_pack_longdouble (DBL_MAX, DBL_MAX / 0x1p53) | ||
| 146 | |||
| 147 | Unfortunately none of the alternatives are constant expressions. */ | ||
| 148 | # if !GNULIB_defined_long_double_union | ||
| 149 | union gl_long_double_union | ||
| 150 | { | ||
| 151 | struct { double hi; double lo; } dd; | ||
| 152 | long double ld; | ||
| 153 | }; | ||
| 154 | # define GNULIB_defined_long_double_union 1 | ||
| 155 | # endif | ||
| 156 | extern const union gl_long_double_union gl_LDBL_MAX; | ||
| 157 | # define LDBL_MAX (gl_LDBL_MAX.ld) | ||
| 158 | # undef LDBL_NORM_MAX | ||
| 159 | # define LDBL_NORM_MAX LDBL_MAX | ||
| 160 | #endif | ||
| 161 | |||
| 162 | /* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong. | ||
| 163 | On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON | ||
| 164 | are wrong. */ | ||
| 165 | #if defined __sgi && (LDBL_MANT_DIG >= 106) | ||
| 166 | # undef LDBL_MANT_DIG | ||
| 167 | # define LDBL_MANT_DIG 106 | ||
| 168 | # if defined __GNUC__ | ||
| 169 | # undef LDBL_MIN_EXP | ||
| 170 | # define LDBL_MIN_EXP DBL_MIN_EXP | ||
| 171 | # undef LDBL_MIN_10_EXP | ||
| 172 | # define LDBL_MIN_10_EXP DBL_MIN_10_EXP | ||
| 173 | # undef LDBL_MIN | ||
| 174 | # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ | ||
| 175 | # undef LDBL_EPSILON | ||
| 176 | # define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ | ||
| 177 | # endif | ||
| 178 | #endif | ||
| 179 | 141 | ||
| 180 | /* On PowerPC platforms, 'long double' has a double-double representation. | 142 | /* On PowerPC platforms, 'long double' has a double-double representation. |
| 181 | Up to ISO C 17, this was outside the scope of ISO C because it can represent | 143 | Up to ISO C 17, this was outside the scope of ISO C because it can represent |
| @@ -187,9 +149,8 @@ extern const union gl_long_double_union gl_LDBL_MAX; | |||
| 187 | numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits> are | 149 | numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits> are |
| 188 | called "unnormalized". And since LDBL_EPSILON must be normalized (per | 150 | called "unnormalized". And since LDBL_EPSILON must be normalized (per |
| 189 | ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */ | 151 | ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */ |
| 190 | #if defined __powerpc__ && LDBL_MANT_DIG == 106 | ||
| 191 | # undef LDBL_EPSILON | 152 | # undef LDBL_EPSILON |
| 192 | # define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ | 153 | # define LDBL_EPSILON 0x1p-105L |
| 193 | #endif | 154 | #endif |
| 194 | 155 | ||
| 195 | /* ============================ ISO C11 support ============================ */ | 156 | /* ============================ ISO C11 support ============================ */ |
| @@ -273,7 +234,7 @@ extern const union gl_long_double_union gl_LDBL_TRUE_MIN; | |||
| 273 | # define FLT_NORM_MAX FLT_MAX | 234 | # define FLT_NORM_MAX FLT_MAX |
| 274 | #endif | 235 | #endif |
| 275 | #ifndef FLT_SNAN | 236 | #ifndef FLT_SNAN |
| 276 | /* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */ | 237 | /* For sh, beware of <https://gcc.gnu.org/PR111814>. */ |
| 277 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ | 238 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ |
| 278 | # define FLT_SNAN __builtin_nansf ("") | 239 | # define FLT_SNAN __builtin_nansf ("") |
| 279 | # else | 240 | # else |
| @@ -297,7 +258,7 @@ extern gl_FLT_SNAN_t gl_FLT_SNAN; | |||
| 297 | # define DBL_NORM_MAX DBL_MAX | 258 | # define DBL_NORM_MAX DBL_MAX |
| 298 | #endif | 259 | #endif |
| 299 | #ifndef DBL_SNAN | 260 | #ifndef DBL_SNAN |
| 300 | /* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */ | 261 | /* For sh, beware of <https://gcc.gnu.org/PR111814>. */ |
| 301 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ | 262 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ |
| 302 | # define DBL_SNAN __builtin_nans ("") | 263 | # define DBL_SNAN __builtin_nans ("") |
| 303 | # else | 264 | # else |
| @@ -322,12 +283,14 @@ extern gl_DBL_SNAN_t gl_DBL_SNAN; | |||
| 322 | #ifndef LDBL_NORM_MAX | 283 | #ifndef LDBL_NORM_MAX |
| 323 | # ifdef __LDBL_NORM_MAX__ | 284 | # ifdef __LDBL_NORM_MAX__ |
| 324 | # define LDBL_NORM_MAX __LDBL_NORM_MAX__ | 285 | # define LDBL_NORM_MAX __LDBL_NORM_MAX__ |
| 286 | # elif FLT_RADIX == 2 && LDBL_MAX_EXP == 1024 && LDBL_MANT_DIG == 106 | ||
| 287 | # define LDBL_NORM_MAX 0x1.ffffffffffffffffffffffffff8p+1022L | ||
| 325 | # else | 288 | # else |
| 326 | # define LDBL_NORM_MAX LDBL_MAX | 289 | # define LDBL_NORM_MAX LDBL_MAX |
| 327 | # endif | 290 | # endif |
| 328 | #endif | 291 | #endif |
| 329 | #ifndef LDBL_SNAN | 292 | #ifndef LDBL_SNAN |
| 330 | /* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */ | 293 | /* For sh, beware of <https://gcc.gnu.org/PR111814>. */ |
| 331 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ | 294 | # if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__ |
| 332 | # define LDBL_SNAN __builtin_nansl ("") | 295 | # define LDBL_SNAN __builtin_nansl ("") |
| 333 | # else | 296 | # else |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Round towards negative infinity. | 1 | /* Round towards negative infinity. |
| 2 | Copyright (C) 2007, 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2010-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/floorf.c b/gl/floorf.c index d210c297..34a507b9 100644 --- a/gl/floorf.c +++ b/gl/floorf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Round towards negative infinity. | 1 | /* Round towards negative infinity. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Open a stream to a file. | 1 | /* Open a stream to a file. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -33,13 +33,7 @@ orig_fopen (const char *filename, const char *mode) | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | /* Specification. */ | 35 | /* Specification. */ |
| 36 | #ifdef __osf__ | 36 | #include <stdio.h> |
| 37 | /* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates | ||
| 38 | this include because of the preliminary #include <stdio.h> above. */ | ||
| 39 | # include "stdio.h" | ||
| 40 | #else | ||
| 41 | # include <stdio.h> | ||
| 42 | #endif | ||
| 43 | 37 | ||
| 44 | #include <errno.h> | 38 | #include <errno.h> |
| 45 | #include <fcntl.h> | 39 | #include <fcntl.h> |
| @@ -51,24 +45,18 @@ orig_fopen (const char *filename, const char *mode) | |||
| 51 | FILE * | 45 | FILE * |
| 52 | rpl_fopen (const char *filename, const char *mode) | 46 | rpl_fopen (const char *filename, const char *mode) |
| 53 | { | 47 | { |
| 54 | int open_direction; | ||
| 55 | int open_flags; | ||
| 56 | #if GNULIB_FOPEN_GNU | ||
| 57 | bool open_flags_gnu; | ||
| 58 | # define BUF_SIZE 80 | ||
| 59 | char fdopen_mode_buf[BUF_SIZE + 1]; | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #if defined _WIN32 && ! defined __CYGWIN__ | 48 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 63 | if (strcmp (filename, "/dev/null") == 0) | 49 | if (streq (filename, "/dev/null")) |
| 64 | filename = "NUL"; | 50 | filename = "NUL"; |
| 65 | #endif | 51 | #endif |
| 66 | 52 | ||
| 67 | /* Parse the mode. */ | 53 | /* Parse the mode. */ |
| 68 | open_direction = 0; | 54 | int open_direction = 0; |
| 69 | open_flags = 0; | 55 | int open_flags = 0; |
| 70 | #if GNULIB_FOPEN_GNU | 56 | #if GNULIB_FOPEN_GNU |
| 71 | open_flags_gnu = false; | 57 | bool open_flags_gnu = false; |
| 58 | # define BUF_SIZE 80 | ||
| 59 | char fdopen_mode_buf[BUF_SIZE + 1]; | ||
| 72 | #endif | 60 | #endif |
| 73 | { | 61 | { |
| 74 | const char *p = mode; | 62 | const char *p = mode; |
| @@ -169,21 +157,18 @@ rpl_fopen (const char *filename, const char *mode) | |||
| 169 | size_t len = strlen (filename); | 157 | size_t len = strlen (filename); |
| 170 | if (len > 0 && filename[len - 1] == '/') | 158 | if (len > 0 && filename[len - 1] == '/') |
| 171 | { | 159 | { |
| 172 | int fd; | ||
| 173 | struct stat statbuf; | ||
| 174 | FILE *fp; | ||
| 175 | |||
| 176 | if (open_direction != O_RDONLY) | 160 | if (open_direction != O_RDONLY) |
| 177 | { | 161 | { |
| 178 | errno = EISDIR; | 162 | errno = EISDIR; |
| 179 | return NULL; | 163 | return NULL; |
| 180 | } | 164 | } |
| 181 | 165 | ||
| 182 | fd = open (filename, open_direction | open_flags, | 166 | int fd = open (filename, open_direction | open_flags, |
| 183 | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); | 167 | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); |
| 184 | if (fd < 0) | 168 | if (fd < 0) |
| 185 | return NULL; | 169 | return NULL; |
| 186 | 170 | ||
| 171 | struct stat statbuf; | ||
| 187 | if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) | 172 | if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) |
| 188 | { | 173 | { |
| 189 | close (fd); | 174 | close (fd); |
| @@ -191,6 +176,7 @@ rpl_fopen (const char *filename, const char *mode) | |||
| 191 | return NULL; | 176 | return NULL; |
| 192 | } | 177 | } |
| 193 | 178 | ||
| 179 | FILE *fp; | ||
| 194 | # if GNULIB_FOPEN_GNU | 180 | # if GNULIB_FOPEN_GNU |
| 195 | fp = fdopen (fd, fdopen_mode_buf); | 181 | fp = fdopen (fd, fdopen_mode_buf); |
| 196 | # else | 182 | # else |
| @@ -210,15 +196,12 @@ rpl_fopen (const char *filename, const char *mode) | |||
| 210 | #if GNULIB_FOPEN_GNU | 196 | #if GNULIB_FOPEN_GNU |
| 211 | if (open_flags_gnu) | 197 | if (open_flags_gnu) |
| 212 | { | 198 | { |
| 213 | int fd; | 199 | int fd = open (filename, open_direction | open_flags, |
| 214 | FILE *fp; | 200 | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); |
| 215 | |||
| 216 | fd = open (filename, open_direction | open_flags, | ||
| 217 | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); | ||
| 218 | if (fd < 0) | 201 | if (fd < 0) |
| 219 | return NULL; | 202 | return NULL; |
| 220 | 203 | ||
| 221 | fp = fdopen (fd, fdopen_mode_buf); | 204 | FILE *fp = fdopen (fd, fdopen_mode_buf); |
| 222 | if (fp == NULL) | 205 | if (fp == NULL) |
| 223 | { | 206 | { |
| 224 | int saved_errno = errno; | 207 | int saved_errno = errno; |
diff --git a/gl/fpurge.c b/gl/fpurge.c index 0b69da3f..6799b52b 100644 --- a/gl/fpurge.c +++ b/gl/fpurge.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Flushing buffers of a FILE stream. | 1 | /* Flushing buffers of a FILE stream. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -101,7 +101,7 @@ fpurge (FILE *fp) | |||
| 101 | if (fp->_ptr != NULL) | 101 | if (fp->_ptr != NULL) |
| 102 | fp->_count = 0; | 102 | fp->_count = 0; |
| 103 | return 0; | 103 | return 0; |
| 104 | # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 104 | # elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 105 | fp_->_ptr = fp_->_base; | 105 | fp_->_ptr = fp_->_base; |
| 106 | if (fp_->_ptr != NULL) | 106 | if (fp_->_ptr != NULL) |
| 107 | fp_->_cnt = 0; | 107 | fp_->_cnt = 0; |
diff --git a/gl/freading.c b/gl/freading.c index 6a60d6b3..8e06282e 100644 --- a/gl/freading.c +++ b/gl/freading.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Retrieve information about a FILE stream. | 1 | /* Retrieve information about a FILE stream. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "stdio-impl.h" | 22 | #include "stdio-impl.h" |
| 23 | 23 | ||
| 24 | /* Don't use glibc's __freading function in glibc < 2.7, see | 24 | /* Don't use glibc's __freading function in glibc < 2.7, see |
| 25 | <https://sourceware.org/bugzilla/show_bug.cgi?id=4359> */ | 25 | <https://sourceware.org/PR4359> */ |
| 26 | #if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))) | 26 | #if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))) |
| 27 | 27 | ||
| 28 | /* This code is not compiled on systems that have a working __freading function, | 28 | /* This code is not compiled on systems that have a working __freading function, |
| @@ -47,7 +47,7 @@ freading (FILE *fp) | |||
| 47 | return (fp->_flags & _IOREAD) != 0; | 47 | return (fp->_flags & _IOREAD) != 0; |
| 48 | # elif defined __minix /* Minix */ | 48 | # elif defined __minix /* Minix */ |
| 49 | return (fp->_flags & _IOREADING) != 0; | 49 | return (fp->_flags & _IOREADING) != 0; |
| 50 | # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 50 | # elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 51 | # if defined __sun /* Solaris */ | 51 | # if defined __sun /* Solaris */ |
| 52 | return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0; | 52 | return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0; |
| 53 | # else | 53 | # else |
diff --git a/gl/freading.h b/gl/freading.h index 405a651e..3d75d75e 100644 --- a/gl/freading.h +++ b/gl/freading.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Retrieve information about a FILE stream. | 1 | /* Retrieve information about a FILE stream. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Make free() preserve errno. | 1 | /* Make free() preserve errno. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2006, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2003, 2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -33,7 +33,7 @@ rpl_free (void *p) | |||
| 33 | { | 33 | { |
| 34 | # if defined __GNUC__ && !defined __clang__ | 34 | # if defined __GNUC__ && !defined __clang__ |
| 35 | /* An invalid GCC optimization | 35 | /* An invalid GCC optimization |
| 36 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396> | 36 | <https://gcc.gnu.org/PR98396> |
| 37 | would optimize away the assignments in the code below, when link-time | 37 | would optimize away the assignments in the code below, when link-time |
| 38 | optimization (LTO) is enabled. Make the code more complicated, so that | 38 | optimization (LTO) is enabled. Make the code more complicated, so that |
| 39 | GCC does not grok how to optimize it. */ | 39 | GCC does not grok how to optimize it. */ |
| @@ -44,9 +44,9 @@ rpl_free (void *p) | |||
| 44 | free (p); | 44 | free (p); |
| 45 | errno = err[errno == 0]; | 45 | errno = err[errno == 0]; |
| 46 | # else | 46 | # else |
| 47 | int err = errno; | 47 | int saved_errno = errno; |
| 48 | free (p); | 48 | free (p); |
| 49 | errno = err; | 49 | errno = saved_errno; |
| 50 | # endif | 50 | # endif |
| 51 | } | 51 | } |
| 52 | 52 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* An fseek() function that, together with fflush(), is POSIX compliant. | 1 | /* An fseek() function that, together with fflush(), is POSIX compliant. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/fseeko.c b/gl/fseeko.c index ecd2f83a..f6cd7cba 100644 --- a/gl/fseeko.c +++ b/gl/fseeko.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* An fseeko() function that, together with fflush(), is POSIX compliant. | 1 | /* An fseeko() function that, together with fflush(), is POSIX compliant. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -84,7 +84,7 @@ fseeko (FILE *fp, off_t offset, int whence) | |||
| 84 | #elif defined __minix /* Minix */ | 84 | #elif defined __minix /* Minix */ |
| 85 | if (fp_->_ptr == fp_->_buf | 85 | if (fp_->_ptr == fp_->_buf |
| 86 | && (fp_->_ptr == NULL || fp_->_count == 0)) | 86 | && (fp_->_ptr == NULL || fp_->_count == 0)) |
| 87 | #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 87 | #elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 88 | if (fp_->_ptr == fp_->_base | 88 | if (fp_->_ptr == fp_->_base |
| 89 | && (fp_->_ptr == NULL || fp_->_cnt == 0)) | 89 | && (fp_->_ptr == NULL || fp_->_cnt == 0)) |
| 90 | #elif defined __UCLIBC__ /* uClibc */ | 90 | #elif defined __UCLIBC__ /* uClibc */ |
| @@ -158,7 +158,7 @@ fseeko (FILE *fp, off_t offset, int whence) | |||
| 158 | fp_->_flags &= ~__SEOF; | 158 | fp_->_flags &= ~__SEOF; |
| 159 | #elif defined __EMX__ /* emx+gcc */ | 159 | #elif defined __EMX__ /* emx+gcc */ |
| 160 | fp->_flags &= ~_IOEOF; | 160 | fp->_flags &= ~_IOEOF; |
| 161 | #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 161 | #elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 162 | fp_->_flag &= ~_IOEOF; | 162 | fp_->_flag &= ~_IOEOF; |
| 163 | #elif defined __MINT__ /* Atari FreeMiNT */ | 163 | #elif defined __MINT__ /* Atari FreeMiNT */ |
| 164 | fp->__offset = pos; | 164 | fp->__offset = pos; |
diff --git a/gl/fseterr.c b/gl/fseterr.c index a01ef2af..0ab61765 100644 --- a/gl/fseterr.c +++ b/gl/fseterr.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Set the error indicator of a stream. | 1 | /* Set the error indicator of a stream. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -42,7 +42,7 @@ fseterr (FILE *fp) | |||
| 42 | fp->_flags |= _IOERR; | 42 | fp->_flags |= _IOERR; |
| 43 | #elif defined __minix /* Minix */ | 43 | #elif defined __minix /* Minix */ |
| 44 | fp->_flags |= _IOERR; | 44 | fp->_flags |= _IOERR; |
| 45 | #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ | 45 | #elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 46 | fp_->_flag |= _IOERR; | 46 | fp_->_flag |= _IOERR; |
| 47 | #elif defined __UCLIBC__ /* uClibc */ | 47 | #elif defined __UCLIBC__ /* uClibc */ |
| 48 | fp->__modeflags |= __FLAG_ERROR; | 48 | fp->__modeflags |= __FLAG_ERROR; |
| @@ -59,14 +59,10 @@ fseterr (FILE *fp) | |||
| 59 | Not activated on any system, because there is no way to repair FP when | 59 | Not activated on any system, because there is no way to repair FP when |
| 60 | the sequence of system calls fails, and library code should not call | 60 | the sequence of system calls fails, and library code should not call |
| 61 | abort(). */ | 61 | abort(). */ |
| 62 | int saved_errno; | 62 | int saved_errno = errno; |
| 63 | int fd; | ||
| 64 | int fd2; | ||
| 65 | |||
| 66 | saved_errno = errno; | ||
| 67 | fflush (fp); | 63 | fflush (fp); |
| 68 | fd = fileno (fp); | 64 | int fd = fileno (fp); |
| 69 | fd2 = dup (fd); | 65 | int fd2 = dup (fd); |
| 70 | if (fd2 >= 0) | 66 | if (fd2 >= 0) |
| 71 | { | 67 | { |
| 72 | close (fd); | 68 | close (fd); |
diff --git a/gl/fseterr.h b/gl/fseterr.h index 57c30ef3..ac2b793e 100644 --- a/gl/fseterr.h +++ b/gl/fseterr.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Set the error indicator of a stream. | 1 | /* Set the error indicator of a stream. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* fstat() replacement. | 1 | /* fstat() replacement. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -40,14 +40,7 @@ orig_fstat (int fd, struct stat *buf) | |||
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | /* Specification. */ | 42 | /* Specification. */ |
| 43 | #ifdef __osf__ | 43 | #include <sys/stat.h> |
| 44 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | ||
| 45 | eliminates this include because of the preliminary #include <sys/stat.h> | ||
| 46 | above. */ | ||
| 47 | # include "sys/stat.h" | ||
| 48 | #else | ||
| 49 | # include <sys/stat.h> | ||
| 50 | #endif | ||
| 51 | 44 | ||
| 52 | #include "stat-time.h" | 45 | #include "stat-time.h" |
| 53 | 46 | ||
diff --git a/gl/fsusage.c b/gl/fsusage.c index e26bda88..1700a19c 100644 --- a/gl/fsusage.c +++ b/gl/fsusage.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* fsusage.c -- return space usage of mounted file systems | 1 | /* fsusage.c -- return space usage of mounted file systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2025 Free Software | 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -91,10 +91,12 @@ static int | |||
| 91 | statvfs_works (void) | 91 | statvfs_works (void) |
| 92 | { | 92 | { |
| 93 | static int statvfs_works_cache = -1; | 93 | static int statvfs_works_cache = -1; |
| 94 | struct utsname name; | ||
| 95 | if (statvfs_works_cache < 0) | 94 | if (statvfs_works_cache < 0) |
| 96 | statvfs_works_cache = (uname (&name) == 0 | 95 | { |
| 97 | && 0 <= strverscmp (name.release, "2.6.36")); | 96 | struct utsname name; |
| 97 | statvfs_works_cache = (uname (&name) == 0 | ||
| 98 | && 0 <= strverscmp (name.release, "2.6.36")); | ||
| 99 | } | ||
| 98 | return statvfs_works_cache; | 100 | return statvfs_works_cache; |
| 99 | } | 101 | } |
| 100 | # endif | 102 | # endif |
| @@ -148,15 +150,6 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 148 | ? PROPAGATE_ALL_ONES (fsd.f_frsize) | 150 | ? PROPAGATE_ALL_ONES (fsd.f_frsize) |
| 149 | : PROPAGATE_ALL_ONES (fsd.f_bsize)); | 151 | : PROPAGATE_ALL_ONES (fsd.f_bsize)); |
| 150 | 152 | ||
| 151 | #elif defined STAT_STATFS3_OSF1 /* OSF/1 */ | ||
| 152 | |||
| 153 | struct statfs fsd; | ||
| 154 | |||
| 155 | if (statfs (file, &fsd, sizeof (struct statfs)) != 0) | ||
| 156 | return -1; | ||
| 157 | |||
| 158 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); | ||
| 159 | |||
| 160 | #elif defined STAT_STATFS2_FRSIZE /* 2.6 < glibc/Linux < 2.6.36 */ | 153 | #elif defined STAT_STATFS2_FRSIZE /* 2.6 < glibc/Linux < 2.6.36 */ |
| 161 | 154 | ||
| 162 | struct statfs fsd; | 155 | struct statfs fsd; |
| @@ -201,7 +194,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 201 | 194 | ||
| 202 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); | 195 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); |
| 203 | 196 | ||
| 204 | #elif defined STAT_STATFS4 /* SVR3, old Irix */ | 197 | #elif defined STAT_STATFS4 /* SVR3 */ |
| 205 | 198 | ||
| 206 | struct statfs fsd; | 199 | struct statfs fsd; |
| 207 | 200 | ||
diff --git a/gl/fsusage.h b/gl/fsusage.h index 00d9067e..bfa1857e 100644 --- a/gl/fsusage.h +++ b/gl/fsusage.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* fsusage.h -- declarations for file system space usage info | 1 | /* fsusage.h -- declarations for file system space usage info |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2025 Free Software | 3 | Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* An ftell() function that works around platform bugs. | 1 | /* An ftell() function that works around platform bugs. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/ftello.c b/gl/ftello.c index b0a20bf3..e4f96d1a 100644 --- a/gl/ftello.c +++ b/gl/ftello.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* An ftello() function that works around platform bugs. | 1 | /* An ftello() function that works around platform bugs. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -124,13 +124,11 @@ ftello (FILE *fp) | |||
| 124 | gets confused by this. */ | 124 | gets confused by this. */ |
| 125 | if (fp_->_flag & _IOWRT) | 125 | if (fp_->_flag & _IOWRT) |
| 126 | { | 126 | { |
| 127 | off_t pos; | ||
| 128 | |||
| 129 | /* Call ftello nevertheless, for the side effects that it does on fp. */ | 127 | /* Call ftello nevertheless, for the side effects that it does on fp. */ |
| 130 | ftello (fp); | 128 | ftello (fp); |
| 131 | 129 | ||
| 132 | /* Compute the file position ourselves. */ | 130 | /* Compute the file position ourselves. */ |
| 133 | pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); | 131 | off_t pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); |
| 134 | if (pos >= 0) | 132 | if (pos >= 0) |
| 135 | { | 133 | { |
| 136 | if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) | 134 | if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) |
diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c index 9c5f1419..ef6b506b 100644 --- a/gl/gai_strerror.c +++ b/gl/gai_strerror.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2025 Free Software | 1 | /* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2026 Free Software |
| 2 | Foundation, Inc. | 2 | Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997. | 4 | Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997. |
| @@ -27,7 +27,7 @@ | |||
| 27 | # include <libintl.h> | 27 | # include <libintl.h> |
| 28 | #else | 28 | #else |
| 29 | # include "gettext.h" | 29 | # include "gettext.h" |
| 30 | # define _(msgid) dgettext ("gnulib", msgid) | 30 | # define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid) |
| 31 | # define N_(msgid) msgid | 31 | # define N_(msgid) msgid |
| 32 | #endif | 32 | #endif |
| 33 | 33 | ||
| @@ -79,8 +79,7 @@ values[] = | |||
| 79 | const char * | 79 | const char * |
| 80 | gai_strerror (int code) | 80 | gai_strerror (int code) |
| 81 | { | 81 | { |
| 82 | size_t i; | 82 | for (size_t i = 0; i < sizeof (values) / sizeof (values[0]); ++i) |
| 83 | for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i) | ||
| 84 | if (values[i].code == code) | 83 | if (values[i].code == code) |
| 85 | return _(values[i].msg); | 84 | return _(values[i].msg); |
| 86 | 85 | ||
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c index a8c45c21..2b60377b 100644 --- a/gl/getaddrinfo.c +++ b/gl/getaddrinfo.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Get address information (partial implementation). | 1 | /* Get address information (partial implementation). |
| 2 | Copyright (C) 1997, 2001-2002, 2004-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1997, 2001-2002, 2004-2026 Free Software Foundation, Inc. |
| 3 | Contributed by Simon Josefsson <simon@josefsson.org>. | 3 | Contributed by Simon Josefsson <simon@josefsson.org>. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -40,7 +40,7 @@ | |||
| 40 | #include <stdio.h> | 40 | #include <stdio.h> |
| 41 | 41 | ||
| 42 | #include "gettext.h" | 42 | #include "gettext.h" |
| 43 | #define _(msgid) dgettext ("gnulib", msgid) | 43 | #define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid) |
| 44 | #define N_(msgid) msgid | 44 | #define N_(msgid) msgid |
| 45 | 45 | ||
| 46 | /* BeOS has AF_INET, but not PF_INET. */ | 46 | /* BeOS has AF_INET, but not PF_INET. */ |
| @@ -52,9 +52,40 @@ | |||
| 52 | # define PF_UNSPEC 0 | 52 | # define PF_UNSPEC 0 |
| 53 | #endif | 53 | #endif |
| 54 | 54 | ||
| 55 | #if defined __sun || !HAVE_GETADDRINFO | ||
| 56 | |||
| 57 | static bool | ||
| 58 | is_numeric_host (const char *host, int family) | ||
| 59 | { | ||
| 60 | # if HAVE_IPV4 | ||
| 61 | if (family == PF_INET || family == PF_UNSPEC) | ||
| 62 | { | ||
| 63 | /* glibc supports IPv4 addresses in numbers-and-dots notation, that is, | ||
| 64 | also hexadecimal and octal number formats and formats that don't | ||
| 65 | require all four bytes to be explicitly written, via inet_aton(). | ||
| 66 | But POSIX doesn't require support for these legacy formats. Therefore | ||
| 67 | we are free to use inet_pton() instead of inet_aton(). */ | ||
| 68 | struct in_addr addr; | ||
| 69 | if (inet_pton (AF_INET, host, &addr)) | ||
| 70 | return true; | ||
| 71 | } | ||
| 72 | # endif | ||
| 73 | # if HAVE_IPV6 | ||
| 74 | if (family == PF_INET6 || family == PF_UNSPEC) | ||
| 75 | { | ||
| 76 | struct in6_addr addr; | ||
| 77 | if (inet_pton (AF_INET6, host, &addr)) | ||
| 78 | return true; | ||
| 79 | } | ||
| 80 | # endif | ||
| 81 | return false; | ||
| 82 | } | ||
| 83 | |||
| 84 | #endif | ||
| 85 | |||
| 55 | #if HAVE_GETADDRINFO | 86 | #if HAVE_GETADDRINFO |
| 56 | 87 | ||
| 57 | /* Override with cdecl calling convention and mingw fix. */ | 88 | /* Override with cdecl calling convention and Windows and Solaris 10 fixes. */ |
| 58 | 89 | ||
| 59 | int | 90 | int |
| 60 | getaddrinfo (const char *restrict nodename, | 91 | getaddrinfo (const char *restrict nodename, |
| @@ -63,10 +94,18 @@ getaddrinfo (const char *restrict nodename, | |||
| 63 | struct addrinfo **restrict res) | 94 | struct addrinfo **restrict res) |
| 64 | # undef getaddrinfo | 95 | # undef getaddrinfo |
| 65 | { | 96 | { |
| 97 | /* Workaround for native Windows. */ | ||
| 66 | if (hints && (hints->ai_flags & AI_NUMERICSERV) != 0 | 98 | if (hints && (hints->ai_flags & AI_NUMERICSERV) != 0 |
| 67 | && servname && !(*servname >= '0' && *servname <= '9')) | 99 | && servname && !(*servname >= '0' && *servname <= '9')) |
| 68 | return EAI_NONAME; | 100 | return EAI_NONAME; |
| 69 | 101 | ||
| 102 | # ifdef __sun | ||
| 103 | /* Workaround for Solaris 10. */ | ||
| 104 | if (hints && (hints->ai_flags & AI_NUMERICHOST) | ||
| 105 | && nodename && !is_numeric_host (nodename, hints->ai_family)) | ||
| 106 | return EAI_NONAME; | ||
| 107 | # endif | ||
| 108 | |||
| 70 | return getaddrinfo (nodename, servname, hints, res); | 109 | return getaddrinfo (nodename, servname, hints, res); |
| 71 | } | 110 | } |
| 72 | 111 | ||
| @@ -114,14 +153,13 @@ static int | |||
| 114 | use_win32_p (void) | 153 | use_win32_p (void) |
| 115 | { | 154 | { |
| 116 | static int done = 0; | 155 | static int done = 0; |
| 117 | HMODULE h; | ||
| 118 | 156 | ||
| 119 | if (done) | 157 | if (done) |
| 120 | return getaddrinfo_ptr ? 1 : 0; | 158 | return getaddrinfo_ptr ? 1 : 0; |
| 121 | 159 | ||
| 122 | done = 1; | 160 | done = 1; |
| 123 | 161 | ||
| 124 | h = GetModuleHandle ("ws2_32.dll"); | 162 | HMODULE h = GetModuleHandle ("ws2_32.dll"); |
| 125 | 163 | ||
| 126 | if (h) | 164 | if (h) |
| 127 | { | 165 | { |
| @@ -185,33 +223,6 @@ validate_family (int family) | |||
| 185 | return false; | 223 | return false; |
| 186 | } | 224 | } |
| 187 | 225 | ||
| 188 | static bool | ||
| 189 | is_numeric_host (const char *host, int family) | ||
| 190 | { | ||
| 191 | # if HAVE_IPV4 | ||
| 192 | if (family == PF_INET || family == PF_UNSPEC) | ||
| 193 | { | ||
| 194 | /* glibc supports IPv4 addresses in numbers-and-dots notation, that is, | ||
| 195 | also hexadecimal and octal number formats and formats that don't | ||
| 196 | require all four bytes to be explicitly written, via inet_aton(). | ||
| 197 | But POSIX doesn't require support for these legacy formats. Therefore | ||
| 198 | we are free to use inet_pton() instead of inet_aton(). */ | ||
| 199 | struct in_addr addr; | ||
| 200 | if (inet_pton (AF_INET, host, &addr)) | ||
| 201 | return true; | ||
| 202 | } | ||
| 203 | # endif | ||
| 204 | # if HAVE_IPV6 | ||
| 205 | if (family == PF_INET6 || family == PF_UNSPEC) | ||
| 206 | { | ||
| 207 | struct in6_addr addr; | ||
| 208 | if (inet_pton (AF_INET6, host, &addr)) | ||
| 209 | return true; | ||
| 210 | } | ||
| 211 | # endif | ||
| 212 | return false; | ||
| 213 | } | ||
| 214 | |||
| 215 | /* Translate name of a service location and/or a service name to set of | 226 | /* Translate name of a service location and/or a service name to set of |
| 216 | socket addresses. */ | 227 | socket addresses. */ |
| 217 | int | 228 | int |
| @@ -221,11 +232,6 @@ getaddrinfo (const char *restrict nodename, | |||
| 221 | struct addrinfo **restrict res) | 232 | struct addrinfo **restrict res) |
| 222 | #undef getaddrinfo | 233 | #undef getaddrinfo |
| 223 | { | 234 | { |
| 224 | struct addrinfo *tmp; | ||
| 225 | int port = 0; | ||
| 226 | struct hostent *he; | ||
| 227 | void *storage; | ||
| 228 | size_t size; | ||
| 229 | # if HAVE_IPV6 | 235 | # if HAVE_IPV6 |
| 230 | struct v6_pair { | 236 | struct v6_pair { |
| 231 | struct addrinfo addrinfo; | 237 | struct addrinfo addrinfo; |
| @@ -281,6 +287,7 @@ getaddrinfo (const char *restrict nodename, | |||
| 281 | # endif | 287 | # endif |
| 282 | } | 288 | } |
| 283 | 289 | ||
| 290 | int port = 0; | ||
| 284 | if (servname) | 291 | if (servname) |
| 285 | { | 292 | { |
| 286 | struct servent *se = NULL; | 293 | struct servent *se = NULL; |
| @@ -306,10 +313,11 @@ getaddrinfo (const char *restrict nodename, | |||
| 306 | } | 313 | } |
| 307 | 314 | ||
| 308 | /* FIXME: Use gethostbyname_r if available. */ | 315 | /* FIXME: Use gethostbyname_r if available. */ |
| 309 | he = gethostbyname (nodename); | 316 | struct hostent *he = gethostbyname (nodename); |
| 310 | if (!he || he->h_addr_list[0] == NULL) | 317 | if (!he || he->h_addr_list[0] == NULL) |
| 311 | return EAI_NONAME; | 318 | return EAI_NONAME; |
| 312 | 319 | ||
| 320 | size_t size; | ||
| 313 | switch (he->h_addrtype) | 321 | switch (he->h_addrtype) |
| 314 | { | 322 | { |
| 315 | # if HAVE_IPV6 | 323 | # if HAVE_IPV6 |
| @@ -328,10 +336,11 @@ getaddrinfo (const char *restrict nodename, | |||
| 328 | return EAI_NODATA; | 336 | return EAI_NODATA; |
| 329 | } | 337 | } |
| 330 | 338 | ||
| 331 | storage = calloc (1, size); | 339 | void *storage = calloc (1, size); |
| 332 | if (!storage) | 340 | if (!storage) |
| 333 | return EAI_MEMORY; | 341 | return EAI_MEMORY; |
| 334 | 342 | ||
| 343 | struct addrinfo *tmp; | ||
| 335 | switch (he->h_addrtype) | 344 | switch (he->h_addrtype) |
| 336 | { | 345 | { |
| 337 | # if HAVE_IPV6 | 346 | # if HAVE_IPV6 |
| @@ -446,9 +455,7 @@ freeaddrinfo (struct addrinfo *ai) | |||
| 446 | 455 | ||
| 447 | while (ai) | 456 | while (ai) |
| 448 | { | 457 | { |
| 449 | struct addrinfo *cur; | 458 | struct addrinfo *cur = ai; |
| 450 | |||
| 451 | cur = ai; | ||
| 452 | ai = ai->ai_next; | 459 | ai = ai->ai_next; |
| 453 | 460 | ||
| 454 | free (cur->ai_canonname); | 461 | free (cur->ai_canonname); |
diff --git a/gl/getdelim.c b/gl/getdelim.c index 2576d376..21f3abc2 100644 --- a/gl/getdelim.c +++ b/gl/getdelim.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getdelim.c --- Implementation of replacement getdelim function. | 1 | /* getdelim.c --- Implementation of replacement getdelim function. |
| 2 | Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2025 Free Software | 2 | Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -62,10 +62,13 @@ alloc_failed (void) | |||
| 62 | ssize_t | 62 | ssize_t |
| 63 | getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) | 63 | getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) |
| 64 | { | 64 | { |
| 65 | ssize_t result; | 65 | if (lineptr == NULL || n == NULL |
| 66 | size_t cur_len = 0; | 66 | /* glibc already declares this function as __nonnull ((4)). |
| 67 | 67 | Avoid a gcc warning "‘nonnull’ argument ‘fp’ compared to NULL". */ | |
| 68 | if (lineptr == NULL || n == NULL || fp == NULL) | 68 | #if !(__GLIBC__ >= 2) |
| 69 | || fp == NULL | ||
| 70 | #endif | ||
| 71 | ) | ||
| 69 | { | 72 | { |
| 70 | errno = EINVAL; | 73 | errno = EINVAL; |
| 71 | return -1; | 74 | return -1; |
| @@ -73,6 +76,8 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) | |||
| 73 | 76 | ||
| 74 | flockfile (fp); | 77 | flockfile (fp); |
| 75 | 78 | ||
| 79 | ssize_t result; | ||
| 80 | |||
| 76 | if (*lineptr == NULL || *n == 0) | 81 | if (*lineptr == NULL || *n == 0) |
| 77 | { | 82 | { |
| 78 | char *new_lineptr; | 83 | char *new_lineptr; |
| @@ -87,54 +92,56 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) | |||
| 87 | *lineptr = new_lineptr; | 92 | *lineptr = new_lineptr; |
| 88 | } | 93 | } |
| 89 | 94 | ||
| 90 | for (;;) | 95 | { |
| 91 | { | 96 | size_t cur_len = 0; |
| 92 | int i; | 97 | for (;;) |
| 93 | 98 | { | |
| 94 | i = getc_maybe_unlocked (fp); | 99 | int i; |
| 95 | if (i == EOF) | 100 | |
| 96 | { | 101 | i = getc_maybe_unlocked (fp); |
| 97 | result = -1; | 102 | if (i == EOF) |
| 103 | { | ||
| 104 | result = -1; | ||
| 105 | break; | ||
| 106 | } | ||
| 107 | |||
| 108 | /* Make enough space for len+1 (for final NUL) bytes. */ | ||
| 109 | if (cur_len + 1 >= *n) | ||
| 110 | { | ||
| 111 | size_t needed_max = | ||
| 112 | SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; | ||
| 113 | size_t needed = 2 * *n + 1; /* Be generous. */ | ||
| 114 | |||
| 115 | if (needed_max < needed) | ||
| 116 | needed = needed_max; | ||
| 117 | if (cur_len + 1 >= needed) | ||
| 118 | { | ||
| 119 | result = -1; | ||
| 120 | errno = EOVERFLOW; | ||
| 121 | goto unlock_return; | ||
| 122 | } | ||
| 123 | |||
| 124 | char *new_lineptr = (char *) realloc (*lineptr, needed); | ||
| 125 | if (new_lineptr == NULL) | ||
| 126 | { | ||
| 127 | alloc_failed (); | ||
| 128 | result = -1; | ||
| 129 | goto unlock_return; | ||
| 130 | } | ||
| 131 | |||
| 132 | *lineptr = new_lineptr; | ||
| 133 | *n = needed; | ||
| 134 | } | ||
| 135 | |||
| 136 | (*lineptr)[cur_len] = i; | ||
| 137 | cur_len++; | ||
| 138 | |||
| 139 | if (i == delimiter) | ||
| 98 | break; | 140 | break; |
| 99 | } | 141 | } |
| 100 | 142 | (*lineptr)[cur_len] = '\0'; | |
| 101 | /* Make enough space for len+1 (for final NUL) bytes. */ | 143 | result = cur_len ? cur_len : result; |
| 102 | if (cur_len + 1 >= *n) | 144 | } |
| 103 | { | ||
| 104 | size_t needed_max = | ||
| 105 | SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; | ||
| 106 | size_t needed = 2 * *n + 1; /* Be generous. */ | ||
| 107 | char *new_lineptr; | ||
| 108 | |||
| 109 | if (needed_max < needed) | ||
| 110 | needed = needed_max; | ||
| 111 | if (cur_len + 1 >= needed) | ||
| 112 | { | ||
| 113 | result = -1; | ||
| 114 | errno = EOVERFLOW; | ||
| 115 | goto unlock_return; | ||
| 116 | } | ||
| 117 | |||
| 118 | new_lineptr = (char *) realloc (*lineptr, needed); | ||
| 119 | if (new_lineptr == NULL) | ||
| 120 | { | ||
| 121 | alloc_failed (); | ||
| 122 | result = -1; | ||
| 123 | goto unlock_return; | ||
| 124 | } | ||
| 125 | |||
| 126 | *lineptr = new_lineptr; | ||
| 127 | *n = needed; | ||
| 128 | } | ||
| 129 | |||
| 130 | (*lineptr)[cur_len] = i; | ||
| 131 | cur_len++; | ||
| 132 | |||
| 133 | if (i == delimiter) | ||
| 134 | break; | ||
| 135 | } | ||
| 136 | (*lineptr)[cur_len] = '\0'; | ||
| 137 | result = cur_len ? cur_len : result; | ||
| 138 | 145 | ||
| 139 | unlock_return: | 146 | unlock_return: |
| 140 | funlockfile (fp); /* doesn't set errno */ | 147 | funlockfile (fp); /* doesn't set errno */ |
diff --git a/gl/getdtablesize.c b/gl/getdtablesize.c index b98fbb70..cc823952 100644 --- a/gl/getdtablesize.c +++ b/gl/getdtablesize.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getdtablesize() function: Return maximum possible file descriptor value + 1. | 1 | /* getdtablesize() function: Return maximum possible file descriptor value + 1. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -61,13 +61,10 @@ getdtablesize (void) | |||
| 61 | { | 61 | { |
| 62 | /* We are looking for the number N such that the valid file descriptors | 62 | /* We are looking for the number N such that the valid file descriptors |
| 63 | are 0..N-1. It can be obtained through a loop as follows: | 63 | are 0..N-1. It can be obtained through a loop as follows: |
| 64 | { | 64 | for (int fd = 3; fd < 65536; fd++) |
| 65 | int fd; | 65 | if (dup2 (0, fd) == -1) |
| 66 | for (fd = 3; fd < 65536; fd++) | 66 | break; |
| 67 | if (dup2 (0, fd) == -1) | 67 | return fd; |
| 68 | break; | ||
| 69 | return fd; | ||
| 70 | } | ||
| 71 | On Windows XP, the result is 2048. | 68 | On Windows XP, the result is 2048. |
| 72 | The drawback of this loop is that it allocates memory for a libc | 69 | The drawback of this loop is that it allocates memory for a libc |
| 73 | internal array that is never freed. | 70 | internal array that is never freed. |
diff --git a/gl/gethostname.c b/gl/gethostname.c index 8f0ceafc..464bac39 100644 --- a/gl/gethostname.c +++ b/gl/gethostname.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* gethostname emulation for SysV and POSIX.1. | 1 | /* gethostname emulation for SysV and POSIX.1. |
| 2 | 2 | ||
| 3 | Copyright (C) 1992, 2003, 2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1992, 2003, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -89,12 +89,10 @@ gethostname (char *name, size_t len) | |||
| 89 | int | 89 | int |
| 90 | rpl_gethostname (char *name, size_t len) | 90 | rpl_gethostname (char *name, size_t len) |
| 91 | { | 91 | { |
| 92 | int r; | ||
| 93 | |||
| 94 | if (len > INT_MAX) | 92 | if (len > INT_MAX) |
| 95 | len = INT_MAX; | 93 | len = INT_MAX; |
| 96 | gl_sockets_startup (SOCKETS_1_1); | 94 | gl_sockets_startup (SOCKETS_1_1); |
| 97 | r = gethostname (name, (int) len); | 95 | int r = gethostname (name, (int) len); |
| 98 | if (r < 0) | 96 | if (r < 0) |
| 99 | set_winsock_errno (); | 97 | set_winsock_errno (); |
| 100 | 98 | ||
diff --git a/gl/getline.c b/gl/getline.c index 0921dd95..bbc8712d 100644 --- a/gl/getline.c +++ b/gl/getline.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getline.c --- Implementation of replacement getline function. | 1 | /* getline.c --- Implementation of replacement getline function. |
| 2 | Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/getloadavg.c b/gl/getloadavg.c index 752ec1f5..73b2ee28 100644 --- a/gl/getloadavg.c +++ b/gl/getloadavg.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Get the system load averages. | 1 | /* Get the system load averages. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2025 Free Software | 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | NOTE: The canonical source of this file is maintained with gnulib. | 6 | NOTE: The canonical source of this file is maintained with gnulib. |
| @@ -140,21 +140,6 @@ | |||
| 140 | # define SUNOS_5 | 140 | # define SUNOS_5 |
| 141 | # endif | 141 | # endif |
| 142 | 142 | ||
| 143 | # if defined (__osf__) && defined (__alpha) | ||
| 144 | # define OSF_ALPHA | ||
| 145 | # include <sys/mbuf.h> | ||
| 146 | # include <sys/socket.h> | ||
| 147 | # include <net/route.h> | ||
| 148 | # include <sys/table.h> | ||
| 149 | /* Tru64 4.0D's table.h redefines sys */ | ||
| 150 | # undef sys | ||
| 151 | # endif | ||
| 152 | |||
| 153 | # if defined (__osf__) && (defined (mips) || defined (__mips__)) | ||
| 154 | # define OSF_MIPS | ||
| 155 | # include <sys/table.h> | ||
| 156 | # endif | ||
| 157 | |||
| 158 | 143 | ||
| 159 | /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ | 144 | /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ |
| 160 | # ifndef LOAD_AVE_TYPE | 145 | # ifndef LOAD_AVE_TYPE |
| @@ -167,31 +152,16 @@ | |||
| 167 | # define LOAD_AVE_TYPE long | 152 | # define LOAD_AVE_TYPE long |
| 168 | # endif | 153 | # endif |
| 169 | 154 | ||
| 170 | # ifdef sgi | ||
| 171 | # define LOAD_AVE_TYPE long | ||
| 172 | # endif | ||
| 173 | |||
| 174 | # ifdef SVR4 | 155 | # ifdef SVR4 |
| 175 | # define LOAD_AVE_TYPE long | 156 | # define LOAD_AVE_TYPE long |
| 176 | # endif | 157 | # endif |
| 177 | 158 | ||
| 178 | # ifdef OSF_ALPHA | ||
| 179 | # define LOAD_AVE_TYPE long | ||
| 180 | # endif | ||
| 181 | |||
| 182 | # if defined _AIX && ! defined HAVE_LIBPERFSTAT | 159 | # if defined _AIX && ! defined HAVE_LIBPERFSTAT |
| 183 | # define LOAD_AVE_TYPE long | 160 | # define LOAD_AVE_TYPE long |
| 184 | # endif | 161 | # endif |
| 185 | 162 | ||
| 186 | # endif /* No LOAD_AVE_TYPE. */ | 163 | # endif /* No LOAD_AVE_TYPE. */ |
| 187 | 164 | ||
| 188 | # ifdef OSF_ALPHA | ||
| 189 | /* <sys/param.h> defines an incorrect value for FSCALE on Alpha OSF/1, | ||
| 190 | according to ghazi@noc.rutgers.edu. */ | ||
| 191 | # undef FSCALE | ||
| 192 | # define FSCALE 1024.0 | ||
| 193 | # endif | ||
| 194 | |||
| 195 | 165 | ||
| 196 | # ifndef FSCALE | 166 | # ifndef FSCALE |
| 197 | 167 | ||
| @@ -324,10 +294,6 @@ | |||
| 324 | # endif | 294 | # endif |
| 325 | # endif /* NeXT */ | 295 | # endif /* NeXT */ |
| 326 | 296 | ||
| 327 | # ifdef sgi | ||
| 328 | # include <sys/sysmp.h> | ||
| 329 | # endif /* sgi */ | ||
| 330 | |||
| 331 | # ifdef UMAX | 297 | # ifdef UMAX |
| 332 | # include <signal.h> | 298 | # include <signal.h> |
| 333 | # include <sys/time.h> | 299 | # include <sys/time.h> |
| @@ -389,7 +355,7 @@ static bool getloadavg_initialized; | |||
| 389 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ | 355 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ |
| 390 | static long offset; | 356 | static long offset; |
| 391 | 357 | ||
| 392 | # if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__) | 358 | # if ! defined __VMS && ! (defined __linux__ || defined __ANDROID__) |
| 393 | static struct nlist name_list[2]; | 359 | static struct nlist name_list[2]; |
| 394 | # endif | 360 | # endif |
| 395 | 361 | ||
| @@ -418,51 +384,47 @@ getloadavg (double loadavg[], int nelem) | |||
| 418 | # if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) /* Solaris <= 2.6 */ | 384 | # if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) /* Solaris <= 2.6 */ |
| 419 | /* Use libkstat because we don't have to be root. */ | 385 | /* Use libkstat because we don't have to be root. */ |
| 420 | # define LDAV_DONE | 386 | # define LDAV_DONE |
| 421 | kstat_ctl_t *kc; | 387 | { |
| 422 | kstat_t *ksp; | 388 | kstat_ctl_t *kc = kstat_open (); |
| 423 | kstat_named_t *kn; | 389 | if (kc == NULL) |
| 424 | int saved_errno; | 390 | return -1; |
| 425 | 391 | kstat_t *ksp = kstat_lookup (kc, "unix", 0, "system_misc"); | |
| 426 | kc = kstat_open (); | 392 | if (ksp == NULL) |
| 427 | if (kc == NULL) | 393 | return -1; |
| 428 | return -1; | 394 | if (kstat_read (kc, ksp, 0) == -1) |
| 429 | ksp = kstat_lookup (kc, "unix", 0, "system_misc"); | 395 | return -1; |
| 430 | if (ksp == NULL) | ||
| 431 | return -1; | ||
| 432 | if (kstat_read (kc, ksp, 0) == -1) | ||
| 433 | return -1; | ||
| 434 | |||
| 435 | |||
| 436 | kn = kstat_data_lookup (ksp, "avenrun_1min"); | ||
| 437 | if (kn == NULL) | ||
| 438 | { | ||
| 439 | /* Return -1 if no load average information is available. */ | ||
| 440 | nelem = 0; | ||
| 441 | elem = -1; | ||
| 442 | } | ||
| 443 | |||
| 444 | if (nelem >= 1) | ||
| 445 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | ||
| 446 | |||
| 447 | if (nelem >= 2) | ||
| 448 | { | ||
| 449 | kn = kstat_data_lookup (ksp, "avenrun_5min"); | ||
| 450 | if (kn != NULL) | ||
| 451 | { | ||
| 452 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | ||
| 453 | 396 | ||
| 454 | if (nelem >= 3) | 397 | kstat_named_t *kn = kstat_data_lookup (ksp, "avenrun_1min"); |
| 455 | { | 398 | if (kn == NULL) |
| 456 | kn = kstat_data_lookup (ksp, "avenrun_15min"); | 399 | { |
| 457 | if (kn != NULL) | 400 | /* Return -1 if no load average information is available. */ |
| 458 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | 401 | nelem = 0; |
| 459 | } | 402 | elem = -1; |
| 460 | } | 403 | } |
| 461 | } | 404 | |
| 405 | if (nelem >= 1) | ||
| 406 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | ||
| 407 | |||
| 408 | if (nelem >= 2) | ||
| 409 | { | ||
| 410 | kn = kstat_data_lookup (ksp, "avenrun_5min"); | ||
| 411 | if (kn != NULL) | ||
| 412 | { | ||
| 413 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | ||
| 414 | |||
| 415 | if (nelem >= 3) | ||
| 416 | { | ||
| 417 | kn = kstat_data_lookup (ksp, "avenrun_15min"); | ||
| 418 | if (kn != NULL) | ||
| 419 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | ||
| 420 | } | ||
| 421 | } | ||
| 422 | } | ||
| 462 | 423 | ||
| 463 | saved_errno = errno; | 424 | int saved_errno = errno; |
| 464 | kstat_close (kc); | 425 | kstat_close (kc); |
| 465 | errno = saved_errno; | 426 | errno = saved_errno; |
| 427 | } | ||
| 466 | # endif /* HAVE_LIBKSTAT */ | 428 | # endif /* HAVE_LIBKSTAT */ |
| 467 | 429 | ||
| 468 | # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC) | 430 | # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC) |
| @@ -523,13 +485,12 @@ getloadavg (double loadavg[], int nelem) | |||
| 523 | 485 | ||
| 524 | char ldavgbuf[3 * (INT_STRLEN_BOUND (int) + sizeof ".00 ")]; | 486 | char ldavgbuf[3 * (INT_STRLEN_BOUND (int) + sizeof ".00 ")]; |
| 525 | char const *ptr = ldavgbuf; | 487 | char const *ptr = ldavgbuf; |
| 526 | int fd, count, saved_errno; | ||
| 527 | 488 | ||
| 528 | fd = open ("/proc/loadavg", O_RDONLY | O_CLOEXEC); | 489 | int fd = open ("/proc/loadavg", O_RDONLY | O_CLOEXEC); |
| 529 | if (fd == -1) | 490 | if (fd == -1) |
| 530 | return -1; | 491 | return -1; |
| 531 | count = read (fd, ldavgbuf, sizeof ldavgbuf - 1); | 492 | int count = read (fd, ldavgbuf, sizeof ldavgbuf - 1); |
| 532 | saved_errno = errno; | 493 | int saved_errno = errno; |
| 533 | (void) close (fd); | 494 | (void) close (fd); |
| 534 | errno = saved_errno; | 495 | errno = saved_errno; |
| 535 | if (count <= 0) | 496 | if (count <= 0) |
| @@ -538,9 +499,6 @@ getloadavg (double loadavg[], int nelem) | |||
| 538 | 499 | ||
| 539 | for (elem = 0; elem < nelem; elem++) | 500 | for (elem = 0; elem < nelem; elem++) |
| 540 | { | 501 | { |
| 541 | double numerator = 0; | ||
| 542 | double denominator = 1; | ||
| 543 | |||
| 544 | while (*ptr == ' ') | 502 | while (*ptr == ' ') |
| 545 | ptr++; | 503 | ptr++; |
| 546 | 504 | ||
| @@ -556,6 +514,9 @@ getloadavg (double loadavg[], int nelem) | |||
| 556 | break; | 514 | break; |
| 557 | } | 515 | } |
| 558 | 516 | ||
| 517 | double numerator = 0; | ||
| 518 | double denominator = 1; | ||
| 519 | |||
| 559 | while ('0' <= *ptr && *ptr <= '9') | 520 | while ('0' <= *ptr && *ptr <= '9') |
| 560 | numerator = 10 * numerator + (*ptr++ - '0'); | 521 | numerator = 10 * numerator + (*ptr++ - '0'); |
| 561 | 522 | ||
| @@ -578,24 +539,25 @@ getloadavg (double loadavg[], int nelem) | |||
| 578 | # define NETBSD_LDAV_FILE "/kern/loadavg" | 539 | # define NETBSD_LDAV_FILE "/kern/loadavg" |
| 579 | # endif | 540 | # endif |
| 580 | 541 | ||
| 581 | unsigned long int load_ave[3], scale; | ||
| 582 | int count; | ||
| 583 | char readbuf[4 * INT_BUFSIZE_BOUND (unsigned long int) + 1]; | ||
| 584 | int fd = open (NETBSD_LDAV_FILE, O_RDONLY | O_CLOEXEC); | 542 | int fd = open (NETBSD_LDAV_FILE, O_RDONLY | O_CLOEXEC); |
| 585 | if (fd < 0) | 543 | if (fd < 0) |
| 586 | return fd; | 544 | return fd; |
| 545 | |||
| 546 | char readbuf[4 * INT_BUFSIZE_BOUND (unsigned long int) + 1]; | ||
| 587 | int nread = read (fd, readbuf, sizeof readbuf - 1); | 547 | int nread = read (fd, readbuf, sizeof readbuf - 1); |
| 588 | int err = errno; | 548 | int saved_errno = errno; |
| 589 | close (fd); | 549 | close (fd); |
| 590 | if (nread < 0) | 550 | if (nread < 0) |
| 591 | { | 551 | { |
| 592 | errno = err; | 552 | errno = saved_errno; |
| 593 | return -1; | 553 | return -1; |
| 594 | } | 554 | } |
| 595 | readbuf[nread] = '\0'; | 555 | readbuf[nread] = '\0'; |
| 596 | count = sscanf (readbuf, "%lu %lu %lu %lu\n", | 556 | |
| 597 | &load_ave[0], &load_ave[1], &load_ave[2], | 557 | unsigned long int load_ave[3], scale; |
| 598 | &scale); | 558 | int count = sscanf (readbuf, "%lu %lu %lu %lu\n", |
| 559 | &load_ave[0], &load_ave[1], &load_ave[2], | ||
| 560 | &scale); | ||
| 599 | if (count != 4) | 561 | if (count != 4) |
| 600 | { | 562 | { |
| 601 | errno = ENOTSUP; | 563 | errno = ENOTSUP; |
| @@ -613,10 +575,6 @@ getloadavg (double loadavg[], int nelem) | |||
| 613 | # define LDAV_DONE | 575 | # define LDAV_DONE |
| 614 | /* The NeXT code was adapted from iscreen 3.2. */ | 576 | /* The NeXT code was adapted from iscreen 3.2. */ |
| 615 | 577 | ||
| 616 | host_t host; | ||
| 617 | struct processor_set_basic_info info; | ||
| 618 | unsigned int info_count; | ||
| 619 | |||
| 620 | /* We only know how to get the 1-minute average for this system, | 578 | /* We only know how to get the 1-minute average for this system, |
| 621 | so even if the caller asks for more than 1, we only return 1. */ | 579 | so even if the caller asks for more than 1, we only return 1. */ |
| 622 | 580 | ||
| @@ -628,7 +586,9 @@ getloadavg (double loadavg[], int nelem) | |||
| 628 | 586 | ||
| 629 | if (getloadavg_initialized) | 587 | if (getloadavg_initialized) |
| 630 | { | 588 | { |
| 631 | info_count = PROCESSOR_SET_BASIC_INFO_COUNT; | 589 | host_t host; |
| 590 | struct processor_set_basic_info info; | ||
| 591 | unsigned int info_count = PROCESSOR_SET_BASIC_INFO_COUNT; | ||
| 632 | if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, | 592 | if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, |
| 633 | (processor_set_info_t) &info, &info_count) | 593 | (processor_set_info_t) &info, &info_count) |
| 634 | != KERN_SUCCESS) | 594 | != KERN_SUCCESS) |
| @@ -654,14 +614,9 @@ getloadavg (double loadavg[], int nelem) | |||
| 654 | can be gathered with inq_stats system calls. | 614 | can be gathered with inq_stats system calls. |
| 655 | We only know how to get the 1-minute average for this system. */ | 615 | We only know how to get the 1-minute average for this system. */ |
| 656 | 616 | ||
| 657 | struct proc_summary proc_sum_data; | ||
| 658 | struct stat_descr proc_info; | ||
| 659 | double load; | ||
| 660 | register unsigned int i, j; | ||
| 661 | |||
| 662 | if (cpus == 0) | 617 | if (cpus == 0) |
| 663 | { | 618 | { |
| 664 | register unsigned int c, i; | 619 | register unsigned int c; |
| 665 | struct cpu_config conf; | 620 | struct cpu_config conf; |
| 666 | struct stat_descr desc; | 621 | struct stat_descr desc; |
| 667 | 622 | ||
| @@ -675,7 +630,7 @@ getloadavg (double loadavg[], int nelem) | |||
| 675 | return -1; | 630 | return -1; |
| 676 | 631 | ||
| 677 | c = 0; | 632 | c = 0; |
| 678 | for (i = 0; i < conf.config_maxclass; ++i) | 633 | for (unsigned int i = 0; i < conf.config_maxclass; ++i) |
| 679 | { | 634 | { |
| 680 | struct class_stats stats; | 635 | struct class_stats stats; |
| 681 | memset (&stats, 0, sizeof stats); | 636 | memset (&stats, 0, sizeof stats); |
| @@ -694,6 +649,9 @@ getloadavg (double loadavg[], int nelem) | |||
| 694 | samples = cpus < 2 ? 3 : (2 * cpus / 3); | 649 | samples = cpus < 2 ? 3 : (2 * cpus / 3); |
| 695 | } | 650 | } |
| 696 | 651 | ||
| 652 | struct proc_summary proc_sum_data; | ||
| 653 | |||
| 654 | struct stat_descr proc_info; | ||
| 697 | proc_info.sd_next = 0; | 655 | proc_info.sd_next = 0; |
| 698 | proc_info.sd_subsys = SUBSYS_PROC; | 656 | proc_info.sd_subsys = SUBSYS_PROC; |
| 699 | proc_info.sd_type = PROCTYPE_SUMMARY; | 657 | proc_info.sd_type = PROCTYPE_SUMMARY; |
| @@ -704,9 +662,9 @@ getloadavg (double loadavg[], int nelem) | |||
| 704 | if (inq_stats (1, &proc_info) != 0) | 662 | if (inq_stats (1, &proc_info) != 0) |
| 705 | return -1; | 663 | return -1; |
| 706 | 664 | ||
| 707 | load = proc_sum_data.ps_nrunnable; | 665 | double load = proc_sum_data.ps_nrunnable; |
| 708 | j = 0; | 666 | register unsigned int j = 0; |
| 709 | for (i = samples - 1; i > 0; --i) | 667 | for (unsigned int i = samples - 1; i > 0; --i) |
| 710 | { | 668 | { |
| 711 | load += proc_sum_data.ps_nrun[j]; | 669 | load += proc_sum_data.ps_nrun[j]; |
| 712 | if (j++ == PS_NRUNSIZE) | 670 | if (j++ == PS_NRUNSIZE) |
| @@ -781,18 +739,6 @@ getloadavg (double loadavg[], int nelem) | |||
| 781 | } | 739 | } |
| 782 | # endif /* __MSDOS__ || WINDOWS32 */ | 740 | # endif /* __MSDOS__ || WINDOWS32 */ |
| 783 | 741 | ||
| 784 | # if !defined (LDAV_DONE) && defined (OSF_ALPHA) /* OSF/1 */ | ||
| 785 | # define LDAV_DONE | ||
| 786 | |||
| 787 | struct tbl_loadavg load_ave; | ||
| 788 | table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); | ||
| 789 | for (elem = 0; elem < nelem; elem++) | ||
| 790 | loadavg[elem] | ||
| 791 | = (load_ave.tl_lscale == 0 | ||
| 792 | ? load_ave.tl_avenrun.d[elem] | ||
| 793 | : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); | ||
| 794 | # endif /* OSF_ALPHA */ | ||
| 795 | |||
| 796 | # if ! defined LDAV_DONE && defined __VMS /* VMS */ | 742 | # if ! defined LDAV_DONE && defined __VMS /* VMS */ |
| 797 | /* VMS specific code -- read from the Load Ave driver. */ | 743 | /* VMS specific code -- read from the Load Ave driver. */ |
| 798 | 744 | ||
| @@ -837,52 +783,44 @@ getloadavg (double loadavg[], int nelem) | |||
| 837 | # endif /* ! defined LDAV_DONE && defined __VMS */ | 783 | # endif /* ! defined LDAV_DONE && defined __VMS */ |
| 838 | 784 | ||
| 839 | # if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS | 785 | # if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS |
| 840 | /* IRIX, other old systems */ | 786 | /* other old systems */ |
| 841 | 787 | ||
| 842 | /* UNIX-specific code -- read the average from /dev/kmem. */ | 788 | /* UNIX-specific code -- read the average from /dev/kmem. */ |
| 843 | 789 | ||
| 844 | # define LDAV_PRIVILEGED /* This code requires special installation. */ | 790 | # define LDAV_PRIVILEGED /* This code requires special installation. */ |
| 845 | 791 | ||
| 846 | LOAD_AVE_TYPE load_ave[3]; | ||
| 847 | |||
| 848 | /* Get the address of LDAV_SYMBOL. */ | 792 | /* Get the address of LDAV_SYMBOL. */ |
| 849 | if (offset == 0) | 793 | if (offset == 0) |
| 850 | { | 794 | { |
| 851 | # ifndef sgi | 795 | # if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER |
| 852 | # if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER | ||
| 853 | strcpy (name_list[0].n_name, LDAV_SYMBOL); | 796 | strcpy (name_list[0].n_name, LDAV_SYMBOL); |
| 854 | strcpy (name_list[1].n_name, ""); | 797 | strcpy (name_list[1].n_name, ""); |
| 855 | # else /* NLIST_STRUCT */ | 798 | # else /* NLIST_STRUCT */ |
| 856 | # ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | 799 | # ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME |
| 857 | name_list[0].n_un.n_name = LDAV_SYMBOL; | 800 | name_list[0].n_un.n_name = LDAV_SYMBOL; |
| 858 | name_list[1].n_un.n_name = 0; | 801 | name_list[1].n_un.n_name = 0; |
| 859 | # else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ | 802 | # else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ |
| 860 | name_list[0].n_name = LDAV_SYMBOL; | 803 | name_list[0].n_name = LDAV_SYMBOL; |
| 861 | name_list[1].n_name = 0; | 804 | name_list[1].n_name = 0; |
| 862 | # endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ | 805 | # endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ |
| 863 | # endif /* NLIST_STRUCT */ | 806 | # endif /* NLIST_STRUCT */ |
| 864 | 807 | ||
| 865 | # ifndef SUNOS_5 | 808 | # ifndef SUNOS_5 |
| 866 | if ( | 809 | if ( |
| 867 | # if !defined (_AIX) | 810 | # if !defined (_AIX) |
| 868 | nlist (KERNEL_FILE, name_list) | 811 | nlist (KERNEL_FILE, name_list) |
| 869 | # else /* _AIX */ | 812 | # else /* _AIX */ |
| 870 | knlist (name_list, 1, sizeof (name_list[0])) | 813 | knlist (name_list, 1, sizeof (name_list[0])) |
| 871 | # endif | 814 | # endif |
| 872 | >= 0) | 815 | >= 0) |
| 873 | /* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i. */ | 816 | /* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i. */ |
| 874 | { | 817 | { |
| 875 | # ifdef FIXUP_KERNEL_SYMBOL_ADDR | 818 | # ifdef FIXUP_KERNEL_SYMBOL_ADDR |
| 876 | FIXUP_KERNEL_SYMBOL_ADDR (name_list); | 819 | FIXUP_KERNEL_SYMBOL_ADDR (name_list); |
| 877 | # endif | 820 | # endif |
| 878 | offset = name_list[0].n_value; | 821 | offset = name_list[0].n_value; |
| 879 | } | 822 | } |
| 880 | # endif /* !SUNOS_5 */ | 823 | # endif /* !SUNOS_5 */ |
| 881 | # else /* sgi */ | ||
| 882 | ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); | ||
| 883 | if (ldav_off != -1) | ||
| 884 | offset = (long int) ldav_off & 0x7fffffff; | ||
| 885 | # endif /* sgi */ | ||
| 886 | } | 824 | } |
| 887 | 825 | ||
| 888 | /* Make sure we have /dev/kmem open. */ | 826 | /* Make sure we have /dev/kmem open. */ |
| @@ -909,6 +847,8 @@ getloadavg (double loadavg[], int nelem) | |||
| 909 | # endif /* SUNOS_5 */ | 847 | # endif /* SUNOS_5 */ |
| 910 | } | 848 | } |
| 911 | 849 | ||
| 850 | LOAD_AVE_TYPE load_ave[3]; | ||
| 851 | |||
| 912 | /* If we can, get the load average values. */ | 852 | /* If we can, get the load average values. */ |
| 913 | if (offset && getloadavg_initialized) | 853 | if (offset && getloadavg_initialized) |
| 914 | { | 854 | { |
diff --git a/gl/getopt-cdefs.in.h b/gl/getopt-cdefs.in.h index 3a5d06be..57406947 100644 --- a/gl/getopt-cdefs.in.h +++ b/gl/getopt-cdefs.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt-on-non-glibc compatibility macros. | 1 | /* getopt-on-non-glibc compatibility macros. |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/gl/getopt-core.h b/gl/getopt-core.h index 51ac213d..c815966f 100644 --- a/gl/getopt-core.h +++ b/gl/getopt-core.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt (basic, portable features only). | 1 | /* Declarations for getopt (basic, portable features only). |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/gl/getopt-ext.h b/gl/getopt-ext.h index 92b66a3b..c0784d96 100644 --- a/gl/getopt-ext.h +++ b/gl/getopt-ext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt (GNU extensions). | 1 | /* Declarations for getopt (GNU extensions). |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/gl/getopt-pfx-core.h b/gl/getopt-pfx-core.h index 7c5ea094..d7dd8788 100644 --- a/gl/getopt-pfx-core.h +++ b/gl/getopt-pfx-core.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt (basic, portable features) gnulib wrapper header. | 1 | /* getopt (basic, portable features) gnulib wrapper header. |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/gl/getopt-pfx-ext.h b/gl/getopt-pfx-ext.h index a61c68c7..db2e27f3 100644 --- a/gl/getopt-pfx-ext.h +++ b/gl/getopt-pfx-ext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt (GNU extensions) gnulib wrapper header. | 1 | /* getopt (GNU extensions) gnulib wrapper header. |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/gl/getopt.c b/gl/getopt.c index 6b155e6c..406a406b 100644 --- a/gl/getopt.c +++ b/gl/getopt.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Getopt for GNU. | 1 | /* Getopt for GNU. |
| 2 | Copyright (C) 1987-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1987-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
| @@ -42,7 +42,7 @@ | |||
| 42 | # define funlockfile(fp) _IO_funlockfile (fp) | 42 | # define funlockfile(fp) _IO_funlockfile (fp) |
| 43 | #else | 43 | #else |
| 44 | # include "gettext.h" | 44 | # include "gettext.h" |
| 45 | # define _(msgid) dgettext ("gnulib", msgid) | 45 | # define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid) |
| 46 | /* When used standalone, flockfile and funlockfile might not be | 46 | /* When used standalone, flockfile and funlockfile might not be |
| 47 | available. */ | 47 | available. */ |
| 48 | # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ | 48 | # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ |
| @@ -133,7 +133,6 @@ exchange (char **argv, struct _getopt_data *d) | |||
| 133 | int bottom = d->__first_nonopt; | 133 | int bottom = d->__first_nonopt; |
| 134 | int middle = d->__last_nonopt; | 134 | int middle = d->__last_nonopt; |
| 135 | int top = d->optind; | 135 | int top = d->optind; |
| 136 | char *tem; | ||
| 137 | 136 | ||
| 138 | /* Exchange the shorter segment with the far end of the longer segment. | 137 | /* Exchange the shorter segment with the far end of the longer segment. |
| 139 | That puts the shorter segment into the right place. | 138 | That puts the shorter segment into the right place. |
| @@ -151,7 +150,7 @@ exchange (char **argv, struct _getopt_data *d) | |||
| 151 | /* Swap it with the top part of the top segment. */ | 150 | /* Swap it with the top part of the top segment. */ |
| 152 | for (i = 0; i < len; i++) | 151 | for (i = 0; i < len; i++) |
| 153 | { | 152 | { |
| 154 | tem = argv[bottom + i]; | 153 | char *tem = argv[bottom + i]; |
| 155 | argv[bottom + i] = argv[top - (middle - bottom) + i]; | 154 | argv[bottom + i] = argv[top - (middle - bottom) + i]; |
| 156 | argv[top - (middle - bottom) + i] = tem; | 155 | argv[top - (middle - bottom) + i] = tem; |
| 157 | } | 156 | } |
| @@ -167,7 +166,7 @@ exchange (char **argv, struct _getopt_data *d) | |||
| 167 | /* Swap it with the bottom part of the bottom segment. */ | 166 | /* Swap it with the bottom part of the bottom segment. */ |
| 168 | for (i = 0; i < len; i++) | 167 | for (i = 0; i < len; i++) |
| 169 | { | 168 | { |
| 170 | tem = argv[bottom + i]; | 169 | char *tem = argv[bottom + i]; |
| 171 | argv[bottom + i] = argv[middle + i]; | 170 | argv[bottom + i] = argv[middle + i]; |
| 172 | argv[middle + i] = tem; | 171 | argv[middle + i] = tem; |
| 173 | } | 172 | } |
| @@ -196,28 +195,29 @@ process_long_option (int argc, char **argv, const char *optstring, | |||
| 196 | int long_only, struct _getopt_data *d, | 195 | int long_only, struct _getopt_data *d, |
| 197 | int print_errors, const char *prefix) | 196 | int print_errors, const char *prefix) |
| 198 | { | 197 | { |
| 199 | char *nameend; | ||
| 200 | size_t namelen; | ||
| 201 | const struct option *p; | ||
| 202 | const struct option *pfound = NULL; | ||
| 203 | int n_options; | ||
| 204 | int option_index; | ||
| 205 | 198 | ||
| 199 | char *nameend; | ||
| 206 | for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) | 200 | for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) |
| 207 | /* Do nothing. */ ; | 201 | /* Do nothing. */ ; |
| 208 | namelen = nameend - d->__nextchar; | 202 | size_t namelen = nameend - d->__nextchar; |
| 209 | 203 | ||
| 210 | /* First look for an exact match, counting the options as a side | 204 | /* First look for an exact match, counting the options as a side |
| 211 | effect. */ | 205 | effect. */ |
| 212 | for (p = longopts, n_options = 0; p->name; p++, n_options++) | 206 | const struct option *pfound = NULL; |
| 213 | if (!strncmp (p->name, d->__nextchar, namelen) | 207 | int n_options; |
| 214 | && namelen == strlen (p->name)) | 208 | int option_index; |
| 215 | { | 209 | { |
| 216 | /* Exact match found. */ | 210 | const struct option *p; |
| 217 | pfound = p; | 211 | for (p = longopts, n_options = 0; p->name; p++, n_options++) |
| 218 | option_index = n_options; | 212 | if (!strncmp (p->name, d->__nextchar, namelen) |
| 219 | break; | 213 | && namelen == strlen (p->name)) |
| 220 | } | 214 | { |
| 215 | /* Exact match found. */ | ||
| 216 | pfound = p; | ||
| 217 | option_index = n_options; | ||
| 218 | break; | ||
| 219 | } | ||
| 220 | } | ||
| 221 | 221 | ||
| 222 | if (pfound == NULL) | 222 | if (pfound == NULL) |
| 223 | { | 223 | { |
| @@ -227,6 +227,7 @@ process_long_option (int argc, char **argv, const char *optstring, | |||
| 227 | unsigned char ambig_fallback; | 227 | unsigned char ambig_fallback; |
| 228 | void *ambig_malloced = NULL; | 228 | void *ambig_malloced = NULL; |
| 229 | int indfound = -1; | 229 | int indfound = -1; |
| 230 | const struct option *p; | ||
| 230 | 231 | ||
| 231 | for (p = longopts, option_index = 0; p->name; p++, option_index++) | 232 | for (p = longopts, option_index = 0; p->name; p++, option_index++) |
| 232 | if (!strncmp (p->name, d->__nextchar, namelen)) | 233 | if (!strncmp (p->name, d->__nextchar, namelen)) |
| @@ -475,11 +476,11 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, | |||
| 475 | const struct option *longopts, int *longind, | 476 | const struct option *longopts, int *longind, |
| 476 | int long_only, struct _getopt_data *d, int posixly_correct) | 477 | int long_only, struct _getopt_data *d, int posixly_correct) |
| 477 | { | 478 | { |
| 478 | int print_errors = d->opterr; | ||
| 479 | |||
| 480 | if (argc < 1) | 479 | if (argc < 1) |
| 481 | return -1; | 480 | return -1; |
| 482 | 481 | ||
| 482 | int print_errors = d->opterr; | ||
| 483 | |||
| 483 | d->optarg = NULL; | 484 | d->optarg = NULL; |
| 484 | 485 | ||
| 485 | if (d->optind == 0 || !d->__initialized) | 486 | if (d->optind == 0 || !d->__initialized) |
| @@ -594,11 +595,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, | |||
| 594 | if (long_only && (argv[d->optind][2] | 595 | if (long_only && (argv[d->optind][2] |
| 595 | || !strchr (optstring, argv[d->optind][1]))) | 596 | || !strchr (optstring, argv[d->optind][1]))) |
| 596 | { | 597 | { |
| 597 | int code; | ||
| 598 | d->__nextchar = argv[d->optind] + 1; | 598 | d->__nextchar = argv[d->optind] + 1; |
| 599 | code = process_long_option (argc, argv, optstring, longopts, | 599 | int code = process_long_option (argc, argv, optstring, longopts, |
| 600 | longind, long_only, d, | 600 | longind, long_only, d, |
| 601 | print_errors, "-"); | 601 | print_errors, "-"); |
| 602 | if (code != -1) | 602 | if (code != -1) |
| 603 | return code; | 603 | return code; |
| 604 | } | 604 | } |
| @@ -707,14 +707,12 @@ _getopt_internal (int argc, char **argv, const char *optstring, | |||
| 707 | const struct option *longopts, int *longind, int long_only, | 707 | const struct option *longopts, int *longind, int long_only, |
| 708 | int posixly_correct) | 708 | int posixly_correct) |
| 709 | { | 709 | { |
| 710 | int result; | ||
| 711 | |||
| 712 | getopt_data.optind = optind; | 710 | getopt_data.optind = optind; |
| 713 | getopt_data.opterr = opterr; | 711 | getopt_data.opterr = opterr; |
| 714 | 712 | ||
| 715 | result = _getopt_internal_r (argc, argv, optstring, longopts, | 713 | int result = _getopt_internal_r (argc, argv, optstring, longopts, |
| 716 | longind, long_only, &getopt_data, | 714 | longind, long_only, &getopt_data, |
| 717 | posixly_correct); | 715 | posixly_correct); |
| 718 | 716 | ||
| 719 | optind = getopt_data.optind; | 717 | optind = getopt_data.optind; |
| 720 | optarg = getopt_data.optarg; | 718 | optarg = getopt_data.optarg; |
| @@ -751,14 +749,13 @@ GETOPT_ENTRY(getopt, 1) | |||
| 751 | int | 749 | int |
| 752 | main (int argc, char **argv) | 750 | main (int argc, char **argv) |
| 753 | { | 751 | { |
| 754 | int c; | ||
| 755 | int digit_optind = 0; | 752 | int digit_optind = 0; |
| 756 | 753 | ||
| 757 | while (1) | 754 | while (1) |
| 758 | { | 755 | { |
| 759 | int this_option_optind = optind ? optind : 1; | 756 | int this_option_optind = optind ? optind : 1; |
| 760 | 757 | ||
| 761 | c = getopt (argc, argv, "abc:d:0123456789"); | 758 | int c = getopt (argc, argv, "abc:d:0123456789"); |
| 762 | if (c == -1) | 759 | if (c == -1) |
| 763 | break; | 760 | break; |
| 764 | 761 | ||
diff --git a/gl/getopt.in.h b/gl/getopt.in.h index 4a87a2d5..e72a034b 100644 --- a/gl/getopt.in.h +++ b/gl/getopt.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt. | 1 | /* Declarations for getopt. |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library, which supplies a different version of | 5 | with the GNU C Library, which supplies a different version of |
diff --git a/gl/getopt1.c b/gl/getopt1.c index c8566845..a5f99888 100644 --- a/gl/getopt1.c +++ b/gl/getopt1.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. | 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. |
| 2 | Copyright (C) 1987-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1987-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
| @@ -73,7 +73,6 @@ _getopt_long_only_r (int argc, char **argv, const char *options, | |||
| 73 | int | 73 | int |
| 74 | main (int argc, char **argv) | 74 | main (int argc, char **argv) |
| 75 | { | 75 | { |
| 76 | int c; | ||
| 77 | int digit_optind = 0; | 76 | int digit_optind = 0; |
| 78 | 77 | ||
| 79 | while (1) | 78 | while (1) |
| @@ -91,8 +90,8 @@ main (int argc, char **argv) | |||
| 91 | {0, 0, 0, 0} | 90 | {0, 0, 0, 0} |
| 92 | }; | 91 | }; |
| 93 | 92 | ||
| 94 | c = getopt_long (argc, argv, "abc:d:0123456789", | 93 | int c = getopt_long (argc, argv, "abc:d:0123456789", |
| 95 | long_options, &option_index); | 94 | long_options, &option_index); |
| 96 | if (c == -1) | 95 | if (c == -1) |
| 97 | break; | 96 | break; |
| 98 | 97 | ||
diff --git a/gl/getopt_int.h b/gl/getopt_int.h index 94c1945c..023d8a4f 100644 --- a/gl/getopt_int.h +++ b/gl/getopt_int.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Internal declarations for getopt. | 1 | /* Internal declarations for getopt. |
| 2 | Copyright (C) 1989-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/gl/getprogname.c b/gl/getprogname.c index 4fe7c90d..8eec96c5 100644 --- a/gl/getprogname.c +++ b/gl/getprogname.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Program name management. | 1 | /* Program name management. |
| 2 | Copyright (C) 2016-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2016-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published by | 5 | it under the terms of the GNU Lesser General Public License as published by |
| @@ -42,14 +42,6 @@ | |||
| 42 | # include <string.h> | 42 | # include <string.h> |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #if defined __sgi || defined __osf__ | ||
| 46 | # include <string.h> | ||
| 47 | # include <unistd.h> | ||
| 48 | # include <stdio.h> | ||
| 49 | # include <fcntl.h> | ||
| 50 | # include <sys/procfs.h> | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #if defined __SCO_VERSION__ || defined __sysv5__ | 45 | #if defined __SCO_VERSION__ || defined __sysv5__ |
| 54 | # include <fcntl.h> | 46 | # include <fcntl.h> |
| 55 | # include <string.h> | 47 | # include <string.h> |
| @@ -137,7 +129,7 @@ getprogname (void) | |||
| 137 | else | 129 | else |
| 138 | p = cmd; | 130 | p = cmd; |
| 139 | if (strlen (p) > PST_UCOMMLEN - 1 | 131 | if (strlen (p) > PST_UCOMMLEN - 1 |
| 140 | && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0) | 132 | && memeq (p, ucomm, PST_UCOMMLEN - 1)) |
| 141 | /* p is less truncated than ucomm. */ | 133 | /* p is less truncated than ucomm. */ |
| 142 | ; | 134 | ; |
| 143 | else | 135 | else |
| @@ -173,7 +165,7 @@ getprogname (void) | |||
| 173 | else | 165 | else |
| 174 | p = cmd; | 166 | p = cmd; |
| 175 | if (strlen (p) > PST_UCOMMLEN - 1 | 167 | if (strlen (p) > PST_UCOMMLEN - 1 |
| 176 | && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0) | 168 | && memeq (p, ucomm, PST_UCOMMLEN - 1)) |
| 177 | /* p is less truncated than ucomm. */ | 169 | /* p is less truncated than ucomm. */ |
| 178 | ; | 170 | ; |
| 179 | else | 171 | else |
| @@ -196,7 +188,6 @@ getprogname (void) | |||
| 196 | if (first) | 188 | if (first) |
| 197 | { | 189 | { |
| 198 | pid_t pid = getpid (); | 190 | pid_t pid = getpid (); |
| 199 | int token; | ||
| 200 | W_PSPROC buf; | 191 | W_PSPROC buf; |
| 201 | first = 0; | 192 | first = 0; |
| 202 | memset (&buf, 0, sizeof(buf)); | 193 | memset (&buf, 0, sizeof(buf)); |
| @@ -205,7 +196,8 @@ getprogname (void) | |||
| 205 | buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); | 196 | buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); |
| 206 | if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) | 197 | if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) |
| 207 | { | 198 | { |
| 208 | for (token = 0; token >= 0; | 199 | for (int token = 0; |
| 200 | token >= 0; | ||
| 209 | token = w_getpsent (token, &buf, sizeof(buf))) | 201 | token = w_getpsent (token, &buf, sizeof(buf))) |
| 210 | { | 202 | { |
| 211 | if (token > 0 && buf.ps_pid == pid) | 203 | if (token > 0 && buf.ps_pid == pid) |
| @@ -234,60 +226,22 @@ getprogname (void) | |||
| 234 | free (buf.ps_pathptr); | 226 | free (buf.ps_pathptr); |
| 235 | } | 227 | } |
| 236 | return p; | 228 | return p; |
| 237 | # elif defined __sgi || defined __osf__ /* IRIX or Tru64 */ | ||
| 238 | char filename[50]; | ||
| 239 | int fd; | ||
| 240 | |||
| 241 | # if defined __sgi | ||
| 242 | sprintf (filename, "/proc/pinfo/%d", (int) getpid ()); | ||
| 243 | # else | ||
| 244 | sprintf (filename, "/proc/%d", (int) getpid ()); | ||
| 245 | # endif | ||
| 246 | fd = open (filename, O_RDONLY | O_CLOEXEC); | ||
| 247 | if (0 <= fd) | ||
| 248 | { | ||
| 249 | prpsinfo_t buf; | ||
| 250 | int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf); | ||
| 251 | close (fd); | ||
| 252 | if (ioctl_ok) | ||
| 253 | { | ||
| 254 | char *name = buf.pr_fname; | ||
| 255 | size_t namesize = sizeof buf.pr_fname; | ||
| 256 | /* It may not be NUL-terminated. */ | ||
| 257 | char *namenul = memchr (name, '\0', namesize); | ||
| 258 | size_t namelen = namenul ? namenul - name : namesize; | ||
| 259 | char *namecopy = malloc (namelen + 1); | ||
| 260 | if (namecopy) | ||
| 261 | { | ||
| 262 | namecopy[namelen] = '\0'; | ||
| 263 | return memcpy (namecopy, name, namelen); | ||
| 264 | } | ||
| 265 | } | ||
| 266 | } | ||
| 267 | return NULL; | ||
| 268 | # elif defined __SCO_VERSION__ || defined __sysv5__ /* SCO OpenServer6/UnixWare */ | 229 | # elif defined __SCO_VERSION__ || defined __sysv5__ /* SCO OpenServer6/UnixWare */ |
| 269 | char buf[80]; | 230 | char buf[80]; |
| 270 | int fd; | ||
| 271 | sprintf (buf, "/proc/%d/cmdline", getpid()); | 231 | sprintf (buf, "/proc/%d/cmdline", getpid()); |
| 272 | fd = open (buf, O_RDONLY); | 232 | int fd = open (buf, O_RDONLY); |
| 273 | if (0 <= fd) | 233 | if (0 <= fd) |
| 274 | { | 234 | { |
| 275 | size_t n = read (fd, buf, 79); | 235 | size_t n = read (fd, buf, 79); |
| 276 | if (n > 0) | 236 | if (n > 0) |
| 277 | { | 237 | { |
| 278 | buf[n] = '\0'; /* Guarantee null-termination */ | 238 | buf[n] = '\0'; /* Guarantee null-termination */ |
| 279 | char *progname; | 239 | char *progname = strrchr (buf, '/'); |
| 280 | progname = strrchr (buf, '/'); | ||
| 281 | if (progname) | 240 | if (progname) |
| 282 | { | 241 | progname = progname + 1; /* Skip the '/' */ |
| 283 | progname = progname + 1; /* Skip the '/' */ | ||
| 284 | } | ||
| 285 | else | 242 | else |
| 286 | { | 243 | progname = buf; |
| 287 | progname = buf; | 244 | char *ret = malloc (strlen (progname) + 1); |
| 288 | } | ||
| 289 | char *ret; | ||
| 290 | ret = malloc (strlen (progname) + 1); | ||
| 291 | if (ret) | 245 | if (ret) |
| 292 | { | 246 | { |
| 293 | strcpy (ret, progname); | 247 | strcpy (ret, progname); |
diff --git a/gl/getprogname.h b/gl/getprogname.h index ee9bb286..3b5e502e 100644 --- a/gl/getprogname.h +++ b/gl/getprogname.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Program name management. | 1 | /* Program name management. |
| 2 | Copyright (C) 2016-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2016-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published by | 5 | it under the terms of the GNU Lesser General Public License as published by |
diff --git a/gl/gettext.h b/gl/gettext.h index 0650abc9..0291cf09 100644 --- a/gl/gettext.h +++ b/gl/gettext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convenience header for conditional use of GNU <libintl.h>. | 1 | /* Convenience header for conditional use of GNU <libintl.h>. |
| 2 | Copyright (C) 1995-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -298,12 +298,11 @@ dcpgettext_expr (const char *domain, | |||
| 298 | if (msg_ctxt_id != NULL) | 298 | if (msg_ctxt_id != NULL) |
| 299 | #endif | 299 | #endif |
| 300 | { | 300 | { |
| 301 | int found_translation; | ||
| 302 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | 301 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); |
| 303 | msg_ctxt_id[msgctxt_len - 1] = '\004'; | 302 | msg_ctxt_id[msgctxt_len - 1] = '\004'; |
| 304 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | 303 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); |
| 305 | translation = dcgettext (domain, msg_ctxt_id, category); | 304 | translation = dcgettext (domain, msg_ctxt_id, category); |
| 306 | found_translation = (translation != msg_ctxt_id); | 305 | int found_translation = (translation != msg_ctxt_id); |
| 307 | #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | 306 | #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS |
| 308 | if (msg_ctxt_id != buf) | 307 | if (msg_ctxt_id != buf) |
| 309 | free (msg_ctxt_id); | 308 | free (msg_ctxt_id); |
| @@ -346,12 +345,11 @@ dcnpgettext_expr (const char *domain, | |||
| 346 | if (msg_ctxt_id != NULL) | 345 | if (msg_ctxt_id != NULL) |
| 347 | #endif | 346 | #endif |
| 348 | { | 347 | { |
| 349 | int found_translation; | ||
| 350 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | 348 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); |
| 351 | msg_ctxt_id[msgctxt_len - 1] = '\004'; | 349 | msg_ctxt_id[msgctxt_len - 1] = '\004'; |
| 352 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | 350 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); |
| 353 | translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); | 351 | translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); |
| 354 | found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); | 352 | int found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); |
| 355 | #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS | 353 | #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS |
| 356 | if (msg_ctxt_id != buf) | 354 | if (msg_ctxt_id != buf) |
| 357 | free (msg_ctxt_id); | 355 | free (msg_ctxt_id); |
diff --git a/gl/gl_openssl.h b/gl/gl_openssl.h index dea70c1c..06fd8f66 100644 --- a/gl/gl_openssl.h +++ b/gl/gl_openssl.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*- | 1 | /* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2013-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2013-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -103,7 +103,7 @@ GL_OPENSSL_INLINE void * | |||
| 103 | GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *restrict res) | 103 | GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *restrict res) |
| 104 | { | 104 | { |
| 105 | /* Assume any unprocessed bytes in ctx are not to be ignored. */ | 105 | /* Assume any unprocessed bytes in ctx are not to be ignored. */ |
| 106 | _gl_CTX tmp_ctx = *(_gl_CTX *) ctx; | 106 | _gl_CTX tmp_ctx = *(_gl_CTX const *) ctx; |
| 107 | OPENSSL_FN (_Final) ((unsigned char *) res, &tmp_ctx); | 107 | OPENSSL_FN (_Final) ((unsigned char *) res, &tmp_ctx); |
| 108 | return res; | 108 | return res; |
| 109 | } | 109 | } |
diff --git a/gl/glthread/lock.c b/gl/glthread/lock.c index dace4fda..cfb9393c 100644 --- a/gl/glthread/lock.c +++ b/gl/glthread/lock.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Locking in multithreaded situations. | 1 | /* Locking in multithreaded situations. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -255,15 +255,13 @@ glthread_recursive_lock_destroy (gl_recursive_lock_t *lock) | |||
| 255 | # if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP | 255 | # if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP |
| 256 | 256 | ||
| 257 | # if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER | 257 | # if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER |
| 258 | /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ | 258 | /* glibc with bug https://sourceware.org/PR13701 */ |
| 259 | 259 | ||
| 260 | int | 260 | int |
| 261 | glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) | 261 | glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) |
| 262 | { | 262 | { |
| 263 | pthread_rwlockattr_t attributes; | 263 | pthread_rwlockattr_t attributes; |
| 264 | int err; | 264 | int err = pthread_rwlockattr_init (&attributes); |
| 265 | |||
| 266 | err = pthread_rwlockattr_init (&attributes); | ||
| 267 | if (err != 0) | 265 | if (err != 0) |
| 268 | return err; | 266 | return err; |
| 269 | /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that | 267 | /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that |
| @@ -286,9 +284,7 @@ glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) | |||
| 286 | int | 284 | int |
| 287 | glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) | 285 | glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) |
| 288 | { | 286 | { |
| 289 | int err; | 287 | int err = pthread_rwlock_init (&lock->rwlock, NULL); |
| 290 | |||
| 291 | err = pthread_rwlock_init (&lock->rwlock, NULL); | ||
| 292 | if (err != 0) | 288 | if (err != 0) |
| 293 | return err; | 289 | return err; |
| 294 | lock->initialized = 1; | 290 | lock->initialized = 1; |
| @@ -300,9 +296,7 @@ glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) | |||
| 300 | { | 296 | { |
| 301 | if (!lock->initialized) | 297 | if (!lock->initialized) |
| 302 | { | 298 | { |
| 303 | int err; | 299 | int err = pthread_mutex_lock (&lock->guard); |
| 304 | |||
| 305 | err = pthread_mutex_lock (&lock->guard); | ||
| 306 | if (err != 0) | 300 | if (err != 0) |
| 307 | return err; | 301 | return err; |
| 308 | if (!lock->initialized) | 302 | if (!lock->initialized) |
| @@ -326,9 +320,7 @@ glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) | |||
| 326 | { | 320 | { |
| 327 | if (!lock->initialized) | 321 | if (!lock->initialized) |
| 328 | { | 322 | { |
| 329 | int err; | 323 | int err = pthread_mutex_lock (&lock->guard); |
| 330 | |||
| 331 | err = pthread_mutex_lock (&lock->guard); | ||
| 332 | if (err != 0) | 324 | if (err != 0) |
| 333 | return err; | 325 | return err; |
| 334 | if (!lock->initialized) | 326 | if (!lock->initialized) |
| @@ -358,11 +350,9 @@ glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) | |||
| 358 | int | 350 | int |
| 359 | glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) | 351 | glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) |
| 360 | { | 352 | { |
| 361 | int err; | ||
| 362 | |||
| 363 | if (!lock->initialized) | 353 | if (!lock->initialized) |
| 364 | return EINVAL; | 354 | return EINVAL; |
| 365 | err = pthread_rwlock_destroy (&lock->rwlock); | 355 | int err = pthread_rwlock_destroy (&lock->rwlock); |
| 366 | if (err != 0) | 356 | if (err != 0) |
| 367 | return err; | 357 | return err; |
| 368 | lock->initialized = 0; | 358 | lock->initialized = 0; |
| @@ -376,9 +366,7 @@ glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) | |||
| 376 | int | 366 | int |
| 377 | glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) | 367 | glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) |
| 378 | { | 368 | { |
| 379 | int err; | 369 | int err = pthread_mutex_init (&lock->lock, NULL); |
| 380 | |||
| 381 | err = pthread_mutex_init (&lock->lock, NULL); | ||
| 382 | if (err != 0) | 370 | if (err != 0) |
| 383 | return err; | 371 | return err; |
| 384 | err = pthread_cond_init (&lock->waiting_readers, NULL); | 372 | err = pthread_cond_init (&lock->waiting_readers, NULL); |
| @@ -395,9 +383,7 @@ glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) | |||
| 395 | int | 383 | int |
| 396 | glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) | 384 | glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) |
| 397 | { | 385 | { |
| 398 | int err; | 386 | int err = pthread_mutex_lock (&lock->lock); |
| 399 | |||
| 400 | err = pthread_mutex_lock (&lock->lock); | ||
| 401 | if (err != 0) | 387 | if (err != 0) |
| 402 | return err; | 388 | return err; |
| 403 | /* Test whether only readers are currently running, and whether the runcount | 389 | /* Test whether only readers are currently running, and whether the runcount |
| @@ -422,9 +408,7 @@ glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) | |||
| 422 | int | 408 | int |
| 423 | glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) | 409 | glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) |
| 424 | { | 410 | { |
| 425 | int err; | 411 | int err = pthread_mutex_lock (&lock->lock); |
| 426 | |||
| 427 | err = pthread_mutex_lock (&lock->lock); | ||
| 428 | if (err != 0) | 412 | if (err != 0) |
| 429 | return err; | 413 | return err; |
| 430 | /* Test whether no readers or writers are currently running. */ | 414 | /* Test whether no readers or writers are currently running. */ |
| @@ -449,9 +433,7 @@ glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) | |||
| 449 | int | 433 | int |
| 450 | glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) | 434 | glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) |
| 451 | { | 435 | { |
| 452 | int err; | 436 | int err = pthread_mutex_lock (&lock->lock); |
| 453 | |||
| 454 | err = pthread_mutex_lock (&lock->lock); | ||
| 455 | if (err != 0) | 437 | if (err != 0) |
| 456 | return err; | 438 | return err; |
| 457 | if (lock->runcount < 0) | 439 | if (lock->runcount < 0) |
| @@ -505,9 +487,7 @@ glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) | |||
| 505 | int | 487 | int |
| 506 | glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) | 488 | glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) |
| 507 | { | 489 | { |
| 508 | int err; | 490 | int err = pthread_mutex_destroy (&lock->lock); |
| 509 | |||
| 510 | err = pthread_mutex_destroy (&lock->lock); | ||
| 511 | if (err != 0) | 491 | if (err != 0) |
| 512 | return err; | 492 | return err; |
| 513 | err = pthread_cond_destroy (&lock->waiting_readers); | 493 | err = pthread_cond_destroy (&lock->waiting_readers); |
| @@ -531,9 +511,7 @@ int | |||
| 531 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) | 511 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) |
| 532 | { | 512 | { |
| 533 | pthread_mutexattr_t attributes; | 513 | pthread_mutexattr_t attributes; |
| 534 | int err; | 514 | int err = pthread_mutexattr_init (&attributes); |
| 535 | |||
| 536 | err = pthread_mutexattr_init (&attributes); | ||
| 537 | if (err != 0) | 515 | if (err != 0) |
| 538 | return err; | 516 | return err; |
| 539 | err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); | 517 | err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); |
| @@ -560,9 +538,7 @@ int | |||
| 560 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) | 538 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) |
| 561 | { | 539 | { |
| 562 | pthread_mutexattr_t attributes; | 540 | pthread_mutexattr_t attributes; |
| 563 | int err; | 541 | int err = pthread_mutexattr_init (&attributes); |
| 564 | |||
| 565 | err = pthread_mutexattr_init (&attributes); | ||
| 566 | if (err != 0) | 542 | if (err != 0) |
| 567 | return err; | 543 | return err; |
| 568 | err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); | 544 | err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); |
| @@ -589,9 +565,7 @@ glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) | |||
| 589 | { | 565 | { |
| 590 | if (!lock->initialized) | 566 | if (!lock->initialized) |
| 591 | { | 567 | { |
| 592 | int err; | 568 | int err = pthread_mutex_lock (&lock->guard); |
| 593 | |||
| 594 | err = pthread_mutex_lock (&lock->guard); | ||
| 595 | if (err != 0) | 569 | if (err != 0) |
| 596 | return err; | 570 | return err; |
| 597 | if (!lock->initialized) | 571 | if (!lock->initialized) |
| @@ -621,11 +595,9 @@ glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) | |||
| 621 | int | 595 | int |
| 622 | glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) | 596 | glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) |
| 623 | { | 597 | { |
| 624 | int err; | ||
| 625 | |||
| 626 | if (!lock->initialized) | 598 | if (!lock->initialized) |
| 627 | return EINVAL; | 599 | return EINVAL; |
| 628 | err = pthread_mutex_destroy (&lock->recmutex); | 600 | int err = pthread_mutex_destroy (&lock->recmutex); |
| 629 | if (err != 0) | 601 | if (err != 0) |
| 630 | return err; | 602 | return err; |
| 631 | lock->initialized = 0; | 603 | lock->initialized = 0; |
| @@ -639,9 +611,7 @@ glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) | |||
| 639 | int | 611 | int |
| 640 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) | 612 | glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) |
| 641 | { | 613 | { |
| 642 | int err; | 614 | int err = pthread_mutex_init (&lock->mutex, NULL); |
| 643 | |||
| 644 | err = pthread_mutex_init (&lock->mutex, NULL); | ||
| 645 | if (err != 0) | 615 | if (err != 0) |
| 646 | return err; | 616 | return err; |
| 647 | lock->owner = (pthread_t) 0; | 617 | lock->owner = (pthread_t) 0; |
| @@ -655,9 +625,7 @@ glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) | |||
| 655 | pthread_t self = pthread_self (); | 625 | pthread_t self = pthread_self (); |
| 656 | if (lock->owner != self) | 626 | if (lock->owner != self) |
| 657 | { | 627 | { |
| 658 | int err; | 628 | int err = pthread_mutex_lock (&lock->mutex); |
| 659 | |||
| 660 | err = pthread_mutex_lock (&lock->mutex); | ||
| 661 | if (err != 0) | 629 | if (err != 0) |
| 662 | return err; | 630 | return err; |
| 663 | lock->owner = self; | 631 | lock->owner = self; |
diff --git a/gl/glthread/lock.h b/gl/glthread/lock.h index d6ccc202..d8190b6c 100644 --- a/gl/glthread/lock.h +++ b/gl/glthread/lock.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Locking in multithreaded situations. | 1 | /* Locking in multithreaded situations. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -239,7 +239,7 @@ typedef pthread_rwlock_t gl_rwlock_t; | |||
| 239 | # endif | 239 | # endif |
| 240 | # define glthread_rwlock_init(LOCK) \ | 240 | # define glthread_rwlock_init(LOCK) \ |
| 241 | (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) | 241 | (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) |
| 242 | # else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ | 242 | # else /* glibc with bug https://sourceware.org/PR13701 */ |
| 243 | # define gl_rwlock_initializer \ | 243 | # define gl_rwlock_initializer \ |
| 244 | PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP | 244 | PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP |
| 245 | # define glthread_rwlock_init(LOCK) \ | 245 | # define glthread_rwlock_init(LOCK) \ |
diff --git a/gl/glthread/once.c b/gl/glthread/once.c index 53211af8..b72a4a20 100644 --- a/gl/glthread/once.c +++ b/gl/glthread/once.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Once-only initialization in multithreaded situations. | 1 | /* Once-only initialization in multithreaded situations. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/glthread/once.h b/gl/glthread/once.h index 943bd7a2..b6d9ab40 100644 --- a/gl/glthread/once.h +++ b/gl/glthread/once.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Once-only initialization in multithreaded situations. | 1 | /* Once-only initialization in multithreaded situations. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/glthread/threadlib.c b/gl/glthread/threadlib.c index a6f7688b..5c0ba1f4 100644 --- a/gl/glthread/threadlib.c +++ b/gl/glthread/threadlib.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Multithreading primitives. | 1 | /* Multithreading primitives. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/hard-locale.c b/gl/hard-locale.c index 767906d1..6a3dad4f 100644 --- a/gl/hard-locale.c +++ b/gl/hard-locale.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* hard-locale.c -- Determine whether a locale is hard. | 1 | /* hard-locale.c -- Determine whether a locale is hard. |
| 2 | 2 | ||
| 3 | Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2025 Free Software | 3 | Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -32,7 +32,7 @@ hard_locale (int category) | |||
| 32 | if (setlocale_null_r (category, locale, sizeof (locale))) | 32 | if (setlocale_null_r (category, locale, sizeof (locale))) |
| 33 | return false; | 33 | return false; |
| 34 | 34 | ||
| 35 | if (!(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)) | 35 | if (!(streq (locale, "C") || streq (locale, "POSIX"))) |
| 36 | return true; | 36 | return true; |
| 37 | 37 | ||
| 38 | #if defined __ANDROID__ | 38 | #if defined __ANDROID__ |
diff --git a/gl/hard-locale.h b/gl/hard-locale.h index 29808da6..b8d7029d 100644 --- a/gl/hard-locale.h +++ b/gl/hard-locale.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Determine whether a locale is hard. | 1 | /* Determine whether a locale is hard. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2003-2004, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1999, 2003-2004, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/ialloc.c b/gl/ialloc.c index 881c8f04..38ec1d05 100644 --- a/gl/ialloc.c +++ b/gl/ialloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* malloc with idx_t rather than size_t | 1 | /* malloc with idx_t rather than size_t |
| 2 | 2 | ||
| 3 | Copyright 2021-2025 Free Software Foundation, Inc. | 3 | Copyright 2021-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define IALLOC_INLINE _GL_EXTERN_INLINE | 18 | #define IALLOC_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include "ialloc.h" | 20 | #include "ialloc.h" |
diff --git a/gl/ialloc.h b/gl/ialloc.h index 8bf5dd12..97b0e0c5 100644 --- a/gl/ialloc.h +++ b/gl/ialloc.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* ialloc.h -- malloc with idx_t rather than size_t | 1 | /* ialloc.h -- malloc with idx_t rather than size_t |
| 2 | 2 | ||
| 3 | Copyright 2021-2025 Free Software Foundation, Inc. | 3 | Copyright 2021-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/idpriv-droptemp.c b/gl/idpriv-droptemp.c index ecaab836..993d25b6 100644 --- a/gl/idpriv-droptemp.c +++ b/gl/idpriv-droptemp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Dropping uid/gid privileges of the current process temporarily. | 1 | /* Dropping uid/gid privileges of the current process temporarily. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
| @@ -51,7 +51,7 @@ idpriv_temp_drop (void) | |||
| 51 | # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */ | 51 | # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */ |
| 52 | if (setresgid (-1, gid, saved_gid) < 0) | 52 | if (setresgid (-1, gid, saved_gid) < 0) |
| 53 | return -1; | 53 | return -1; |
| 54 | # else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */ | 54 | # else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */ |
| 55 | if (setregid (-1, gid) < 0) | 55 | if (setregid (-1, gid) < 0) |
| 56 | return -1; | 56 | return -1; |
| 57 | # endif | 57 | # endif |
| @@ -64,7 +64,7 @@ idpriv_temp_drop (void) | |||
| 64 | figure 14. */ | 64 | figure 14. */ |
| 65 | if (setresuid (-1, uid, saved_uid) < 0) | 65 | if (setresuid (-1, uid, saved_uid) < 0) |
| 66 | return -1; | 66 | return -1; |
| 67 | # else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */ | 67 | # else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */ |
| 68 | if (setreuid (-1, uid) < 0) | 68 | if (setreuid (-1, uid) < 0) |
| 69 | return -1; | 69 | return -1; |
| 70 | # endif | 70 | # endif |
| @@ -142,7 +142,7 @@ idpriv_temp_restore (void) | |||
| 142 | figure 14. */ | 142 | figure 14. */ |
| 143 | if (setresuid (-1, saved_uid, -1) < 0) | 143 | if (setresuid (-1, saved_uid, -1) < 0) |
| 144 | return -1; | 144 | return -1; |
| 145 | # else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */ | 145 | # else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */ |
| 146 | if (setreuid (-1, saved_uid) < 0) | 146 | if (setreuid (-1, saved_uid) < 0) |
| 147 | return -1; | 147 | return -1; |
| 148 | # endif | 148 | # endif |
| @@ -151,7 +151,7 @@ idpriv_temp_restore (void) | |||
| 151 | # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */ | 151 | # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */ |
| 152 | if (setresgid (-1, saved_gid, -1) < 0) | 152 | if (setresgid (-1, saved_gid, -1) < 0) |
| 153 | return -1; | 153 | return -1; |
| 154 | # else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */ | 154 | # else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */ |
| 155 | if (setregid (-1, saved_gid) < 0) | 155 | if (setregid (-1, saved_gid) < 0) |
| 156 | return -1; | 156 | return -1; |
| 157 | # endif | 157 | # endif |
diff --git a/gl/idpriv.h b/gl/idpriv.h index f4f8158e..8fa6c0e6 100644 --- a/gl/idpriv.h +++ b/gl/idpriv.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Dropping uid/gid privileges of the current process. | 1 | /* Dropping uid/gid privileges of the current process. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A type for indices and sizes. | 1 | /* A type for indices and sizes. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c index df3d9512..599ca4fb 100644 --- a/gl/inet_ntop.c +++ b/gl/inet_ntop.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form | 1 | /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form |
| 2 | 2 | ||
| 3 | Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -125,9 +125,7 @@ static const char * | |||
| 125 | inet_ntop4 (const unsigned char *src, char *dst, socklen_t size) | 125 | inet_ntop4 (const unsigned char *src, char *dst, socklen_t size) |
| 126 | { | 126 | { |
| 127 | char tmp[sizeof "255.255.255.255"]; | 127 | char tmp[sizeof "255.255.255.255"]; |
| 128 | int len; | 128 | int len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]); |
| 129 | |||
| 130 | len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]); | ||
| 131 | if (len < 0) | 129 | if (len < 0) |
| 132 | return NULL; | 130 | return NULL; |
| 133 | 131 | ||
| @@ -152,33 +150,25 @@ static const char * | |||
| 152 | inet_ntop6 (const unsigned char *src, char *dst, socklen_t size) | 150 | inet_ntop6 (const unsigned char *src, char *dst, socklen_t size) |
| 153 | { | 151 | { |
| 154 | /* | 152 | /* |
| 155 | * Note that int32_t and int16_t need only be "at least" large enough | ||
| 156 | * to contain a value of the specified size. On some systems, like | ||
| 157 | * Crays, there is no such thing as an integer variable with 16 bits. | ||
| 158 | * Keep this in mind if you think this function should have been coded | ||
| 159 | * to use pointer overlays. All the world's not a VAX. | ||
| 160 | */ | ||
| 161 | char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; | ||
| 162 | struct | ||
| 163 | { | ||
| 164 | int base, len; | ||
| 165 | } best, cur; | ||
| 166 | unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; | ||
| 167 | int i; | ||
| 168 | |||
| 169 | /* | ||
| 170 | * Preprocess: | 153 | * Preprocess: |
| 171 | * Copy the input (bytewise) array into a wordwise array. | 154 | * Copy the input (bytewise) array into a wordwise array. |
| 172 | * Find the longest run of 0x00's in src[] for :: shorthanding. | 155 | * Find the longest run of 0x00's in src[] for :: shorthanding. |
| 173 | */ | 156 | */ |
| 157 | unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; | ||
| 174 | memset (words, '\0', sizeof words); | 158 | memset (words, '\0', sizeof words); |
| 175 | for (i = 0; i < NS_IN6ADDRSZ; i += 2) | 159 | for (int i = 0; i < NS_IN6ADDRSZ; i += 2) |
| 176 | words[i / 2] = (src[i] << 8) | src[i + 1]; | 160 | words[i / 2] = (src[i] << 8) | src[i + 1]; |
| 161 | |||
| 162 | struct | ||
| 163 | { | ||
| 164 | int base, len; | ||
| 165 | } best, cur; | ||
| 177 | best.base = -1; | 166 | best.base = -1; |
| 178 | cur.base = -1; | 167 | cur.base = -1; |
| 179 | IF_LINT(best.len = 0); | 168 | IF_LINT(best.len = 0); |
| 180 | IF_LINT(cur.len = 0); | 169 | IF_LINT(cur.len = 0); |
| 181 | for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) | 170 | |
| 171 | for (int i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) | ||
| 182 | { | 172 | { |
| 183 | if (words[i] == 0) | 173 | if (words[i] == 0) |
| 184 | { | 174 | { |
| @@ -208,8 +198,16 @@ inet_ntop6 (const unsigned char *src, char *dst, socklen_t size) | |||
| 208 | /* | 198 | /* |
| 209 | * Format the result. | 199 | * Format the result. |
| 210 | */ | 200 | */ |
| 211 | tp = tmp; | 201 | /* |
| 212 | for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) | 202 | * Note that int32_t and int16_t need only be "at least" large enough |
| 203 | * to contain a value of the specified size. On some systems, like | ||
| 204 | * Crays, there is no such thing as an integer variable with 16 bits. | ||
| 205 | * Keep this in mind if you think this function should have been coded | ||
| 206 | * to use pointer overlays. All the world's not a VAX. | ||
| 207 | */ | ||
| 208 | char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"]; | ||
| 209 | char *tp = tmp; | ||
| 210 | for (int i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) | ||
| 213 | { | 211 | { |
| 214 | /* Are we inside the best run of 0x00's? */ | 212 | /* Are we inside the best run of 0x00's? */ |
| 215 | if (best.base != -1 && i >= best.base && i < (best.base + best.len)) | 213 | if (best.base != -1 && i >= best.base && i < (best.base + best.len)) |
diff --git a/gl/inet_pton.c b/gl/inet_pton.c index 74d55c43..1e75c8c5 100644 --- a/gl/inet_pton.c +++ b/gl/inet_pton.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form | 1 | /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form |
| 2 | 2 | ||
| 3 | Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -112,43 +112,44 @@ inet_pton (int af, const char *restrict src, void *restrict dst) | |||
| 112 | static int | 112 | static int |
| 113 | inet_pton4 (const char *restrict src, unsigned char *restrict dst) | 113 | inet_pton4 (const char *restrict src, unsigned char *restrict dst) |
| 114 | { | 114 | { |
| 115 | int saw_digit, octets, ch; | 115 | unsigned char tmp[NS_INADDRSZ]; |
| 116 | unsigned char tmp[NS_INADDRSZ], *tp; | ||
| 117 | 116 | ||
| 118 | saw_digit = 0; | 117 | { |
| 119 | octets = 0; | 118 | int saw_digit = 0; |
| 120 | *(tp = tmp) = 0; | 119 | int octets = 0; |
| 121 | while ((ch = *src++) != '\0') | 120 | unsigned char *tp = tmp; |
| 122 | { | 121 | *tp = 0; |
| 123 | 122 | int ch; | |
| 124 | if (ch >= '0' && ch <= '9') | 123 | while ((ch = *src++) != '\0') |
| 125 | { | 124 | { |
| 126 | unsigned new = *tp * 10 + (ch - '0'); | 125 | if (ch >= '0' && ch <= '9') |
| 127 | 126 | { | |
| 128 | if (saw_digit && *tp == 0) | 127 | if (saw_digit && *tp == 0) |
| 129 | return (0); | 128 | return (0); |
| 130 | if (new > 255) | 129 | unsigned new = *tp * 10 + (ch - '0'); |
| 131 | return (0); | 130 | if (new > 255) |
| 132 | *tp = new; | 131 | return (0); |
| 133 | if (!saw_digit) | 132 | *tp = new; |
| 134 | { | 133 | if (!saw_digit) |
| 135 | if (++octets > 4) | 134 | { |
| 136 | return (0); | 135 | if (++octets > 4) |
| 137 | saw_digit = 1; | 136 | return (0); |
| 138 | } | 137 | saw_digit = 1; |
| 139 | } | 138 | } |
| 140 | else if (ch == '.' && saw_digit) | 139 | } |
| 141 | { | 140 | else if (ch == '.' && saw_digit) |
| 142 | if (octets == 4) | 141 | { |
| 143 | return (0); | 142 | if (octets == 4) |
| 144 | *++tp = 0; | 143 | return (0); |
| 145 | saw_digit = 0; | 144 | *++tp = 0; |
| 146 | } | 145 | saw_digit = 0; |
| 147 | else | 146 | } |
| 148 | return (0); | 147 | else |
| 149 | } | 148 | return (0); |
| 150 | if (octets < 4) | 149 | } |
| 151 | return (0); | 150 | if (octets < 4) |
| 151 | return (0); | ||
| 152 | } | ||
| 152 | memcpy (dst, tmp, NS_INADDRSZ); | 153 | memcpy (dst, tmp, NS_INADDRSZ); |
| 153 | return (1); | 154 | return (1); |
| 154 | } | 155 | } |
| @@ -172,93 +173,89 @@ static int | |||
| 172 | inet_pton6 (const char *restrict src, unsigned char *restrict dst) | 173 | inet_pton6 (const char *restrict src, unsigned char *restrict dst) |
| 173 | { | 174 | { |
| 174 | static const char xdigits[] = "0123456789abcdef"; | 175 | static const char xdigits[] = "0123456789abcdef"; |
| 175 | unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; | 176 | unsigned char tmp[NS_IN6ADDRSZ]; |
| 176 | const char *curtok; | ||
| 177 | int ch, saw_xdigit; | ||
| 178 | unsigned val; | ||
| 179 | 177 | ||
| 180 | tp = memset (tmp, '\0', NS_IN6ADDRSZ); | ||
| 181 | endp = tp + NS_IN6ADDRSZ; | ||
| 182 | colonp = NULL; | ||
| 183 | /* Leading :: requires some special handling. */ | 178 | /* Leading :: requires some special handling. */ |
| 184 | if (*src == ':') | 179 | if (*src == ':') |
| 185 | if (*++src != ':') | 180 | if (*++src != ':') |
| 186 | return (0); | 181 | return (0); |
| 187 | curtok = src; | ||
| 188 | saw_xdigit = 0; | ||
| 189 | val = 0; | ||
| 190 | while ((ch = c_tolower (*src++)) != '\0') | ||
| 191 | { | ||
| 192 | const char *pch; | ||
| 193 | 182 | ||
| 194 | pch = strchr (xdigits, ch); | 183 | { |
| 195 | if (pch != NULL) | 184 | unsigned char *tp = memset (tmp, '\0', NS_IN6ADDRSZ); |
| 196 | { | 185 | unsigned char *endp = tp + NS_IN6ADDRSZ; |
| 197 | val <<= 4; | 186 | unsigned char *colonp = NULL; |
| 198 | val |= (pch - xdigits); | 187 | const char *curtok = src; |
| 199 | if (val > 0xffff) | 188 | int saw_xdigit = 0; |
| 200 | return (0); | 189 | unsigned int val = 0; |
| 201 | saw_xdigit = 1; | 190 | int ch; |
| 202 | continue; | 191 | while ((ch = c_tolower (*src++)) != '\0') |
| 203 | } | 192 | { |
| 204 | if (ch == ':') | 193 | const char *pch = strchr (xdigits, ch); |
| 205 | { | 194 | if (pch != NULL) |
| 206 | curtok = src; | 195 | { |
| 207 | if (!saw_xdigit) | 196 | val <<= 4; |
| 208 | { | 197 | val |= (pch - xdigits); |
| 209 | if (colonp) | 198 | if (val > 0xffff) |
| 210 | return (0); | ||
| 211 | colonp = tp; | ||
| 212 | continue; | ||
| 213 | } | ||
| 214 | else if (*src == '\0') | ||
| 215 | { | ||
| 216 | return (0); | 199 | return (0); |
| 217 | } | 200 | saw_xdigit = 1; |
| 218 | if (tp + NS_INT16SZ > endp) | 201 | } |
| 219 | return (0); | 202 | else if (ch == ':') |
| 220 | *tp++ = (unsigned char) (val >> 8) & 0xff; | 203 | { |
| 221 | *tp++ = (unsigned char) val & 0xff; | 204 | curtok = src; |
| 222 | saw_xdigit = 0; | 205 | if (!saw_xdigit) |
| 223 | val = 0; | 206 | { |
| 224 | continue; | 207 | if (colonp) |
| 225 | } | 208 | return (0); |
| 226 | if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && | 209 | colonp = tp; |
| 227 | inet_pton4 (curtok, tp) > 0) | 210 | } |
| 228 | { | 211 | else if (*src == '\0') |
| 229 | tp += NS_INADDRSZ; | 212 | return (0); |
| 230 | saw_xdigit = 0; | 213 | else if (tp + NS_INT16SZ > endp) |
| 231 | break; /* '\0' was seen by inet_pton4(). */ | 214 | return (0); |
| 232 | } | 215 | else |
| 216 | { | ||
| 217 | *tp++ = (unsigned char) (val >> 8) & 0xff; | ||
| 218 | *tp++ = (unsigned char) val & 0xff; | ||
| 219 | saw_xdigit = 0; | ||
| 220 | val = 0; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | else if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && | ||
| 224 | inet_pton4 (curtok, tp) > 0) | ||
| 225 | { | ||
| 226 | tp += NS_INADDRSZ; | ||
| 227 | saw_xdigit = 0; | ||
| 228 | break; /* '\0' was seen by inet_pton4(). */ | ||
| 229 | } | ||
| 230 | else | ||
| 231 | return (0); | ||
| 232 | } | ||
| 233 | if (saw_xdigit) | ||
| 234 | { | ||
| 235 | if (tp + NS_INT16SZ > endp) | ||
| 236 | return (0); | ||
| 237 | *tp++ = (unsigned char) (val >> 8) & 0xff; | ||
| 238 | *tp++ = (unsigned char) val & 0xff; | ||
| 239 | } | ||
| 240 | if (colonp != NULL) | ||
| 241 | { | ||
| 242 | if (tp == endp) | ||
| 243 | return (0); | ||
| 244 | /* | ||
| 245 | * Since some memmove()'s erroneously fail to handle | ||
| 246 | * overlapping regions, we'll do the shift by hand. | ||
| 247 | */ | ||
| 248 | const int n = tp - colonp; | ||
| 249 | for (int i = 1; i <= n; i++) | ||
| 250 | { | ||
| 251 | endp[-i] = colonp[n - i]; | ||
| 252 | colonp[n - i] = 0; | ||
| 253 | } | ||
| 254 | tp = endp; | ||
| 255 | } | ||
| 256 | if (tp != endp) | ||
| 233 | return (0); | 257 | return (0); |
| 234 | } | 258 | } |
| 235 | if (saw_xdigit) | ||
| 236 | { | ||
| 237 | if (tp + NS_INT16SZ > endp) | ||
| 238 | return (0); | ||
| 239 | *tp++ = (unsigned char) (val >> 8) & 0xff; | ||
| 240 | *tp++ = (unsigned char) val & 0xff; | ||
| 241 | } | ||
| 242 | if (colonp != NULL) | ||
| 243 | { | ||
| 244 | /* | ||
| 245 | * Since some memmove()'s erroneously fail to handle | ||
| 246 | * overlapping regions, we'll do the shift by hand. | ||
| 247 | */ | ||
| 248 | const int n = tp - colonp; | ||
| 249 | int i; | ||
| 250 | |||
| 251 | if (tp == endp) | ||
| 252 | return (0); | ||
| 253 | for (i = 1; i <= n; i++) | ||
| 254 | { | ||
| 255 | endp[-i] = colonp[n - i]; | ||
| 256 | colonp[n - i] = 0; | ||
| 257 | } | ||
| 258 | tp = endp; | ||
| 259 | } | ||
| 260 | if (tp != endp) | ||
| 261 | return (0); | ||
| 262 | memcpy (dst, tmp, NS_IN6ADDRSZ); | 259 | memcpy (dst, tmp, NS_IN6ADDRSZ); |
| 263 | return (1); | 260 | return (1); |
| 264 | } | 261 | } |
diff --git a/gl/intprops-internal.h b/gl/intprops-internal.h index 7ace0cdd..0df385b9 100644 --- a/gl/intprops-internal.h +++ b/gl/intprops-internal.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* intprops-internal.h -- properties of integer types not visible to users | 1 | /* intprops-internal.h -- properties of integer types not visible to users |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU Lesser General Public License as published | 6 | under the terms of the GNU Lesser General Public License as published |
| @@ -29,10 +29,6 @@ | |||
| 29 | Do not evaluate E. */ | 29 | Do not evaluate E. */ |
| 30 | #define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) | 30 | #define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) |
| 31 | 31 | ||
| 32 | /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see | ||
| 33 | <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */ | ||
| 34 | #define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v)) | ||
| 35 | |||
| 36 | /* The extra casts in the following macros work around compiler bugs, | 32 | /* The extra casts in the following macros work around compiler bugs, |
| 37 | e.g., in Cray C 5.0.3.0. */ | 33 | e.g., in Cray C 5.0.3.0. */ |
| 38 | 34 | ||
| @@ -41,7 +37,7 @@ | |||
| 41 | 37 | ||
| 42 | /* Return 1 if the real expression E, after promotion, has a | 38 | /* Return 1 if the real expression E, after promotion, has a |
| 43 | signed or floating type. Do not evaluate E. */ | 39 | signed or floating type. Do not evaluate E. */ |
| 44 | #define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) | 40 | #define _GL_EXPR_SIGNED(e) (_GL_INT_CONVERT (e, -1) < 0) |
| 45 | 41 | ||
| 46 | 42 | ||
| 47 | /* Minimum and maximum values for integer types and expressions. */ | 43 | /* Minimum and maximum values for integer types and expressions. */ |
| @@ -60,7 +56,7 @@ | |||
| 60 | #define _GL_INT_MAXIMUM(e) \ | 56 | #define _GL_INT_MAXIMUM(e) \ |
| 61 | (_GL_EXPR_SIGNED (e) \ | 57 | (_GL_EXPR_SIGNED (e) \ |
| 62 | ? _GL_SIGNED_INT_MAXIMUM (e) \ | 58 | ? _GL_SIGNED_INT_MAXIMUM (e) \ |
| 63 | : _GL_INT_NEGATE_CONVERT (e, 1)) | 59 | : _GL_INT_CONVERT (e, -1)) |
| 64 | #define _GL_SIGNED_INT_MAXIMUM(e) \ | 60 | #define _GL_SIGNED_INT_MAXIMUM(e) \ |
| 65 | (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1) | 61 | (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1) |
| 66 | 62 | ||
| @@ -112,7 +108,7 @@ | |||
| 112 | #elif defined __has_builtin | 108 | #elif defined __has_builtin |
| 113 | # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) | 109 | # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) |
| 114 | /* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, | 110 | /* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, |
| 115 | see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */ | 111 | see <https://gcc.gnu.org/PR98269>. */ |
| 116 | #elif 7 <= __GNUC__ | 112 | #elif 7 <= __GNUC__ |
| 117 | # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 | 113 | # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 |
| 118 | #else | 114 | #else |
| @@ -184,7 +180,7 @@ | |||
| 184 | #endif | 180 | #endif |
| 185 | 181 | ||
| 186 | /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25764. See: | 182 | /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25764. See: |
| 187 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 | 183 | https://gcc.gnu.org/PR68193 |
| 188 | https://github.com/llvm/llvm-project/issues/25764 | 184 | https://github.com/llvm/llvm-project/issues/25764 |
| 189 | For now, assume GCC < 14 and all Clang versions generate bogus | 185 | For now, assume GCC < 14 and all Clang versions generate bogus |
| 190 | warnings for _Generic. This matters only for compilers that | 186 | warnings for _Generic. This matters only for compilers that |
diff --git a/gl/intprops.h b/gl/intprops.h index 2f9fa0a0..924b6f9a 100644 --- a/gl/intprops.h +++ b/gl/intprops.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* intprops.h -- properties of integer types | 1 | /* intprops.h -- properties of integer types |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU Lesser General Public License as published | 6 | under the terms of the GNU Lesser General Public License as published |
| @@ -205,11 +205,11 @@ | |||
| 205 | || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) | 205 | || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) |
| 206 | #endif | 206 | #endif |
| 207 | #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ | 207 | #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ |
| 208 | ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ | 208 | ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \ |
| 209 | : (a) < 0 ? (b) <= (a) + (b) - 1 \ | 209 | : (a) < 0 ? (b) <= (a) + (b) - 1 \ |
| 210 | : (b) < 0 && (a) + (b) <= (a)) | 210 | : (b) < 0 && (a) + (b) <= (a)) |
| 211 | #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ | 211 | #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ |
| 212 | ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ | 212 | ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \ |
| 213 | : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ | 213 | : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ |
| 214 | : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) | 214 | : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) |
| 215 | 215 | ||
diff --git a/gl/inttypes.in.h b/gl/inttypes.in.h index 5520ebc5..cbe5a6f0 100644 --- a/gl/inttypes.in.h +++ b/gl/inttypes.in.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2006-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 2 | Written by Paul Eggert, Bruno Haible, Derek Price. | 2 | Written by Paul Eggert, Bruno Haible, Derek Price. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | 4 | ||
| @@ -925,7 +925,6 @@ _GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); | |||
| 925 | _GL_CXXALIASWARN (imaxabs); | 925 | _GL_CXXALIASWARN (imaxabs); |
| 926 | # endif | 926 | # endif |
| 927 | #elif defined GNULIB_POSIXCHECK | 927 | #elif defined GNULIB_POSIXCHECK |
| 928 | # undef imaxabs | ||
| 929 | # if HAVE_RAW_DECL_IMAXABS | 928 | # if HAVE_RAW_DECL_IMAXABS |
| 930 | _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " | 929 | _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " |
| 931 | "use gnulib module imaxabs for portability"); | 930 | "use gnulib module imaxabs for portability"); |
| @@ -956,7 +955,6 @@ _GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); | |||
| 956 | _GL_CXXALIASWARN (imaxdiv); | 955 | _GL_CXXALIASWARN (imaxdiv); |
| 957 | # endif | 956 | # endif |
| 958 | #elif defined GNULIB_POSIXCHECK | 957 | #elif defined GNULIB_POSIXCHECK |
| 959 | # undef imaxdiv | ||
| 960 | # if HAVE_RAW_DECL_IMAXDIV | 958 | # if HAVE_RAW_DECL_IMAXDIV |
| 961 | _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " | 959 | _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " |
| 962 | "use gnulib module imaxdiv for portability"); | 960 | "use gnulib module imaxdiv for portability"); |
| @@ -986,7 +984,6 @@ _GL_CXXALIAS_SYS (strtoimax, intmax_t, | |||
| 986 | # endif | 984 | # endif |
| 987 | _GL_CXXALIASWARN (strtoimax); | 985 | _GL_CXXALIASWARN (strtoimax); |
| 988 | #elif defined GNULIB_POSIXCHECK | 986 | #elif defined GNULIB_POSIXCHECK |
| 989 | # undef strtoimax | ||
| 990 | # if HAVE_RAW_DECL_STRTOIMAX | 987 | # if HAVE_RAW_DECL_STRTOIMAX |
| 991 | _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " | 988 | _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " |
| 992 | "use gnulib module strtoimax for portability"); | 989 | "use gnulib module strtoimax for portability"); |
| @@ -1016,7 +1013,6 @@ _GL_CXXALIAS_SYS (strtoumax, uintmax_t, | |||
| 1016 | # endif | 1013 | # endif |
| 1017 | _GL_CXXALIASWARN (strtoumax); | 1014 | _GL_CXXALIASWARN (strtoumax); |
| 1018 | #elif defined GNULIB_POSIXCHECK | 1015 | #elif defined GNULIB_POSIXCHECK |
| 1019 | # undef strtoumax | ||
| 1020 | # if HAVE_RAW_DECL_STRTOUMAX | 1016 | # if HAVE_RAW_DECL_STRTOUMAX |
| 1021 | _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " | 1017 | _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " |
| 1022 | "use gnulib module strtoumax for portability"); | 1018 | "use gnulib module strtoumax for portability"); |
diff --git a/gl/iswblank.c b/gl/iswblank.c index 6e361f43..c09f33bd 100644 --- a/gl/iswblank.c +++ b/gl/iswblank.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test wide character for being blank. | 1 | /* Test wide character for being blank. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/iswctype-impl.h b/gl/iswctype-impl.h index c87e00ff..34d84b19 100644 --- a/gl/iswctype-impl.h +++ b/gl/iswctype-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test whether a wide character has a given property. | 1 | /* Test whether a wide character has a given property. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/iswctype.c b/gl/iswctype.c index 576e93e4..97a60032 100644 --- a/gl/iswctype.c +++ b/gl/iswctype.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test whether a wide character has a given property. | 1 | /* Test whether a wide character has a given property. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/iswdigit.c b/gl/iswdigit.c index 6bba487b..65616822 100644 --- a/gl/iswdigit.c +++ b/gl/iswdigit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test wide character for being a digit. | 1 | /* Test wide character for being a digit. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/iswpunct.c b/gl/iswpunct.c index 2b9258a9..5308ddae 100644 --- a/gl/iswpunct.c +++ b/gl/iswpunct.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test wide character for being a punctuation or symbol character. | 1 | /* Test wide character for being a punctuation or symbol character. |
| 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/iswxdigit.c b/gl/iswxdigit.c index e154ac80..7db2f676 100644 --- a/gl/iswxdigit.c +++ b/gl/iswxdigit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test wide character for being a hexadecimal digit. | 1 | /* Test wide character for being a hexadecimal digit. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Replacement for 'int' to 'long double' conversion routine. | 1 | /* Replacement for 'int' to 'long double' conversion routine. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/langinfo.in.h b/gl/langinfo.in.h index e16c95b3..4b3f9b5b 100644 --- a/gl/langinfo.in.h +++ b/gl/langinfo.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for and wrapper around <langinfo.h>. | 1 | /* Substitute for and wrapper around <langinfo.h>. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -162,11 +162,6 @@ typedef int nl_item; | |||
| 162 | # define GNULIB_defined_CODESET 1 | 162 | # define GNULIB_defined_CODESET 1 |
| 163 | # endif | 163 | # endif |
| 164 | 164 | ||
| 165 | # if !@HAVE_LANGINFO_T_FMT_AMPM@ | ||
| 166 | # define T_FMT_AMPM 10006 | ||
| 167 | # define GNULIB_defined_T_FMT_AMPM 1 | ||
| 168 | # endif | ||
| 169 | |||
| 170 | # if !@HAVE_LANGINFO_ALTMON@ | 165 | # if !@HAVE_LANGINFO_ALTMON@ |
| 171 | # define ALTMON_1 10200 | 166 | # define ALTMON_1 10200 |
| 172 | # define ALTMON_2 (ALTMON_1 + 1) | 167 | # define ALTMON_2 (ALTMON_1 + 1) |
| @@ -223,12 +218,6 @@ typedef int nl_item; | |||
| 223 | # define GNULIB_defined_ERA 1 | 218 | # define GNULIB_defined_ERA 1 |
| 224 | # endif | 219 | # endif |
| 225 | 220 | ||
| 226 | # if !@HAVE_LANGINFO_YESEXPR@ | ||
| 227 | # define YESEXPR 10053 | ||
| 228 | # define NOEXPR 10054 | ||
| 229 | # define GNULIB_defined_YESEXPR 1 | ||
| 230 | # endif | ||
| 231 | |||
| 232 | #endif | 221 | #endif |
| 233 | 222 | ||
| 234 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 223 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| @@ -260,7 +249,6 @@ _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); | |||
| 260 | _GL_CXXALIASWARN (nl_langinfo); | 249 | _GL_CXXALIASWARN (nl_langinfo); |
| 261 | # endif | 250 | # endif |
| 262 | #elif defined GNULIB_POSIXCHECK | 251 | #elif defined GNULIB_POSIXCHECK |
| 263 | # undef nl_langinfo | ||
| 264 | # if HAVE_RAW_DECL_NL_LANGINFO | 252 | # if HAVE_RAW_DECL_NL_LANGINFO |
| 265 | _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " | 253 | _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " |
| 266 | "use gnulib module nl_langinfo for portability"); | 254 | "use gnulib module nl_langinfo for portability"); |
diff --git a/gl/lc-charset-dispatch.c b/gl/lc-charset-dispatch.c index 91ab6d72..53a9b2cd 100644 --- a/gl/lc-charset-dispatch.c +++ b/gl/lc-charset-dispatch.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Dispatching based on the current locale's character encoding. | 1 | /* Dispatching based on the current locale's character encoding. |
| 2 | Copyright (C) 2018-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/lc-charset-dispatch.h b/gl/lc-charset-dispatch.h index 554137b6..665da408 100644 --- a/gl/lc-charset-dispatch.h +++ b/gl/lc-charset-dispatch.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Dispatching based on the current locale's character encoding. | 1 | /* Dispatching based on the current locale's character encoding. |
| 2 | Copyright (C) 2018-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2018-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/libc-config.h b/gl/libc-config.h index 33da9cf1..e5102aa9 100644 --- a/gl/libc-config.h +++ b/gl/libc-config.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* System definitions for code taken from the GNU C Library | 1 | /* System definitions for code taken from the GNU C Library |
| 2 | 2 | ||
| 3 | Copyright 2017-2025 Free Software Foundation, Inc. | 3 | Copyright 2017-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
diff --git a/gl/limits.in.h b/gl/limits.in.h index c33c59e1..66bd63ee 100644 --- a/gl/limits.in.h +++ b/gl/limits.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <limits.h>. | 1 | /* A GNU-like <limits.h>. |
| 2 | 2 | ||
| 3 | Copyright 2016-2025 Free Software Foundation, Inc. | 3 | Copyright 2016-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -47,7 +47,7 @@ | |||
| 47 | #ifndef LLONG_MIN | 47 | #ifndef LLONG_MIN |
| 48 | # if defined LONG_LONG_MIN /* HP-UX 11.31 */ | 48 | # if defined LONG_LONG_MIN /* HP-UX 11.31 */ |
| 49 | # define LLONG_MIN LONG_LONG_MIN | 49 | # define LLONG_MIN LONG_LONG_MIN |
| 50 | # elif defined LONGLONG_MIN /* IRIX 6.5 */ | 50 | # elif defined LONGLONG_MIN /* AIX, BeOS */ |
| 51 | # define LLONG_MIN LONGLONG_MIN | 51 | # define LLONG_MIN LONGLONG_MIN |
| 52 | # elif defined __GNUC__ | 52 | # elif defined __GNUC__ |
| 53 | # define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) | 53 | # define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) |
| @@ -56,7 +56,7 @@ | |||
| 56 | #ifndef LLONG_MAX | 56 | #ifndef LLONG_MAX |
| 57 | # if defined LONG_LONG_MAX /* HP-UX 11.31 */ | 57 | # if defined LONG_LONG_MAX /* HP-UX 11.31 */ |
| 58 | # define LLONG_MAX LONG_LONG_MAX | 58 | # define LLONG_MAX LONG_LONG_MAX |
| 59 | # elif defined LONGLONG_MAX /* IRIX 6.5 */ | 59 | # elif defined LONGLONG_MAX /* AIX, BeOS */ |
| 60 | # define LLONG_MAX LONGLONG_MAX | 60 | # define LLONG_MAX LONGLONG_MAX |
| 61 | # elif defined __GNUC__ | 61 | # elif defined __GNUC__ |
| 62 | # define LLONG_MAX __LONG_LONG_MAX__ | 62 | # define LLONG_MAX __LONG_LONG_MAX__ |
| @@ -65,7 +65,7 @@ | |||
| 65 | #ifndef ULLONG_MAX | 65 | #ifndef ULLONG_MAX |
| 66 | # if defined ULONG_LONG_MAX /* HP-UX 11.31 */ | 66 | # if defined ULONG_LONG_MAX /* HP-UX 11.31 */ |
| 67 | # define ULLONG_MAX ULONG_LONG_MAX | 67 | # define ULLONG_MAX ULONG_LONG_MAX |
| 68 | # elif defined ULONGLONG_MAX /* IRIX 6.5 */ | 68 | # elif defined ULONGLONG_MAX /* AIX, BeOS */ |
| 69 | # define ULLONG_MAX ULONGLONG_MAX | 69 | # define ULLONG_MAX ULONGLONG_MAX |
| 70 | # elif defined __GNUC__ | 70 | # elif defined __GNUC__ |
| 71 | # define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) | 71 | # define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) |
diff --git a/gl/localcharset.c b/gl/localcharset.c index 32f6f78e..22dc38d3 100644 --- a/gl/localcharset.c +++ b/gl/localcharset.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Determine a canonical name for the current locale's character encoding. | 1 | /* Determine a canonical name for the current locale's character encoding. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2000-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -279,45 +279,6 @@ static const struct table_entry alias_table[] = | |||
| 279 | { "utf8", "UTF-8" } | 279 | { "utf8", "UTF-8" } |
| 280 | # define alias_table_defined | 280 | # define alias_table_defined |
| 281 | # endif | 281 | # endif |
| 282 | # if defined __sgi /* IRIX */ | ||
| 283 | { "ISO8859-1", "ISO-8859-1" }, | ||
| 284 | { "ISO8859-15", "ISO-8859-15" }, | ||
| 285 | { "ISO8859-2", "ISO-8859-2" }, | ||
| 286 | { "ISO8859-5", "ISO-8859-5" }, | ||
| 287 | { "ISO8859-7", "ISO-8859-7" }, | ||
| 288 | { "ISO8859-9", "ISO-8859-9" }, | ||
| 289 | { "eucCN", "GB2312" }, | ||
| 290 | { "eucJP", "EUC-JP" }, | ||
| 291 | { "eucKR", "EUC-KR" }, | ||
| 292 | { "eucTW", "EUC-TW" } | ||
| 293 | # define alias_table_defined | ||
| 294 | # endif | ||
| 295 | # if defined __osf__ /* OSF/1 */ | ||
| 296 | /*{ "GBK", "GBK" },*/ | ||
| 297 | { "ISO8859-1", "ISO-8859-1" }, | ||
| 298 | { "ISO8859-15", "ISO-8859-15" }, | ||
| 299 | { "ISO8859-2", "ISO-8859-2" }, | ||
| 300 | { "ISO8859-4", "ISO-8859-4" }, | ||
| 301 | { "ISO8859-5", "ISO-8859-5" }, | ||
| 302 | { "ISO8859-7", "ISO-8859-7" }, | ||
| 303 | { "ISO8859-8", "ISO-8859-8" }, | ||
| 304 | { "ISO8859-9", "ISO-8859-9" }, | ||
| 305 | { "KSC5601", "CP949" }, | ||
| 306 | { "SJIS", "SHIFT_JIS" }, | ||
| 307 | { "TACTIS", "TIS-620" }, | ||
| 308 | /*{ "UTF-8", "UTF-8" },*/ | ||
| 309 | { "big5", "BIG5" }, | ||
| 310 | { "cp850", "CP850" }, | ||
| 311 | { "dechanyu", "DEC-HANYU" }, | ||
| 312 | { "dechanzi", "GB2312" }, | ||
| 313 | { "deckanji", "DEC-KANJI" }, | ||
| 314 | { "deckorean", "EUC-KR" }, | ||
| 315 | { "eucJP", "EUC-JP" }, | ||
| 316 | { "eucKR", "EUC-KR" }, | ||
| 317 | { "eucTW", "EUC-TW" }, | ||
| 318 | { "sdeckanji", "EUC-JP" } | ||
| 319 | # define alias_table_defined | ||
| 320 | # endif | ||
| 321 | # if defined __sun /* Solaris */ | 282 | # if defined __sun /* Solaris */ |
| 322 | { "5601", "EUC-KR" }, | 283 | { "5601", "EUC-KR" }, |
| 323 | { "646", "ASCII" }, | 284 | { "646", "ASCII" }, |
| @@ -850,12 +811,11 @@ locale_charset (void) | |||
| 850 | /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always | 811 | /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always |
| 851 | returns "US-ASCII". Return the suffix of the locale name from the | 812 | returns "US-ASCII". Return the suffix of the locale name from the |
| 852 | environment variables (if present) or the codepage as a number. */ | 813 | environment variables (if present) or the codepage as a number. */ |
| 853 | if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) | 814 | if (codeset != NULL && streq (codeset, "US-ASCII")) |
| 854 | { | 815 | { |
| 855 | const char *locale; | ||
| 856 | static char resultbuf[2 + 10 + 1]; | 816 | static char resultbuf[2 + 10 + 1]; |
| 857 | 817 | ||
| 858 | locale = getenv ("LC_ALL"); | 818 | const char *locale = getenv ("LC_ALL"); |
| 859 | if (locale == NULL || locale[0] == '\0') | 819 | if (locale == NULL || locale[0] == '\0') |
| 860 | { | 820 | { |
| 861 | locale = getenv ("LC_CTYPE"); | 821 | locale = getenv ("LC_CTYPE"); |
| @@ -941,8 +901,7 @@ locale_charset (void) | |||
| 941 | /* For a locale name such as "French_France.65001", in Windows 10, | 901 | /* For a locale name such as "French_France.65001", in Windows 10, |
| 942 | setlocale now returns "French_France.utf8" instead, or in the UTF-8 | 902 | setlocale now returns "French_France.utf8" instead, or in the UTF-8 |
| 943 | environment (with modern system settings) "fr_FR.UTF-8". */ | 903 | environment (with modern system settings) "fr_FR.UTF-8". */ |
| 944 | if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0 | 904 | if (streq (buf + 2, "65001") || streq (buf + 2, "utf8") || streq (buf + 2, "UTF-8")) |
| 945 | || strcmp (buf + 2, "UTF-8") == 0) | ||
| 946 | codeset = "UTF-8"; | 905 | codeset = "UTF-8"; |
| 947 | else | 906 | else |
| 948 | { | 907 | { |
| @@ -952,16 +911,13 @@ locale_charset (void) | |||
| 952 | 911 | ||
| 953 | # elif defined OS2 | 912 | # elif defined OS2 |
| 954 | 913 | ||
| 955 | const char *locale; | ||
| 956 | static char resultbuf[2 + 10 + 1]; | 914 | static char resultbuf[2 + 10 + 1]; |
| 957 | ULONG cp[3]; | ||
| 958 | ULONG cplen; | ||
| 959 | 915 | ||
| 960 | codeset = NULL; | 916 | codeset = NULL; |
| 961 | 917 | ||
| 962 | /* Allow user to override the codeset, as set in the operating system, | 918 | /* Allow user to override the codeset, as set in the operating system, |
| 963 | with standard language environment variables. */ | 919 | with standard language environment variables. */ |
| 964 | locale = getenv ("LC_ALL"); | 920 | const char *locale = getenv ("LC_ALL"); |
| 965 | if (locale == NULL || locale[0] == '\0') | 921 | if (locale == NULL || locale[0] == '\0') |
| 966 | { | 922 | { |
| 967 | locale = getenv ("LC_CTYPE"); | 923 | locale = getenv ("LC_CTYPE"); |
| @@ -992,12 +948,15 @@ locale_charset (void) | |||
| 992 | } | 948 | } |
| 993 | 949 | ||
| 994 | /* For the POSIX locale, don't use the system's codepage. */ | 950 | /* For the POSIX locale, don't use the system's codepage. */ |
| 995 | if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0) | 951 | if (streq (locale, "C") || streq (locale, "POSIX")) |
| 996 | codeset = ""; | 952 | codeset = ""; |
| 997 | } | 953 | } |
| 998 | 954 | ||
| 999 | if (codeset == NULL) | 955 | if (codeset == NULL) |
| 1000 | { | 956 | { |
| 957 | ULONG cp[3]; | ||
| 958 | ULONG cplen; | ||
| 959 | |||
| 1001 | /* OS/2 has a function returning the locale's codepage as a number. */ | 960 | /* OS/2 has a function returning the locale's codepage as a number. */ |
| 1002 | if (DosQueryCp (sizeof (cp), cp, &cplen)) | 961 | if (DosQueryCp (sizeof (cp), cp, &cplen)) |
| 1003 | codeset = ""; | 962 | codeset = ""; |
| @@ -1024,7 +983,7 @@ locale_charset (void) | |||
| 1024 | Speed up the common case and slow down the less common cases by | 983 | Speed up the common case and slow down the less common cases by |
| 1025 | testing for this case first. */ | 984 | testing for this case first. */ |
| 1026 | # if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__ | 985 | # if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__ |
| 1027 | if (strcmp (codeset, "UTF-8") == 0) | 986 | if (streq (codeset, "UTF-8")) |
| 1028 | goto done_table_lookup; | 987 | goto done_table_lookup; |
| 1029 | else | 988 | else |
| 1030 | # endif | 989 | # endif |
| @@ -1153,7 +1112,7 @@ locale_charset (void) | |||
| 1153 | #ifdef DARWIN7 | 1112 | #ifdef DARWIN7 |
| 1154 | /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" | 1113 | /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" |
| 1155 | (the default codeset) does not work when MB_CUR_MAX is 1. */ | 1114 | (the default codeset) does not work when MB_CUR_MAX is 1. */ |
| 1156 | if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) | 1115 | if (streq (codeset, "UTF-8") && MB_CUR_MAX_L (uselocale (NULL)) <= 1) |
| 1157 | codeset = "ASCII"; | 1116 | codeset = "ASCII"; |
| 1158 | #endif | 1117 | #endif |
| 1159 | 1118 | ||
diff --git a/gl/localcharset.h b/gl/localcharset.h index 25e6d099..59f748d7 100644 --- a/gl/localcharset.h +++ b/gl/localcharset.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Determine a canonical name for the current locale's character encoding. | 1 | /* Determine a canonical name for the current locale's character encoding. |
| 2 | Copyright (C) 2000-2003, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2003, 2009-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU CHARSET Library. | 3 | This file is part of the GNU CHARSET Library. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -48,24 +48,24 @@ extern const char * locale_charset (void); | |||
| 48 | (darwin = Mac OS X, windows = native Windows) | 48 | (darwin = Mac OS X, windows = native Windows) |
| 49 | 49 | ||
| 50 | ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin | 50 | ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin |
| 51 | ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos | 51 | ISO-8859-1 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos |
| 52 | ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos | 52 | ISO-8859-2 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos |
| 53 | ISO-8859-3 Y glibc solaris cygwin | 53 | ISO-8859-3 Y glibc solaris cygwin |
| 54 | ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin | 54 | ISO-8859-4 Y hpux solaris freebsd netbsd openbsd darwin |
| 55 | ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos | 55 | ISO-8859-5 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos |
| 56 | ISO-8859-6 Y glibc aix hpux solaris cygwin | 56 | ISO-8859-6 Y glibc aix hpux solaris cygwin |
| 57 | ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos | 57 | ISO-8859-7 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos |
| 58 | ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos | 58 | ISO-8859-8 Y glibc aix hpux solaris cygwin zos |
| 59 | ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos | 59 | ISO-8859-9 Y glibc aix hpux solaris freebsd darwin cygwin zos |
| 60 | ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin | 60 | ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin |
| 61 | ISO-8859-14 glibc cygwin | 61 | ISO-8859-14 glibc cygwin |
| 62 | ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin | 62 | ISO-8859-15 glibc aix solaris freebsd netbsd openbsd darwin cygwin |
| 63 | KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin | 63 | KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin |
| 64 | KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin | 64 | KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin |
| 65 | KOI8-T glibc | 65 | KOI8-T glibc |
| 66 | CP437 dos | 66 | CP437 dos |
| 67 | CP775 dos | 67 | CP775 dos |
| 68 | CP850 aix osf dos | 68 | CP850 aix dos |
| 69 | CP852 dos | 69 | CP852 dos |
| 70 | CP855 dos | 70 | CP855 dos |
| 71 | CP856 aix | 71 | CP856 aix |
| @@ -80,7 +80,7 @@ extern const char * locale_charset (void); | |||
| 80 | CP922 aix | 80 | CP922 aix |
| 81 | CP932 aix cygwin windows dos | 81 | CP932 aix cygwin windows dos |
| 82 | CP943 aix zos | 82 | CP943 aix zos |
| 83 | CP949 osf darwin windows dos | 83 | CP949 darwin windows dos |
| 84 | CP950 windows dos | 84 | CP950 windows dos |
| 85 | CP1046 aix | 85 | CP1046 aix |
| 86 | CP1124 aix | 86 | CP1124 aix |
| @@ -95,17 +95,17 @@ extern const char * locale_charset (void); | |||
| 95 | CP1255 glibc windows | 95 | CP1255 glibc windows |
| 96 | CP1256 windows | 96 | CP1256 windows |
| 97 | CP1257 windows | 97 | CP1257 windows |
| 98 | GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos | 98 | GB2312 Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos |
| 99 | EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin | 99 | EUC-JP Y glibc aix hpux solaris freebsd netbsd darwin cygwin |
| 100 | EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos | 100 | EUC-KR Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos |
| 101 | EUC-TW glibc aix hpux irix osf solaris netbsd | 101 | EUC-TW glibc aix hpux solaris netbsd |
| 102 | BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos | 102 | BIG5 Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos |
| 103 | BIG5-HKSCS glibc hpux solaris netbsd darwin | 103 | BIG5-HKSCS glibc hpux solaris netbsd darwin |
| 104 | GBK glibc aix osf solaris freebsd darwin cygwin windows dos | 104 | GBK glibc aix solaris freebsd darwin cygwin windows dos |
| 105 | GB18030 glibc hpux solaris freebsd netbsd darwin | 105 | GB18030 glibc hpux solaris freebsd netbsd darwin |
| 106 | SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin | 106 | SHIFT_JIS Y hpux solaris freebsd netbsd darwin |
| 107 | JOHAB solaris windows | 107 | JOHAB solaris windows |
| 108 | TIS-620 glibc aix hpux osf solaris cygwin zos | 108 | TIS-620 glibc aix hpux solaris cygwin zos |
| 109 | ARMSCII-8 glibc freebsd netbsd darwin | 109 | ARMSCII-8 glibc freebsd netbsd darwin |
| 110 | GEORGIAN-PS glibc cygwin | 110 | GEORGIAN-PS glibc cygwin |
| 111 | PT154 glibc netbsd cygwin | 111 | PT154 glibc netbsd cygwin |
| @@ -115,9 +115,9 @@ extern const char * locale_charset (void); | |||
| 115 | HP-HEBREW8 hpux | 115 | HP-HEBREW8 hpux |
| 116 | HP-TURKISH8 hpux | 116 | HP-TURKISH8 hpux |
| 117 | HP-KANA8 hpux | 117 | HP-KANA8 hpux |
| 118 | DEC-KANJI osf | 118 | DEC-KANJI vms |
| 119 | DEC-HANYU osf | 119 | DEC-HANYU vms |
| 120 | UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos | 120 | UTF-8 Y glibc aix hpux solaris netbsd darwin cygwin zos |
| 121 | 121 | ||
| 122 | Note: Names which are not marked as being a MIME name should not be used in | 122 | Note: Names which are not marked as being a MIME name should not be used in |
| 123 | Internet protocols for information interchange (mail, news, etc.). | 123 | Internet protocols for information interchange (mail, news, etc.). |
diff --git a/gl/locale.in.h b/gl/locale.in.h index 34f8c5b6..c264493e 100644 --- a/gl/locale.in.h +++ b/gl/locale.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A POSIX <locale.h>. | 1 | /* A POSIX <locale.h>. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -264,7 +264,6 @@ _GL_CXXALIASWARN (localeconv); | |||
| 264 | # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv | 264 | # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv |
| 265 | # endif | 265 | # endif |
| 266 | #elif defined GNULIB_POSIXCHECK | 266 | #elif defined GNULIB_POSIXCHECK |
| 267 | # undef localeconv | ||
| 268 | # if HAVE_RAW_DECL_LOCALECONV | 267 | # if HAVE_RAW_DECL_LOCALECONV |
| 269 | _GL_WARN_ON_USE (localeconv, | 268 | _GL_WARN_ON_USE (localeconv, |
| 270 | "localeconv returns too few information on some platforms - " | 269 | "localeconv returns too few information on some platforms - " |
| @@ -288,7 +287,6 @@ _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); | |||
| 288 | _GL_CXXALIASWARN (setlocale); | 287 | _GL_CXXALIASWARN (setlocale); |
| 289 | # endif | 288 | # endif |
| 290 | #elif defined GNULIB_POSIXCHECK | 289 | #elif defined GNULIB_POSIXCHECK |
| 291 | # undef setlocale | ||
| 292 | # if HAVE_RAW_DECL_SETLOCALE | 290 | # if HAVE_RAW_DECL_SETLOCALE |
| 293 | _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " | 291 | _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " |
| 294 | "use gnulib module setlocale for portability"); | 292 | "use gnulib module setlocale for portability"); |
| @@ -325,7 +323,6 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, | |||
| 325 | _GL_CXXALIASWARN (newlocale); | 323 | _GL_CXXALIASWARN (newlocale); |
| 326 | # endif | 324 | # endif |
| 327 | #elif defined GNULIB_POSIXCHECK | 325 | #elif defined GNULIB_POSIXCHECK |
| 328 | # undef newlocale | ||
| 329 | # if HAVE_RAW_DECL_NEWLOCALE | 326 | # if HAVE_RAW_DECL_NEWLOCALE |
| 330 | _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); | 327 | _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); |
| 331 | # endif | 328 | # endif |
| @@ -350,7 +347,6 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); | |||
| 350 | _GL_CXXALIASWARN (duplocale); | 347 | _GL_CXXALIASWARN (duplocale); |
| 351 | # endif | 348 | # endif |
| 352 | #elif defined GNULIB_POSIXCHECK | 349 | #elif defined GNULIB_POSIXCHECK |
| 353 | # undef duplocale | ||
| 354 | # if HAVE_RAW_DECL_DUPLOCALE | 350 | # if HAVE_RAW_DECL_DUPLOCALE |
| 355 | _GL_WARN_ON_USE (duplocale, "duplocale is unportable and buggy on some glibc systems - " | 351 | _GL_WARN_ON_USE (duplocale, "duplocale is unportable and buggy on some glibc systems - " |
| 356 | "use gnulib module duplocale for portability"); | 352 | "use gnulib module duplocale for portability"); |
| @@ -378,7 +374,6 @@ _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); | |||
| 378 | _GL_CXXALIASWARN (freelocale); | 374 | _GL_CXXALIASWARN (freelocale); |
| 379 | # endif | 375 | # endif |
| 380 | #elif defined GNULIB_POSIXCHECK | 376 | #elif defined GNULIB_POSIXCHECK |
| 381 | # undef freelocale | ||
| 382 | # if HAVE_RAW_DECL_FREELOCALE | 377 | # if HAVE_RAW_DECL_FREELOCALE |
| 383 | _GL_WARN_ON_USE (freelocale, "freelocale is not portable"); | 378 | _GL_WARN_ON_USE (freelocale, "freelocale is not portable"); |
| 384 | # endif | 379 | # endif |
| @@ -408,7 +403,6 @@ _GL_CXXALIAS_SYS (getlocalename_l, const char *, | |||
| 408 | _GL_CXXALIASWARN (getlocalename_l); | 403 | _GL_CXXALIASWARN (getlocalename_l); |
| 409 | # endif | 404 | # endif |
| 410 | #elif defined GNULIB_POSIXCHECK | 405 | #elif defined GNULIB_POSIXCHECK |
| 411 | # undef getlocalename_l | ||
| 412 | # if HAVE_RAW_DECL_GETLOCALENAME_L | 406 | # if HAVE_RAW_DECL_GETLOCALENAME_L |
| 413 | _GL_WARN_ON_USE (getlocalename_l, "getlocalename_l is not portable"); | 407 | _GL_WARN_ON_USE (getlocalename_l, "getlocalename_l is not portable"); |
| 414 | # endif | 408 | # endif |
diff --git a/gl/localeconv.c b/gl/localeconv.c index a6bbdced..bf6271ee 100644 --- a/gl/localeconv.c +++ b/gl/localeconv.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Query locale dependent information for formatting numbers. | 1 | /* Query locale dependent information for formatting numbers. |
| 2 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* An lseek() function that detects pipes. | 1 | /* An lseek() function that detects pipes. |
| 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Work around a bug of lstat on some systems | 1 | /* Work around a bug of lstat on some systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1997-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1997-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -42,14 +42,7 @@ orig_lstat (const char *filename, struct stat *buf) | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | /* Specification. */ | 44 | /* Specification. */ |
| 45 | # ifdef __osf__ | 45 | # include <sys/stat.h> |
| 46 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | ||
| 47 | eliminates this include because of the preliminary #include <sys/stat.h> | ||
| 48 | above. */ | ||
| 49 | # include "sys/stat.h" | ||
| 50 | # else | ||
| 51 | # include <sys/stat.h> | ||
| 52 | # endif | ||
| 53 | 46 | ||
| 54 | # include "stat-time.h" | 47 | # include "stat-time.h" |
| 55 | 48 | ||
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 index 2b205b35..a4b32403 100644 --- a/gl/m4/00gnulib.m4 +++ b/gl/m4/00gnulib.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # 00gnulib.m4 | 1 | # 00gnulib.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/__inline.m4 b/gl/m4/__inline.m4 index d1b8257b..4dedc0d4 100644 --- a/gl/m4/__inline.m4 +++ b/gl/m4/__inline.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # __inline.m4 | 1 | # __inline.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright 2017-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2017-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 index 5501b07b..94ecc510 100644 --- a/gl/m4/absolute-header.m4 +++ b/gl/m4/absolute-header.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # absolute-header.m4 | 1 | # absolute-header.m4 |
| 2 | # serial 18 | 2 | # serial 18 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/af_alg.m4 b/gl/m4/af_alg.m4 index 38575b6d..e4ff9a3d 100644 --- a/gl/m4/af_alg.m4 +++ b/gl/m4/af_alg.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # af_alg.m4 | 1 | # af_alg.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright 2018-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2018-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4 index 68fc6211..ff0c59dd 100644 --- a/gl/m4/alloca.m4 +++ b/gl/m4/alloca.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # alloca.m4 | 1 | # alloca.m4 |
| 2 | # serial 21 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2002-2004, 2006-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2002-2004, 2006-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 index 5dae6f72..63634c30 100644 --- a/gl/m4/arpa_inet_h.m4 +++ b/gl/m4/arpa_inet_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # arpa_inet_h.m4 | 1 | # arpa_inet_h.m4 |
| 2 | # serial 18 | 2 | # serial 18 |
| 3 | dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/assert_h.m4 b/gl/m4/assert_h.m4 index e77524ca..d9433ef7 100644 --- a/gl/m4/assert_h.m4 +++ b/gl/m4/assert_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # assert_h.m4 | 1 | # assert_h.m4 |
| 2 | # serial 5 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -56,8 +56,6 @@ AC_DEFUN([gl_ASSERT_H], | |||
| 56 | dnl The seemingly redundant parentheses are necessary for MSVC 14. | 56 | dnl The seemingly redundant parentheses are necessary for MSVC 14. |
| 57 | dnl #undef assert so that programs are not tempted to use it without | 57 | dnl #undef assert so that programs are not tempted to use it without |
| 58 | dnl specifically including assert.h. | 58 | dnl specifically including assert.h. |
| 59 | dnl #undef __ASSERT_H__ so that on IRIX, when programs later include | ||
| 60 | dnl <assert.h>, this include actually defines assert. | ||
| 61 | dnl Break the #undef_s apart with a comment so that 'configure' does | 59 | dnl Break the #undef_s apart with a comment so that 'configure' does |
| 62 | dnl not comment them out. | 60 | dnl not comment them out. |
| 63 | AH_VERBATIM([zzstatic_assert], | 61 | AH_VERBATIM([zzstatic_assert], |
| @@ -78,9 +76,6 @@ AC_DEFUN([gl_ASSERT_H], | |||
| 78 | && __GNUG__ < 6 && __clang_major__ < 6))) | 76 | && __GNUG__ < 6 && __clang_major__ < 6))) |
| 79 | #include <assert.h> | 77 | #include <assert.h> |
| 80 | #undef/**/assert | 78 | #undef/**/assert |
| 81 | #ifdef __sgi | ||
| 82 | #undef/**/__ASSERT_H__ | ||
| 83 | #endif | ||
| 84 | /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments. | 79 | /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments. |
| 85 | We need it also to be invocable with a single argument. | 80 | We need it also to be invocable with a single argument. |
| 86 | Haiku 2022 <assert.h> does not define static_assert at all. */ | 81 | Haiku 2022 <assert.h> does not define static_assert at all. */ |
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4 index 785d31c0..40beb50b 100644 --- a/gl/m4/base64.m4 +++ b/gl/m4/base64.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # base64.m4 | 1 | # base64.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2004, 2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004, 2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4 index 59d52be6..93c9d769 100644 --- a/gl/m4/btowc.m4 +++ b/gl/m4/btowc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # btowc.m4 | 1 | # btowc.m4 |
| 2 | # serial 15 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_BTOWC], | |||
| 13 | 13 | ||
| 14 | dnl Check whether <wchar.h> is usable at all, first. Otherwise the test | 14 | dnl Check whether <wchar.h> is usable at all, first. Otherwise the test |
| 15 | dnl program below may lead to an endless loop. See | 15 | dnl program below may lead to an endless loop. See |
| 16 | dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. | 16 | dnl <https://gcc.gnu.org/PR42440>. |
| 17 | AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) | 17 | AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) |
| 18 | 18 | ||
| 19 | AC_CHECK_FUNCS_ONCE([btowc]) | 19 | AC_CHECK_FUNCS_ONCE([btowc]) |
| @@ -54,43 +54,6 @@ changequote([,])dnl | |||
| 54 | ]) | 54 | ]) |
| 55 | ]) | 55 | ]) |
| 56 | 56 | ||
| 57 | dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. | ||
| 58 | AC_CACHE_CHECK([whether btowc(EOF) is correct], | ||
| 59 | [gl_cv_func_btowc_eof], | ||
| 60 | [ | ||
| 61 | dnl Initial guess, used when cross-compiling or when no suitable locale | ||
| 62 | dnl is present. | ||
| 63 | changequote(,)dnl | ||
| 64 | case "$host_os" in | ||
| 65 | # Guess no on IRIX. | ||
| 66 | irix*) gl_cv_func_btowc_eof="guessing no" ;; | ||
| 67 | # Guess yes on native Windows. | ||
| 68 | mingw* | windows*) gl_cv_func_btowc_eof="guessing yes" ;; | ||
| 69 | # Guess yes otherwise. | ||
| 70 | *) gl_cv_func_btowc_eof="guessing yes" ;; | ||
| 71 | esac | ||
| 72 | changequote([,])dnl | ||
| 73 | if test $LOCALE_FR != none; then | ||
| 74 | AC_RUN_IFELSE( | ||
| 75 | [AC_LANG_SOURCE([[ | ||
| 76 | #include <locale.h> | ||
| 77 | #include <stdio.h> | ||
| 78 | #include <wchar.h> | ||
| 79 | int main () | ||
| 80 | { | ||
| 81 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | ||
| 82 | { | ||
| 83 | if (btowc (EOF) != WEOF) | ||
| 84 | return 1; | ||
| 85 | } | ||
| 86 | return 0; | ||
| 87 | }]])], | ||
| 88 | [gl_cv_func_btowc_eof=yes], | ||
| 89 | [gl_cv_func_btowc_eof=no], | ||
| 90 | [:]) | ||
| 91 | fi | ||
| 92 | ]) | ||
| 93 | |||
| 94 | dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc: | 57 | dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc: |
| 95 | dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and | 58 | dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and |
| 96 | dnl ___lc_codepage_func() is 0, but btowc is lacking this special case. | 59 | dnl ___lc_codepage_func() is 0, but btowc is lacking this special case. |
| @@ -146,10 +109,6 @@ int main () | |||
| 146 | *yes) ;; | 109 | *yes) ;; |
| 147 | *) REPLACE_BTOWC=1 ;; | 110 | *) REPLACE_BTOWC=1 ;; |
| 148 | esac | 111 | esac |
| 149 | case "$gl_cv_func_btowc_eof" in | ||
| 150 | *yes) ;; | ||
| 151 | *) REPLACE_BTOWC=1 ;; | ||
| 152 | esac | ||
| 153 | case "$gl_cv_func_btowc_consistent" in | 112 | case "$gl_cv_func_btowc_consistent" in |
| 154 | *yes) ;; | 113 | *yes) ;; |
| 155 | *) REPLACE_BTOWC=1 ;; | 114 | *) REPLACE_BTOWC=1 ;; |
diff --git a/gl/m4/build-to-host.m4 b/gl/m4/build-to-host.m4 index 01bff8f3..d3b93ce1 100644 --- a/gl/m4/build-to-host.m4 +++ b/gl/m4/build-to-host.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # build-to-host.m4 | 1 | # build-to-host.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4 index 76d32867..cf96977e 100644 --- a/gl/m4/builtin-expect.m4 +++ b/gl/m4/builtin-expect.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # builtin-expect.m4 | 1 | # builtin-expect.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright 2016-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2016-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4 index b53cb4d0..a0287062 100644 --- a/gl/m4/byteswap.m4 +++ b/gl/m4/byteswap.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # byteswap.m4 | 1 | # byteswap.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/c-bool.m4 b/gl/m4/c-bool.m4 index 8fa8bfc8..f04041a4 100644 --- a/gl/m4/c-bool.m4 +++ b/gl/m4/c-bool.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # c-bool.m4 | 1 | # c-bool.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright 2022-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2022-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/c32rtomb.m4 b/gl/m4/c32rtomb.m4 index ce26a31e..b7a0d44c 100644 --- a/gl/m4/c32rtomb.m4 +++ b/gl/m4/c32rtomb.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # c32rtomb.m4 | 1 | # c32rtomb.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4 index ac7d08d4..2ed64332 100644 --- a/gl/m4/calloc.m4 +++ b/gl/m4/calloc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # calloc.m4 | 1 | # calloc.m4 |
| 2 | # serial 36 | 2 | # serial 36 |
| 3 | dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4 index 314e321e..9b498643 100644 --- a/gl/m4/close.m4 +++ b/gl/m4/close.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # close.m4 | 1 | # close.m4 |
| 2 | # serial 10 | 2 | # serial 10 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4 index 6bed9dee..4ab542f4 100644 --- a/gl/m4/codeset.m4 +++ b/gl/m4/codeset.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # codeset.m4 | 1 | # codeset.m4 |
| 2 | # serial 5 (gettext-0.18.2) | 2 | # serial 5 (gettext-0.18.2) |
| 3 | dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free Software | 3 | dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2026 Free Software |
| 4 | dnl Foundation, Inc. | 4 | dnl Foundation, Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 index 5c40b73c..957adca6 100644 --- a/gl/m4/double-slash-root.m4 +++ b/gl/m4/double-slash-root.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # double-slash-root.m4 | 1 | # double-slash-root.m4 |
| 2 | # serial 4 -*- Autoconf -*- | 2 | # serial 4 -*- Autoconf -*- |
| 3 | dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4 index 5da3a0b9..e1d51898 100644 --- a/gl/m4/dup2.m4 +++ b/gl/m4/dup2.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # dup2.m4 | 1 | # dup2.m4 |
| 2 | # serial 28 | 2 | # serial 28 |
| 3 | dnl Copyright (C) 2002, 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002, 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4 index e0690e54..5c0644ab 100644 --- a/gl/m4/environ.m4 +++ b/gl/m4/environ.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # environ.m4 | 1 | # environ.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 index 420d5bb3..ade19b6f 100644 --- a/gl/m4/errno_h.m4 +++ b/gl/m4/errno_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # errno_h.m4 | 1 | # errno_h.m4 |
| 2 | # serial 18 | 2 | # serial 19 |
| 3 | dnl Copyright (C) 2004, 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -83,59 +83,4 @@ booboo | |||
| 83 | gl_NEXT_HEADERS([errno.h]) | 83 | gl_NEXT_HEADERS([errno.h]) |
| 84 | GL_GENERATE_ERRNO_H=true | 84 | GL_GENERATE_ERRNO_H=true |
| 85 | fi | 85 | fi |
| 86 | gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) | ||
| 87 | gl_REPLACE_ERRNO_VALUE([ENOLINK]) | ||
| 88 | gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) | ||
| 89 | ]) | ||
| 90 | |||
| 91 | # Assuming $1 = EOVERFLOW. | ||
| 92 | # The EOVERFLOW errno value ought to be defined in <errno.h>, according to | ||
| 93 | # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and | ||
| 94 | # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. | ||
| 95 | # Check for the value of EOVERFLOW. | ||
| 96 | # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. | ||
| 97 | AC_DEFUN([gl_REPLACE_ERRNO_VALUE], | ||
| 98 | [ | ||
| 99 | if $GL_GENERATE_ERRNO_H; then | ||
| 100 | AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ | ||
| 101 | AC_EGREP_CPP([yes],[ | ||
| 102 | #include <errno.h> | ||
| 103 | #ifdef ]$1[ | ||
| 104 | yes | ||
| 105 | #endif | ||
| 106 | ], | ||
| 107 | [gl_cv_header_errno_h_]$1[=yes], | ||
| 108 | [gl_cv_header_errno_h_]$1[=no]) | ||
| 109 | if test $gl_cv_header_errno_h_]$1[ = no; then | ||
| 110 | AC_EGREP_CPP([yes],[ | ||
| 111 | #define _XOPEN_SOURCE_EXTENDED 1 | ||
| 112 | #include <errno.h> | ||
| 113 | #ifdef ]$1[ | ||
| 114 | yes | ||
| 115 | #endif | ||
| 116 | ], [gl_cv_header_errno_h_]$1[=hidden]) | ||
| 117 | if test $gl_cv_header_errno_h_]$1[ = hidden; then | ||
| 118 | dnl The macro exists but is hidden. | ||
| 119 | dnl Define it to the same value. | ||
| 120 | AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ | ||
| 121 | #define _XOPEN_SOURCE_EXTENDED 1 | ||
| 122 | #include <errno.h> | ||
| 123 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | ||
| 124 | #include <stdio.h> | ||
| 125 | #include <stdlib.h> | ||
| 126 | ]) | ||
| 127 | fi | ||
| 128 | fi | ||
| 129 | ]) | ||
| 130 | case $gl_cv_header_errno_h_]$1[ in | ||
| 131 | yes | no) | ||
| 132 | ]$1[_HIDDEN=0; ]$1[_VALUE= | ||
| 133 | ;; | ||
| 134 | *) | ||
| 135 | ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" | ||
| 136 | ;; | ||
| 137 | esac | ||
| 138 | AC_SUBST($1[_HIDDEN]) | ||
| 139 | AC_SUBST($1[_VALUE]) | ||
| 140 | fi | ||
| 141 | ]) | 86 | ]) |
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4 index 1572250a..f14b9ceb 100644 --- a/gl/m4/error.m4 +++ b/gl/m4/error.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # error.m4 | 1 | # error.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 1996-1998, 2001-2004, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 1996-1998, 2001-2004, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/error_h.m4 b/gl/m4/error_h.m4 index 4ef5cbff..73e96943 100644 --- a/gl/m4/error_h.m4 +++ b/gl/m4/error_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # error_h.m4 | 1 | # error_h.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 1996-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1996-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4 index 08e93397..bff98570 100644 --- a/gl/m4/exponentd.m4 +++ b/gl/m4/exponentd.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # exponentd.m4 | 1 | # exponentd.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2007-2008, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2008, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/extensions-aix.m4 b/gl/m4/extensions-aix.m4 index 08b703b4..9036d7bb 100644 --- a/gl/m4/extensions-aix.m4 +++ b/gl/m4/extensions-aix.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # extensions-aix.m4 | 1 | # extensions-aix.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 index 76516bce..01a8e5f9 100644 --- a/gl/m4/extensions.m4 +++ b/gl/m4/extensions.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # extensions.m4 | 1 | # extensions.m4 |
| 2 | # serial 25 -*- Autoconf -*- | 2 | # serial 25 -*- Autoconf -*- |
| 3 | dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 index d4fe6d82..4ccc4a95 100644 --- a/gl/m4/extern-inline.m4 +++ b/gl/m4/extern-inline.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # extern-inline.m4 | 1 | # extern-inline.m4 |
| 2 | # serial 1 | 2 | # serial 2 |
| 3 | dnl Copyright 2012-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2012-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -43,9 +43,11 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 43 | functions or macros in standard C headers like <ctype.h>. For example, | 43 | functions or macros in standard C headers like <ctype.h>. For example, |
| 44 | if isdigit is mistakenly implemented via a static inline function, | 44 | if isdigit is mistakenly implemented via a static inline function, |
| 45 | a program containing an extern inline function that calls isdigit | 45 | a program containing an extern inline function that calls isdigit |
| 46 | may not work since the C standard prohibits extern inline functions | 46 | may not work since C99 through C23 prohibit extern inline functions |
| 47 | from calling static functions (ISO C 99 section 6.7.4.(3). | 47 | from calling static functions (ISO C 23 § 6.7.5 ¶ 3)). |
| 48 | This bug is known to occur on: | 48 | Although a future C standard will likely relax this restriction |
| 49 | <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3622.txt>, | ||
| 50 | respect it for now. This bug is known to occur on: | ||
| 49 | 51 | ||
| 50 | OS X 10.8 and earlier; see: | 52 | OS X 10.8 and earlier; see: |
| 51 | https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html | 53 | https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html |
| @@ -112,8 +114,8 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 112 | suppress bogus "no previous prototype for 'FOO'" | 114 | suppress bogus "no previous prototype for 'FOO'" |
| 113 | and "no previous declaration for 'FOO'" diagnostics, | 115 | and "no previous declaration for 'FOO'" diagnostics, |
| 114 | when FOO is an inline function in the header; see | 116 | when FOO is an inline function in the header; see |
| 115 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and | 117 | <https://gcc.gnu.org/PR54113> and |
| 116 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */ | 118 | <https://gcc.gnu.org/PR63877>. */ |
| 117 | #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ | 119 | #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ |
| 118 | # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ | 120 | # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ |
| 119 | # define _GL_INLINE_HEADER_CONST_PRAGMA | 121 | # define _GL_INLINE_HEADER_CONST_PRAGMA |
diff --git a/gl/m4/fclose.m4 b/gl/m4/fclose.m4 index cfb92e28..65eb7705 100644 --- a/gl/m4/fclose.m4 +++ b/gl/m4/fclose.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fclose.m4 | 1 | # fclose.m4 |
| 2 | # serial 12 | 2 | # serial 12 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 index 8020c481..a94fc557 100644 --- a/gl/m4/fcntl-o.m4 +++ b/gl/m4/fcntl-o.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fcntl-o.m4 | 1 | # fcntl-o.m4 |
| 2 | # serial 12 | 2 | # serial 12 |
| 3 | dnl Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4 index 08ab936f..69ac76f9 100644 --- a/gl/m4/fcntl.m4 +++ b/gl/m4/fcntl.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fcntl.m4 | 1 | # fcntl.m4 |
| 2 | # serial 12 | 2 | # serial 12 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4 index 1c9f9cce..946a0bd6 100644 --- a/gl/m4/fcntl_h.m4 +++ b/gl/m4/fcntl_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fcntl_h.m4 | 1 | # fcntl_h.m4 |
| 2 | # serial 20 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2006-2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -26,7 +26,7 @@ AC_DEFUN_ONCE([gl_FCNTL_H], | |||
| 26 | dnl corresponding gnulib module is not in use, if it is not common | 26 | dnl corresponding gnulib module is not in use, if it is not common |
| 27 | dnl enough to be declared everywhere. | 27 | dnl enough to be declared everywhere. |
| 28 | gl_WARN_ON_USE_PREPARE([[#include <fcntl.h> | 28 | gl_WARN_ON_USE_PREPARE([[#include <fcntl.h> |
| 29 | ]], [fcntl openat]) | 29 | ]], [fcntl openat openat2]) |
| 30 | ]) | 30 | ]) |
| 31 | 31 | ||
| 32 | # gl_FCNTL_MODULE_INDICATOR([modulename]) | 32 | # gl_FCNTL_MODULE_INDICATOR([modulename]) |
| @@ -53,6 +53,7 @@ AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS], | |||
| 53 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING]) | 53 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING]) |
| 54 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN]) | 54 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN]) |
| 55 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT]) | 55 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT]) |
| 56 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT2]) | ||
| 56 | dnl Support Microsoft deprecated alias function names by default. | 57 | dnl Support Microsoft deprecated alias function names by default. |
| 57 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1]) | 58 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1]) |
| 58 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1]) | 59 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1]) |
| @@ -66,6 +67,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS], | |||
| 66 | dnl Assume proper GNU behavior unless another module says otherwise. | 67 | dnl Assume proper GNU behavior unless another module says otherwise. |
| 67 | HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) | 68 | HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) |
| 68 | HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) | 69 | HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) |
| 70 | HAVE_OPENAT2=0; AC_SUBST([HAVE_OPENAT2]) | ||
| 69 | REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT]) | 71 | REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT]) |
| 70 | REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) | 72 | REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) |
| 71 | REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) | 73 | REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) |
diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4 index 399065b6..c5913b23 100644 --- a/gl/m4/fflush.m4 +++ b/gl/m4/fflush.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fflush.m4 | 1 | # fflush.m4 |
| 2 | # serial 20 | 2 | # serial 20 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 index 8580c9c9..c0ee7f8f 100644 --- a/gl/m4/float_h.m4 +++ b/gl/m4/float_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # float_h.m4 | 1 | # float_h.m4 |
| 2 | # serial 15 | 2 | # serial 17 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -13,7 +13,7 @@ AC_DEFUN([gl_FLOAT_H], | |||
| 13 | GL_GENERATE_FLOAT_H=false | 13 | GL_GENERATE_FLOAT_H=false |
| 14 | REPLACE_FLOAT_LDBL=0 | 14 | REPLACE_FLOAT_LDBL=0 |
| 15 | case "$host_os" in | 15 | case "$host_os" in |
| 16 | aix* | beos* | openbsd* | mirbsd* | irix*) | 16 | aix* | beos* | openbsd* | mirbsd*) |
| 17 | GL_GENERATE_FLOAT_H=true | 17 | GL_GENERATE_FLOAT_H=true |
| 18 | ;; | 18 | ;; |
| 19 | freebsd* | dragonfly*) | 19 | freebsd* | dragonfly*) |
| @@ -63,6 +63,7 @@ changequote([,])dnl | |||
| 63 | [AC_LANG_PROGRAM( | 63 | [AC_LANG_PROGRAM( |
| 64 | [[#include <float.h> | 64 | [[#include <float.h> |
| 65 | int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG }; | 65 | int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG }; |
| 66 | int y[] = { FLT_IS_IEC_60559, DBL_IS_IEC_60559, LDBL_IS_IEC_60559 }; | ||
| 66 | float maxf = FLT_NORM_MAX; | 67 | float maxf = FLT_NORM_MAX; |
| 67 | double maxd = DBL_NORM_MAX; | 68 | double maxd = DBL_NORM_MAX; |
| 68 | long double maxl = LDBL_NORM_MAX; | 69 | long double maxl = LDBL_NORM_MAX; |
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4 index cb75fce9..731f0b0a 100644 --- a/gl/m4/floorf.m4 +++ b/gl/m4/floorf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # floorf.m4 | 1 | # floorf.m4 |
| 2 | # serial 21 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4 index e27b3270..07779a16 100644 --- a/gl/m4/fopen.m4 +++ b/gl/m4/fopen.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fopen.m4 | 1 | # fopen.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4 index 408a2579..a7cf67dc 100644 --- a/gl/m4/fpurge.m4 +++ b/gl/m4/fpurge.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fpurge.m4 | 1 | # fpurge.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/freading.m4 b/gl/m4/freading.m4 index 373d2bff..b5b54f40 100644 --- a/gl/m4/freading.m4 +++ b/gl/m4/freading.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # freading.m4 | 1 | # freading.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/free.m4 b/gl/m4/free.m4 index 485d8243..c7a134ba 100644 --- a/gl/m4/free.m4 +++ b/gl/m4/free.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # free.m4 | 1 | # free.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2003-2005, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003-2005, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -14,10 +14,10 @@ AC_DEFUN([gl_FUNC_FREE], | |||
| 14 | 14 | ||
| 15 | dnl In the next release of POSIX, free must preserve errno. | 15 | dnl In the next release of POSIX, free must preserve errno. |
| 16 | dnl https://www.austingroupbugs.net/view.php?id=385 | 16 | dnl https://www.austingroupbugs.net/view.php?id=385 |
| 17 | dnl https://sourceware.org/bugzilla/show_bug.cgi?id=17924 | 17 | dnl https://sourceware.org/PR17924 |
| 18 | dnl So far, we know of three platforms that do this: | 18 | dnl So far, we know of three platforms that do this: |
| 19 | dnl * glibc >= 2.33, thanks to the fix for this bug: | 19 | dnl * glibc >= 2.33, thanks to the fix for this bug: |
| 20 | dnl <https://sourceware.org/bugzilla/show_bug.cgi?id=17924> | 20 | dnl <https://sourceware.org/PR17924> |
| 21 | dnl * OpenBSD >= 4.5, thanks to this commit: | 21 | dnl * OpenBSD >= 4.5, thanks to this commit: |
| 22 | dnl <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h> | 22 | dnl <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h> |
| 23 | dnl * Solaris, because its malloc() implementation is based on brk(), | 23 | dnl * Solaris, because its malloc() implementation is based on brk(), |
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4 index ce728f60..398fd5f8 100644 --- a/gl/m4/fseek.m4 +++ b/gl/m4/fseek.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fseek.m4 | 1 | # fseek.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 index c093d399..cd81961a 100644 --- a/gl/m4/fseeko.m4 +++ b/gl/m4/fseeko.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fseeko.m4 | 1 | # fseeko.m4 |
| 2 | # serial 21 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fseterr.m4 b/gl/m4/fseterr.m4 index 3a94c288..e5ad635b 100644 --- a/gl/m4/fseterr.m4 +++ b/gl/m4/fseterr.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fseterr.m4 | 1 | # fseterr.m4 |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 index e89bbc32..7db4e346 100644 --- a/gl/m4/fstat.m4 +++ b/gl/m4/fstat.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fstat.m4 | 1 | # fstat.m4 |
| 2 | # serial 10 | 2 | # serial 10 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4 index 4407b765..64122a73 100644 --- a/gl/m4/fstypename.m4 +++ b/gl/m4/fstypename.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fstypename.m4 | 1 | # fstypename.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2025 Free Software | 3 | dnl Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2026 Free Software |
| 4 | dnl Foundation, Inc. | 4 | dnl Foundation, Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4 index bb7b6e43..db6e0e3b 100644 --- a/gl/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # fsusage.m4 | 1 | # fsusage.m4 |
| 2 | # serial 35 | 2 | # serial 37 |
| 3 | dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software Foundation, | 3 | dnl Copyright (C) 1997-1998, 2000-2001, 2003-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -48,16 +48,12 @@ AC_DEFUN([gl_FILE_SYSTEM_USAGE], | |||
| 48 | # is what it gets when this test fails. | 48 | # is what it gets when this test fails. |
| 49 | if test $ac_fsusage_space = no; then | 49 | if test $ac_fsusage_space = no; then |
| 50 | # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, | 50 | # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, |
| 51 | # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS. | 51 | # OpenBSD >= 4.4, AIX, HP-UX, Solaris, Cygwin, Interix, BeOS. |
| 52 | AC_CACHE_CHECK([for statvfs function (SVR4)], | 52 | AC_CACHE_CHECK([for statvfs function (SVR4)], |
| 53 | [fu_cv_sys_stat_statvfs], | 53 | [fu_cv_sys_stat_statvfs], |
| 54 | [AC_LINK_IFELSE( | 54 | [AC_LINK_IFELSE( |
| 55 | [AC_LANG_PROGRAM([[ | 55 | [AC_LANG_PROGRAM([[ |
| 56 | #include <sys/types.h> | 56 | #include <sys/types.h> |
| 57 | #ifdef __osf__ | ||
| 58 | "Do not use Tru64's statvfs implementation" | ||
| 59 | #endif | ||
| 60 | |||
| 61 | #include <sys/statvfs.h> | 57 | #include <sys/statvfs.h> |
| 62 | 58 | ||
| 63 | struct statvfs fsd; | 59 | struct statvfs fsd; |
| @@ -79,7 +75,7 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 79 | if test $fu_cv_sys_stat_statvfs = yes; then | 75 | if test $fu_cv_sys_stat_statvfs = yes; then |
| 80 | ac_fsusage_space=yes | 76 | ac_fsusage_space=yes |
| 81 | # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs. | 77 | # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs. |
| 82 | # glibc, HP-UX, IRIX, Solaris have statvfs64 as well, but on these systems | 78 | # glibc, HP-UX, Solaris have statvfs64 as well, but on these systems |
| 83 | # statvfs with large-file support is already equivalent to statvfs64. | 79 | # statvfs with large-file support is already equivalent to statvfs64. |
| 84 | AC_CACHE_CHECK([whether to use statvfs64], | 80 | AC_CACHE_CHECK([whether to use statvfs64], |
| 85 | [fu_cv_sys_stat_statvfs64], | 81 | [fu_cv_sys_stat_statvfs64], |
| @@ -141,37 +137,9 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 141 | fi | 137 | fi |
| 142 | 138 | ||
| 143 | if test $ac_fsusage_space = no; then | 139 | if test $ac_fsusage_space = no; then |
| 144 | # DEC Alpha running OSF/1 | ||
| 145 | AC_CACHE_CHECK([for 3-argument statfs function (DEC OSF/1)], | ||
| 146 | [fu_cv_sys_stat_statfs3_osf1], | ||
| 147 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
| 148 | #include <sys/param.h> | ||
| 149 | #include <sys/types.h> | ||
| 150 | #include <sys/mount.h> | ||
| 151 | int | ||
| 152 | main () | ||
| 153 | { | ||
| 154 | struct statfs fsd; | ||
| 155 | fsd.f_fsize = 0; | ||
| 156 | return statfs (".", &fsd, sizeof (struct statfs)) != 0; | ||
| 157 | }]])], | ||
| 158 | [fu_cv_sys_stat_statfs3_osf1=yes], | ||
| 159 | [fu_cv_sys_stat_statfs3_osf1=no], | ||
| 160 | [fu_cv_sys_stat_statfs3_osf1=no]) | ||
| 161 | ]) | ||
| 162 | if test $fu_cv_sys_stat_statfs3_osf1 = yes; then | ||
| 163 | ac_fsusage_space=yes | ||
| 164 | AC_DEFINE([STAT_STATFS3_OSF1], [1], | ||
| 165 | [Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) | ||
| 166 | fi | ||
| 167 | fi | ||
| 168 | |||
| 169 | if test $ac_fsusage_space = no; then | ||
| 170 | # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. | 140 | # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. |
| 171 | # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, | 141 | # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, |
| 172 | # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) | 142 | # OpenBSD >= 4.4, AIX, HP-UX, Cygwin already handled above.) |
| 173 | # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and | ||
| 174 | # <sys/vfs.h>.) | ||
| 175 | # (On Solaris, statfs has 4 arguments.) | 143 | # (On Solaris, statfs has 4 arguments.) |
| 176 | AC_CACHE_CHECK([for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)], | 144 | AC_CACHE_CHECK([for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)], |
| 177 | [fu_cv_sys_stat_statfs2_bsize], | 145 | [fu_cv_sys_stat_statfs2_bsize], |
| @@ -225,13 +193,12 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; | |||
| 225 | if test $fu_cv_sys_stat_statfs4 = yes; then | 193 | if test $fu_cv_sys_stat_statfs4 = yes; then |
| 226 | ac_fsusage_space=yes | 194 | ac_fsusage_space=yes |
| 227 | AC_DEFINE([STAT_STATFS4], [1], | 195 | AC_DEFINE([STAT_STATFS4], [1], |
| 228 | [Define if statfs takes 4 args. (SVR3, old Irix)]) | 196 | [Define if statfs takes 4 args. (SVR3)]) |
| 229 | fi | 197 | fi |
| 230 | fi | 198 | fi |
| 231 | 199 | ||
| 232 | if test $ac_fsusage_space = no; then | 200 | if test $ac_fsusage_space = no; then |
| 233 | # 4.4BSD and older NetBSD | 201 | # 4.4BSD and older NetBSD |
| 234 | # (OSF/1 already handled above.) | ||
| 235 | # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) | 202 | # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) |
| 236 | # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in | 203 | # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in |
| 237 | # <sys/mount.h>.) | 204 | # <sys/mount.h>.) |
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 index d5610b70..0b389f86 100644 --- a/gl/m4/ftell.m4 +++ b/gl/m4/ftell.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # ftell.m4 | 1 | # ftell.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 index 35d30f98..ae0e884f 100644 --- a/gl/m4/ftello.m4 +++ b/gl/m4/ftello.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # ftello.m4 | 1 | # ftello.m4 |
| 2 | # serial 17 | 2 | # serial 17 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4 index 2931d526..8a63600b 100644 --- a/gl/m4/getaddrinfo.m4 +++ b/gl/m4/getaddrinfo.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # getaddrinfo.m4 | 1 | # getaddrinfo.m4 |
| 2 | # serial 38 | 2 | # serial 39 |
| 3 | dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -90,7 +90,7 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add | |||
| 90 | fi | 90 | fi |
| 91 | fi | 91 | fi |
| 92 | if test $HAVE_GETADDRINFO != 0; then | 92 | if test $HAVE_GETADDRINFO != 0; then |
| 93 | AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICSERV], | 93 | AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICHOST and AI_NUMERICSERV], |
| 94 | [gl_cv_func_getaddrinfo_works], | 94 | [gl_cv_func_getaddrinfo_works], |
| 95 | [AC_RUN_IFELSE( | 95 | [AC_RUN_IFELSE( |
| 96 | [AC_LANG_PROGRAM([[ | 96 | [AC_LANG_PROGRAM([[ |
| @@ -107,16 +107,30 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add | |||
| 107 | #include <stddef.h> | 107 | #include <stddef.h> |
| 108 | #include <string.h> | 108 | #include <string.h> |
| 109 | ]], [[ | 109 | ]], [[ |
| 110 | struct addrinfo hints; | 110 | int result = 0; |
| 111 | struct addrinfo *ai; | 111 | struct addrinfo *ai; |
| 112 | memset (&hints, 0, sizeof (hints)); | 112 | { |
| 113 | hints.ai_flags = AI_NUMERICSERV; | 113 | struct addrinfo hints; |
| 114 | return getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME; | 114 | memset (&hints, 0, sizeof (hints)); |
| 115 | hints.ai_flags = AI_NUMERICHOST; | ||
| 116 | if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) | ||
| 117 | result |= 1; | ||
| 118 | } | ||
| 119 | { | ||
| 120 | struct addrinfo hints; | ||
| 121 | memset (&hints, 0, sizeof (hints)); | ||
| 122 | hints.ai_flags = AI_NUMERICSERV; | ||
| 123 | if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) | ||
| 124 | result |= 2; | ||
| 125 | } | ||
| 126 | return result; | ||
| 115 | ]]) | 127 | ]]) |
| 116 | ], | 128 | ], |
| 117 | [gl_cv_func_getaddrinfo_works=yes], | 129 | [gl_cv_func_getaddrinfo_works=yes], |
| 118 | [gl_cv_func_getaddrinfo_works=no], | 130 | [gl_cv_func_getaddrinfo_works=no], |
| 119 | [case "$host_os" in | 131 | [case "$host_os" in |
| 132 | # Guess no on Solaris. | ||
| 133 | solaris*) gl_cv_func_getaddrinfo_works="guessing no" ;; | ||
| 120 | # Guess no on native Windows. | 134 | # Guess no on native Windows. |
| 121 | mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;; | 135 | mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;; |
| 122 | # Guess yes otherwise. | 136 | # Guess yes otherwise. |
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4 index 63d88306..8b6eff47 100644 --- a/gl/m4/getdelim.m4 +++ b/gl/m4/getdelim.m4 | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # getdelim.m4 | 1 | # getdelim.m4 |
| 2 | # serial 19 | 2 | # serial 21 |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. | 4 | dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 5 | dnl | 5 | dnl |
| 6 | dnl This file is free software; the Free Software Foundation | 6 | dnl This file is free software; the Free Software Foundation |
| 7 | dnl gives unlimited permission to copy and/or distribute it, | 7 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -37,6 +37,7 @@ AC_DEFUN([gl_FUNC_GETDELIM], | |||
| 37 | gl_cv_func_working_getdelim=no ;; | 37 | gl_cv_func_working_getdelim=no ;; |
| 38 | *) | 38 | *) |
| 39 | echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data | 39 | echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data |
| 40 | touch conftest.empty | ||
| 40 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 41 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 41 | # include <stdio.h> | 42 | # include <stdio.h> |
| 42 | # include <stdlib.h> | 43 | # include <stdlib.h> |
| @@ -44,6 +45,7 @@ AC_DEFUN([gl_FUNC_GETDELIM], | |||
| 44 | int main () | 45 | int main () |
| 45 | { | 46 | { |
| 46 | FILE *in = fopen ("./conftest.data", "r"); | 47 | FILE *in = fopen ("./conftest.data", "r"); |
| 48 | int result = 0; | ||
| 47 | if (!in) | 49 | if (!in) |
| 48 | return 1; | 50 | return 1; |
| 49 | { | 51 | { |
| @@ -53,7 +55,7 @@ AC_DEFUN([gl_FUNC_GETDELIM], | |||
| 53 | size_t siz = 0; | 55 | size_t siz = 0; |
| 54 | int len = getdelim (&line, &siz, '\n', in); | 56 | int len = getdelim (&line, &siz, '\n', in); |
| 55 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) | 57 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) |
| 56 | { free (line); fclose (in); return 2; } | 58 | result |= 2; |
| 57 | free (line); | 59 | free (line); |
| 58 | } | 60 | } |
| 59 | { | 61 | { |
| @@ -62,35 +64,40 @@ AC_DEFUN([gl_FUNC_GETDELIM], | |||
| 62 | char *line = NULL; | 64 | char *line = NULL; |
| 63 | size_t siz = (size_t)(~0) / 4; | 65 | size_t siz = (size_t)(~0) / 4; |
| 64 | if (getdelim (&line, &siz, '\n', in) == -1) | 66 | if (getdelim (&line, &siz, '\n', in) == -1) |
| 65 | { fclose (in); return 3; } | 67 | result |= 4; |
| 66 | free (line); | 68 | free (line); |
| 67 | } | 69 | } |
| 68 | fclose (in); | 70 | fclose (in); |
| 69 | return 0; | 71 | { |
| 72 | /* Test that reading EOF as the first character sets the first byte | ||
| 73 | in the buffer to NUL. This fails on glibc 2.42 and earlier. */ | ||
| 74 | in = fopen ("./conftest.empty", "r"); | ||
| 75 | if (!in) | ||
| 76 | return 1; | ||
| 77 | char *line = malloc (1); | ||
| 78 | line[0] = 'A'; | ||
| 79 | size_t siz = 1; | ||
| 80 | if (getdelim (&line, &siz, '\n', in) != -1 || line[0] != '\0') | ||
| 81 | result |= 8; | ||
| 82 | free (line); | ||
| 83 | } | ||
| 84 | fclose (in); | ||
| 85 | return result; | ||
| 70 | } | 86 | } |
| 71 | ]])], | 87 | ]])], |
| 72 | [gl_cv_func_working_getdelim=yes], | 88 | [gl_cv_func_working_getdelim=yes], |
| 73 | [gl_cv_func_working_getdelim=no], | 89 | [gl_cv_func_working_getdelim=no], |
| 74 | [dnl We're cross compiling. | 90 | [case "$host_os" in |
| 75 | dnl Guess it works on glibc2 systems and musl systems. | 91 | # Guess yes on musl. |
| 76 | AC_EGREP_CPP([Lucky GNU user], | 92 | *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;; |
| 77 | [ | 93 | # Guess no on glibc. |
| 78 | #include <features.h> | 94 | *-gnu* | gnu*) gl_cv_func_working_getdelim="guessing no" ;; |
| 79 | #ifdef __GNU_LIBRARY__ | 95 | *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;; |
| 80 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ | 96 | esac |
| 81 | Lucky GNU user | ||
| 82 | #endif | ||
| 83 | #endif | ||
| 84 | ], | ||
| 85 | [gl_cv_func_working_getdelim="guessing yes"], | ||
| 86 | [case "$host_os" in | ||
| 87 | *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;; | ||
| 88 | *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;; | ||
| 89 | esac | ||
| 90 | ]) | ||
| 91 | ]) | 97 | ]) |
| 92 | ;; | 98 | ;; |
| 93 | esac | 99 | esac |
| 100 | rm -f conftest.data conftest.empty | ||
| 94 | ]) | 101 | ]) |
| 95 | case "$gl_cv_func_working_getdelim" in | 102 | case "$gl_cv_func_working_getdelim" in |
| 96 | *yes) ;; | 103 | *yes) ;; |
diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4 index 112c1c4d..0b780110 100644 --- a/gl/m4/getdtablesize.m4 +++ b/gl/m4/getdtablesize.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # getdtablesize.m4 | 1 | # getdtablesize.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4 index be71ff78..33293521 100644 --- a/gl/m4/gethostname.m4 +++ b/gl/m4/gethostname.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # gethostname.m4 | 1 | # gethostname.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2002, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 index b97b8011..ed32fa10 100644 --- a/gl/m4/getline.m4 +++ b/gl/m4/getline.m4 | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # getline.m4 | 1 | # getline.m4 |
| 2 | # serial 33 | 2 | # serial 35 |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 1998-2003, 2005-2007, 2009-2025 Free Software Foundation, | 4 | dnl Copyright (C) 1998-2003, 2005-2007, 2009-2026 Free Software Foundation, |
| 5 | dnl Inc. | 5 | dnl Inc. |
| 6 | dnl | 6 | dnl |
| 7 | dnl This file is free software; the Free Software Foundation | 7 | dnl This file is free software; the Free Software Foundation |
| @@ -31,6 +31,7 @@ AC_DEFUN([gl_FUNC_GETLINE], | |||
| 31 | AC_CACHE_CHECK([for working getline function], | 31 | AC_CACHE_CHECK([for working getline function], |
| 32 | [am_cv_func_working_getline], | 32 | [am_cv_func_working_getline], |
| 33 | [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data | 33 | [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data |
| 34 | touch conftest.empty | ||
| 34 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 35 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
| 35 | # include <stdio.h> | 36 | # include <stdio.h> |
| 36 | # include <stdlib.h> | 37 | # include <stdlib.h> |
| @@ -38,6 +39,7 @@ AC_DEFUN([gl_FUNC_GETLINE], | |||
| 38 | int main () | 39 | int main () |
| 39 | { | 40 | { |
| 40 | FILE *in = fopen ("./conftest.data", "r"); | 41 | FILE *in = fopen ("./conftest.data", "r"); |
| 42 | int result = 0; | ||
| 41 | if (!in) | 43 | if (!in) |
| 42 | return 1; | 44 | return 1; |
| 43 | { | 45 | { |
| @@ -47,7 +49,7 @@ AC_DEFUN([gl_FUNC_GETLINE], | |||
| 47 | size_t siz = 0; | 49 | size_t siz = 0; |
| 48 | int len = getline (&line, &siz, in); | 50 | int len = getline (&line, &siz, in); |
| 49 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) | 51 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) |
| 50 | { free (line); fclose (in); return 2; } | 52 | result |= 2; |
| 51 | free (line); | 53 | free (line); |
| 52 | } | 54 | } |
| 53 | { | 55 | { |
| @@ -56,33 +58,38 @@ AC_DEFUN([gl_FUNC_GETLINE], | |||
| 56 | char *line = NULL; | 58 | char *line = NULL; |
| 57 | size_t siz = (size_t)(~0) / 4; | 59 | size_t siz = (size_t)(~0) / 4; |
| 58 | if (getline (&line, &siz, in) == -1) | 60 | if (getline (&line, &siz, in) == -1) |
| 59 | { fclose (in); return 3; } | 61 | result |= 4; |
| 60 | free (line); | 62 | free (line); |
| 61 | } | 63 | } |
| 62 | fclose (in); | 64 | fclose (in); |
| 63 | return 0; | 65 | { |
| 66 | /* Test that reading EOF as the first character sets the first byte | ||
| 67 | in the buffer to NUL. This fails on glibc 2.42 and earlier. */ | ||
| 68 | in = fopen ("./conftest.empty", "r"); | ||
| 69 | if (!in) | ||
| 70 | return 1; | ||
| 71 | char *line = malloc (1); | ||
| 72 | line[0] = 'A'; | ||
| 73 | size_t siz = 1; | ||
| 74 | if (getline (&line, &siz, in) != -1 || line[0] != '\0') | ||
| 75 | result |= 8; | ||
| 76 | free (line); | ||
| 77 | } | ||
| 78 | fclose (in); | ||
| 79 | return result; | ||
| 64 | } | 80 | } |
| 65 | ]])], | 81 | ]])], |
| 66 | [am_cv_func_working_getline=yes], | 82 | [am_cv_func_working_getline=yes], |
| 67 | [am_cv_func_working_getline=no], | 83 | [am_cv_func_working_getline=no], |
| 68 | [dnl We're cross compiling. | 84 | [case "$host_os" in |
| 69 | dnl Guess it works on glibc2 systems and musl systems. | 85 | # Guess yes on musl. |
| 70 | AC_EGREP_CPP([Lucky GNU user], | 86 | *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;; |
| 71 | [ | 87 | # Guess no on glibc. |
| 72 | #include <features.h> | 88 | *-gnu* | gnu*) am_cv_func_working_getline="guessing no" ;; |
| 73 | #ifdef __GNU_LIBRARY__ | 89 | *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; |
| 74 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ | 90 | esac |
| 75 | Lucky GNU user | ||
| 76 | #endif | ||
| 77 | #endif | ||
| 78 | ], | ||
| 79 | [am_cv_func_working_getline="guessing yes"], | ||
| 80 | [case "$host_os" in | ||
| 81 | *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;; | ||
| 82 | *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; | ||
| 83 | esac | ||
| 84 | ]) | ||
| 85 | ]) | 91 | ]) |
| 92 | rm -f conftest.data conftest.empty | ||
| 86 | ]) | 93 | ]) |
| 87 | else | 94 | else |
| 88 | am_cv_func_working_getline=no | 95 | am_cv_func_working_getline=no |
diff --git a/gl/m4/getloadavg.m4 b/gl/m4/getloadavg.m4 index 8ab613db..dc226168 100644 --- a/gl/m4/getloadavg.m4 +++ b/gl/m4/getloadavg.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # getloadavg.m4 | 1 | # getloadavg.m4 |
| 2 | # serial 13 | 2 | # serial 14 |
| 3 | dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2025 Free | 3 | dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2026 Free |
| 4 | dnl Software Foundation, Inc. | 4 | dnl Software Foundation, Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -124,8 +124,7 @@ if test $gl_func_getloadavg_done = no; then | |||
| 124 | fi | 124 | fi |
| 125 | 125 | ||
| 126 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it | 126 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
| 127 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | 127 | # uses stabs), but it is still SVR4. |
| 128 | # Irix 4.0.5F has the header but not the library. | ||
| 129 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | 128 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ |
| 130 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | 129 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then |
| 131 | gl_func_getloadavg_done=yes | 130 | gl_func_getloadavg_done=yes |
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 index cb344c15..c620b2b7 100644 --- a/gl/m4/getopt.m4 +++ b/gl/m4/getopt.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # getopt.m4 | 1 | # getopt.m4 |
| 2 | # serial 50 | 2 | # serial 52 |
| 3 | dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -88,8 +88,8 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS], | |||
| 88 | dnl Merging these three different test programs into a single one | 88 | dnl Merging these three different test programs into a single one |
| 89 | dnl would require a reset mechanism. On BSD systems, it can be done | 89 | dnl would require a reset mechanism. On BSD systems, it can be done |
| 90 | dnl through 'optreset'; on some others (glibc), it can be done by | 90 | dnl through 'optreset'; on some others (glibc), it can be done by |
| 91 | dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, | 91 | dnl setting 'optind' to 0; on others again (HP-UX, Solaris 9, |
| 92 | dnl Solaris 9, musl libc), there is no such mechanism. | 92 | dnl musl libc), there is no such mechanism. |
| 93 | if test $cross_compiling = no; then | 93 | if test $cross_compiling = no; then |
| 94 | dnl Sanity check. Succeeds everywhere (except on MSVC, | 94 | dnl Sanity check. Succeeds everywhere (except on MSVC, |
| 95 | dnl which lacks <unistd.h> and getopt() entirely). | 95 | dnl which lacks <unistd.h> and getopt() entirely). |
| @@ -238,8 +238,7 @@ dnl is ambiguous with environment values that contain newlines. | |||
| 238 | nocrash_init(); | 238 | nocrash_init(); |
| 239 | 239 | ||
| 240 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, | 240 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, |
| 241 | and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | 241 | and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, Solaris 10. */ |
| 242 | OSF/1 5.1, Solaris 10. */ | ||
| 243 | { | 242 | { |
| 244 | static char conftest[] = "conftest"; | 243 | static char conftest[] = "conftest"; |
| 245 | static char plus[] = "-+"; | 244 | static char plus[] = "-+"; |
| @@ -250,7 +249,7 @@ dnl is ambiguous with environment values that contain newlines. | |||
| 250 | } | 249 | } |
| 251 | /* This code succeeds on glibc 2.8, mingw, | 250 | /* This code succeeds on glibc 2.8, mingw, |
| 252 | and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | 251 | and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, |
| 253 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | 252 | Solaris 10, Cygwin 1.5.x. */ |
| 254 | { | 253 | { |
| 255 | static char program[] = "program"; | 254 | static char program[] = "program"; |
| 256 | static char p[] = "-p"; | 255 | static char p[] = "-p"; |
diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4 index 90f34c74..d60f3efb 100644 --- a/gl/m4/getprogname.m4 +++ b/gl/m4/getprogname.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # getprogname.m4 | 1 | # getprogname.m4 |
| 2 | # serial 8 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2016-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2016-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -12,6 +12,12 @@ AC_DEFUN([gl_FUNC_GETPROGNAME], | |||
| 12 | [ | 12 | [ |
| 13 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) | 13 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
| 14 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 14 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 15 | AC_CHECK_HEADERS_ONCE([sys/process.h]) | ||
| 16 | if test $ac_cv_header_sys_process_h = yes; then | ||
| 17 | HAVE_SYS_PROCESS_H=1 | ||
| 18 | else | ||
| 19 | HAVE_SYS_PROCESS_H=0 | ||
| 20 | fi | ||
| 15 | gl_CHECK_FUNCS_ANDROID([getprogname], [[#include <stdlib.h>]]) | 21 | gl_CHECK_FUNCS_ANDROID([getprogname], [[#include <stdlib.h>]]) |
| 16 | if test $ac_cv_func_getprogname = no; then | 22 | if test $ac_cv_func_getprogname = no; then |
| 17 | HAVE_GETPROGNAME=0 | 23 | HAVE_GETPROGNAME=0 |
diff --git a/gl/m4/gettext_h.m4 b/gl/m4/gettext_h.m4 new file mode 100644 index 00000000..7ef89541 --- /dev/null +++ b/gl/m4/gettext_h.m4 | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # gettext_h.m4 | ||
| 2 | # serial 1 | ||
| 3 | dnl Copyright (C) 2025-2026 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 8 | |||
| 9 | AC_DEFUN_ONCE([gl_GETTEXT_H], | ||
| 10 | [ | ||
| 11 | AC_SUBST([LIBINTL]) | ||
| 12 | AC_SUBST([LTLIBINTL]) | ||
| 13 | AH_BOTTOM([ | ||
| 14 | /* The text domainname for Gnulib messages. Ordinarily this is "gnulib", | ||
| 15 | but packages that do their own translations of Gnulib can use something | ||
| 16 | different by defining GNULIB_TEXT_DOMAIN in their config.h file. */ | ||
| 17 | #ifndef GNULIB_TEXT_DOMAIN | ||
| 18 | # define GNULIB_TEXT_DOMAIN/**/"gnulib" | ||
| 19 | #endif | ||
| 20 | ]) | ||
| 21 | ]) | ||
diff --git a/gl/m4/gl-openssl.m4 b/gl/m4/gl-openssl.m4 index 3cfea50f..70f43a55 100644 --- a/gl/m4/gl-openssl.m4 +++ b/gl/m4/gl-openssl.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # gl-openssl.m4 | 1 | # gl-openssl.m4 |
| 2 | # serial 7 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2013-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2013-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -58,12 +58,17 @@ AC_DEFUN([gl_CRYPTO_CHECK], | |||
| 58 | fi | 58 | fi |
| 59 | if test "x$with_openssl" != xauto-gpl-compat || | 59 | if test "x$with_openssl" != xauto-gpl-compat || |
| 60 | test "x$gl_cv_openssl_gpl_compat" = xyes; then | 60 | test "x$gl_cv_openssl_gpl_compat" = xyes; then |
| 61 | AC_CHECK_LIB([crypto], [$1], | 61 | m4_if([$1], [SHA3], |
| 62 | [AC_CHECK_HEADERS( | 62 | [AC_CHECK_LIB([crypto], [EVP_sha3_224], |
| 63 | m4_if([$1], [MD5], [openssl/md5.h], [openssl/sha.h]), | ||
| 64 | [LIB_CRYPTO=-lcrypto | 63 | [LIB_CRYPTO=-lcrypto |
| 65 | AC_DEFINE([HAVE_OPENSSL_$1], [1], | 64 | AC_DEFINE([HAVE_OPENSSL_$1], [1], |
| 66 | [Define to 1 if libcrypto is used for $1.])])]) | 65 | [Define to 1 if libcrypto is used for $1.])])], |
| 66 | [AC_CHECK_LIB([crypto], [$1], | ||
| 67 | [AC_CHECK_HEADERS( | ||
| 68 | m4_if([$1], [MD5], [openssl/md5.h], [openssl/sha.h]), | ||
| 69 | [LIB_CRYPTO=-lcrypto | ||
| 70 | AC_DEFINE([HAVE_OPENSSL_$1], [1], | ||
| 71 | [Define to 1 if libcrypto is used for $1.])])])]) | ||
| 67 | fi | 72 | fi |
| 68 | if test "x$LIB_CRYPTO" = x; then | 73 | if test "x$LIB_CRYPTO" = x; then |
| 69 | message='openssl development library not found for $1. | 74 | message='openssl development library not found for $1. |
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 6a6e8593..1b964b34 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Copyright (C) 2002-2025 Free Software Foundation, Inc. | 1 | # Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 2 | # | 2 | # |
| 3 | # This file is free software; you can redistribute it and/or modify | 3 | # This file is free software; you can redistribute it and/or modify |
| 4 | # it under the terms of the GNU General Public License as published by | 4 | # it under the terms of the GNU General Public License as published by |
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 034dae69..26eef771 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # gnulib-common.m4 | 1 | # gnulib-common.m4 |
| 2 | # serial 113 | 2 | # serial 115 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -168,7 +168,7 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 168 | ====================================================================== | 168 | ====================================================================== |
| 169 | This gives a syntax error | 169 | This gives a syntax error |
| 170 | - in C mode with gcc | 170 | - in C mode with gcc |
| 171 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108796>, and | 171 | <https://gcc.gnu.org/PR108796>, and |
| 172 | - in C++ mode with clang++ version < 16, and | 172 | - in C++ mode with clang++ version < 16, and |
| 173 | - in C++ mode, inside extern "C" {}, still in newer clang++ versions | 173 | - in C++ mode, inside extern "C" {}, still in newer clang++ versions |
| 174 | <https://github.com/llvm/llvm-project/issues/101990>. | 174 | <https://github.com/llvm/llvm-project/issues/101990>. |
| @@ -414,22 +414,25 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 414 | #endif | 414 | #endif |
| 415 | 415 | ||
| 416 | /* _GL_ATTRIBUTE_CONST declares: | 416 | /* _GL_ATTRIBUTE_CONST declares: |
| 417 | It is OK for a compiler to move calls to the function and to omit | 417 | It is OK for a compiler to move a call, or omit a duplicate call |
| 418 | calls to the function if another call has the same arguments or the | 418 | and reuse a cached return value, even if the state changes between calls. |
| 419 | result is not used. | 419 | It is also OK to omit a call if the result is not used. |
| 420 | This attribute is safe for a function that neither depends on | 420 | This attribute is safe if the function does not change observable state, |
| 421 | nor affects state, and always returns exactly once - | 421 | returns a value determined solely by its arguments' values |
| 422 | without examining state, and always returns exactly once - | ||
| 422 | e.g., does not raise an exception, call longjmp, or loop forever. | 423 | e.g., does not raise an exception, call longjmp, or loop forever. |
| 423 | (This attribute is stricter than _GL_ATTRIBUTE_PURE because the | 424 | (This attribute is stricter than _GL_ATTRIBUTE_PURE because the |
| 424 | function cannot observe state. It is stricter than | 425 | function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED |
| 425 | _GL_ATTRIBUTE_UNSEQUENCED because the function must return exactly | 426 | the function must return exactly once and cannot access state |
| 426 | once and cannot depend on state addressed by its arguments.) */ | 427 | addressed by its pointer arguments or that happens to have the same |
| 428 | value for all calls to the function, but the function is allowed to | ||
| 429 | return a pointer to storage that can be modified later. */ | ||
| 427 | /* Applies to: functions. */ | 430 | /* Applies to: functions. */ |
| 428 | #ifndef _GL_ATTRIBUTE_CONST | 431 | #ifndef _GL_ATTRIBUTE_CONST |
| 429 | # if _GL_HAS_ATTRIBUTE (const) | 432 | # if _GL_HAS_ATTRIBUTE (const) |
| 430 | # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) | 433 | # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) |
| 431 | # else | 434 | # else |
| 432 | # define _GL_ATTRIBUTE_CONST _GL_ATTRIBUTE_UNSEQUENCED | 435 | # define _GL_ATTRIBUTE_CONST |
| 433 | # endif | 436 | # endif |
| 434 | #endif | 437 | #endif |
| 435 | 438 | ||
| @@ -451,7 +454,7 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 451 | yet. */ | 454 | yet. */ |
| 452 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE | 455 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 453 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ | 456 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ |
| 454 | /* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */ | 457 | /* Work around GCC bug <https://gcc.gnu.org/PR108231> */ |
| 455 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ | 458 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ |
| 456 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) | 459 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) |
| 457 | # else | 460 | # else |
| @@ -590,7 +593,9 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 590 | 593 | ||
| 591 | /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if | 594 | /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if |
| 592 | the entity is not used. The compiler should not warn if the entity is not | 595 | the entity is not used. The compiler should not warn if the entity is not |
| 593 | used. */ | 596 | used. However, 'int _GL_UNNAMED (i)' is preferable to |
| 597 | '_GL_ATTRIBUTE_MAYBE_UNUSED int i' when parameter I is unused | ||
| 598 | regardless of preprocessor macro settings. */ | ||
| 594 | /* Applies to: | 599 | /* Applies to: |
| 595 | - function, variable, | 600 | - function, variable, |
| 596 | - struct, union, struct/union member, | 601 | - struct, union, struct/union member, |
| @@ -744,39 +749,40 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 744 | #endif | 749 | #endif |
| 745 | 750 | ||
| 746 | /* _GL_ATTRIBUTE_PURE declares: | 751 | /* _GL_ATTRIBUTE_PURE declares: |
| 747 | It is OK for a compiler to move calls to the function and to omit | 752 | It is OK for a compiler to move a call, or omit a duplicate call |
| 748 | calls to the function if another call has the same arguments or the | 753 | and reuse a cached return value, if observable state is the same. |
| 749 | result is not used, and if observable state is the same. | 754 | It is also OK to omit a call if the return value is not used. |
| 750 | This attribute is safe for a function that does not affect observable state | 755 | This attribute is safe if the function does not change observable state, |
| 751 | and always returns exactly once. | 756 | returns a value determined solely by its arguments's values |
| 757 | together with observable state, and always returns exactly once. | ||
| 752 | (This attribute is looser than _GL_ATTRIBUTE_CONST because the function | 758 | (This attribute is looser than _GL_ATTRIBUTE_CONST because the function |
| 753 | can depend on observable state. It is stricter than | 759 | can depend on observable state. |
| 754 | _GL_ATTRIBUTE_REPRODUCIBLE because the function must return exactly | 760 | Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly |
| 755 | once and cannot affect state addressed by its arguments.) */ | 761 | once and cannot change state addressed by its arguments, but the |
| 762 | function can return a pointer to storage whose contents change later.) */ | ||
| 756 | /* Applies to: functions. */ | 763 | /* Applies to: functions. */ |
| 757 | #ifndef _GL_ATTRIBUTE_PURE | 764 | #ifndef _GL_ATTRIBUTE_PURE |
| 758 | # if _GL_HAS_ATTRIBUTE (pure) | 765 | # if _GL_HAS_ATTRIBUTE (pure) |
| 759 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | 766 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 760 | # else | 767 | # else |
| 761 | # define _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_REPRODUCIBLE | 768 | # define _GL_ATTRIBUTE_PURE |
| 762 | # endif | 769 | # endif |
| 763 | #endif | 770 | #endif |
| 764 | 771 | ||
| 765 | /* _GL_ATTRIBUTE_REPRODUCIBLE declares: | 772 | /* _GL_ATTRIBUTE_REPRODUCIBLE declares: |
| 766 | It is OK for a compiler to move calls to the function and to omit duplicate | 773 | It is OK for a compiler to move a call, or omit a duplicate call |
| 767 | calls to the function with the same arguments, so long as the state | 774 | and reuse a cached value returned either directly or indirectly via |
| 768 | addressed by its arguments is the same and is updated in time for | 775 | a pointer, if other observable state is the same; |
| 769 | the rest of the program. | 776 | however, pointer arguments cannot alias. |
| 770 | This attribute is safe for a function that is effectless and idempotent; see | 777 | This attribute is safe for a function that is effectless and idempotent; |
| 771 | ISO C 23 § 6.7.12.7 for a definition of these terms. | 778 | see ISO C 23 § 6.7.13.8 for a definition of these terms. |
| 772 | (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because | 779 | (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because |
| 773 | the function need not be stateless and idempotent. It is looser | 780 | the function need not be stateless or independent. |
| 774 | than _GL_ATTRIBUTE_PURE because the function need not return | 781 | Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once |
| 775 | exactly once and can affect state addressed by its arguments.) | 782 | and can change state addressed by its pointer arguments, but the |
| 783 | function cannot return a pointer to storage whose contents change later.) | ||
| 776 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and | 784 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and |
| 777 | <https://stackoverflow.com/questions/76847905/>. | 785 | <https://stackoverflow.com/questions/76847905/>. */ |
| 778 | ATTENTION! Efforts are underway to change the meaning of this attribute. | ||
| 779 | See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ | ||
| 780 | /* Applies to: functions, pointer to functions, function types. */ | 786 | /* Applies to: functions, pointer to functions, function types. */ |
| 781 | #ifndef _GL_ATTRIBUTE_REPRODUCIBLE | 787 | #ifndef _GL_ATTRIBUTE_REPRODUCIBLE |
| 782 | /* This may be revisited when gcc and clang support [[reproducible]] or possibly | 788 | /* This may be revisited when gcc and clang support [[reproducible]] or possibly |
| @@ -816,20 +822,22 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 816 | #endif | 822 | #endif |
| 817 | 823 | ||
| 818 | /* _GL_ATTRIBUTE_UNSEQUENCED declares: | 824 | /* _GL_ATTRIBUTE_UNSEQUENCED declares: |
| 819 | It is OK for a compiler to move calls to the function and to omit duplicate | 825 | It is OK for a compiler to move a call, or omit a duplicate call |
| 820 | calls to the function with the same arguments, so long as the state | 826 | and reuse a cached value returned either directly or indirectly via |
| 821 | addressed by its arguments is the same. | 827 | a pointer, if the state addressed by its pointer arguments is the same; |
| 828 | however, pointer arguments cannot alias. | ||
| 822 | This attribute is safe for a function that is effectless, idempotent, | 829 | This attribute is safe for a function that is effectless, idempotent, |
| 823 | stateless, and independent; see ISO C 23 § 6.7.12.7 for a definition of | 830 | stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of |
| 824 | these terms. | 831 | these terms. |
| 825 | (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because | 832 | (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because |
| 826 | the function must be stateless and independent. It is looser than | 833 | the function must be stateless and independent. Unlike |
| 827 | _GL_ATTRIBUTE_CONST because the function need not return exactly | 834 | _GL_ATTRIBUTE_CONST the function need not return exactly once, and |
| 828 | once and can depend on state addressed by its arguments.) | 835 | can depend on state accessed via its pointer arguments or that |
| 836 | happens to have the same value for all calls to the function, but | ||
| 837 | the function cannot return a pointer to storage whose contents | ||
| 838 | change later.) | ||
| 829 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and | 839 | See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and |
| 830 | <https://stackoverflow.com/questions/76847905/>. | 840 | <https://stackoverflow.com/questions/76847905/>. */ |
| 831 | ATTENTION! Efforts are underway to change the meaning of this attribute. | ||
| 832 | See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>. */ | ||
| 833 | /* Applies to: functions, pointer to functions, function types. */ | 841 | /* Applies to: functions, pointer to functions, function types. */ |
| 834 | #ifndef _GL_ATTRIBUTE_UNSEQUENCED | 842 | #ifndef _GL_ATTRIBUTE_UNSEQUENCED |
| 835 | /* This may be revisited when gcc and clang support [[unsequenced]] or possibly | 843 | /* This may be revisited when gcc and clang support [[unsequenced]] or possibly |
| @@ -869,6 +877,21 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 869 | # endif | 877 | # endif |
| 870 | #endif | 878 | #endif |
| 871 | 879 | ||
| 880 | /* _GL_UNNAMED (ID) is the "name" of an unnamed function parameter. | ||
| 881 | Each of the function's unnamed parameters should have a unique "name". | ||
| 882 | The "name" cannot be used. This ports both to C17 and earlier, which | ||
| 883 | lack unnamed parameters, and to C++ and later C, which have them. */ | ||
| 884 | /* Applies to: | ||
| 885 | - function parameters. */ | ||
| 886 | #ifndef _GL_UNNAMED | ||
| 887 | # if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \ | ||
| 888 | && !defined __cplusplus) | ||
| 889 | # define _GL_UNNAMED(id) unnamed_##id _GL_ATTRIBUTE_UNUSED | ||
| 890 | # else | ||
| 891 | # define _GL_UNNAMED(id) | ||
| 892 | # endif | ||
| 893 | #endif | ||
| 894 | |||
| 872 | /* The following attributes enable detection of multithread-safety problems | 895 | /* The following attributes enable detection of multithread-safety problems |
| 873 | and resource leaks at compile-time, by clang ≥ 15, when the warning option | 896 | and resource leaks at compile-time, by clang ≥ 15, when the warning option |
| 874 | -Wthread-safety is enabled. For usage, see | 897 | -Wthread-safety is enabled. For usage, see |
| @@ -1406,7 +1429,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS], | |||
| 1406 | dnl -Wno-type-limits >= 4.3 >= 3.9 | 1429 | dnl -Wno-type-limits >= 4.3 >= 3.9 |
| 1407 | dnl -Wno-undef >= 3 >= 3.9 | 1430 | dnl -Wno-undef >= 3 >= 3.9 |
| 1408 | dnl -Wno-unsuffixed-float-constants >= 4.5 | 1431 | dnl -Wno-unsuffixed-float-constants >= 4.5 |
| 1409 | dnl -Wno-unused-const-variable >= 4.4 >= 3.9 | 1432 | dnl -Wno-unused-const-variable >= 6.1 >= 3.9 |
| 1410 | dnl -Wno-unused-function >= 3 >= 3.9 | 1433 | dnl -Wno-unused-function >= 3 >= 3.9 |
| 1411 | dnl -Wno-unused-parameter >= 3 >= 3.9 | 1434 | dnl -Wno-unused-parameter >= 3 >= 3.9 |
| 1412 | dnl | 1435 | dnl |
| @@ -1436,7 +1459,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS], | |||
| 1436 | -Wno-sign-conversion | 1459 | -Wno-sign-conversion |
| 1437 | -Wno-type-limits | 1460 | -Wno-type-limits |
| 1438 | #endif | 1461 | #endif |
| 1439 | #if (__GNUC__ + (__GNUC_MINOR__ >= 4) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3) | 1462 | #if (__GNUC__ + (__GNUC_MINOR__ >= 1) > 6 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3) |
| 1440 | -Wno-unused-const-variable | 1463 | -Wno-unused-const-variable |
| 1441 | #endif | 1464 | #endif |
| 1442 | #if (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4 && !defined __clang__) | 1465 | #if (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4 && !defined __clang__) |
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 50e98454..cdd46759 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # DO NOT EDIT! GENERATED AUTOMATICALLY! | 1 | # DO NOT EDIT! GENERATED AUTOMATICALLY! |
| 2 | # Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | # Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | # | 3 | # |
| 4 | # This file is free software; you can redistribute it and/or modify | 4 | # This file is free software; you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by | 5 | # it under the terms of the GNU General Public License as published by |
| @@ -209,6 +209,7 @@ AC_DEFUN([gl_EARLY], | |||
| 209 | # Code from module stdint-h: | 209 | # Code from module stdint-h: |
| 210 | # Code from module stdio-h: | 210 | # Code from module stdio-h: |
| 211 | gl_STDIO_H_EARLY | 211 | gl_STDIO_H_EARLY |
| 212 | # Code from module stdio-windows: | ||
| 212 | # Code from module stdlib-h: | 213 | # Code from module stdlib-h: |
| 213 | # Code from module strcase: | 214 | # Code from module strcase: |
| 214 | # Code from module strcasecmp: | 215 | # Code from module strcasecmp: |
| @@ -218,6 +219,7 @@ AC_DEFUN([gl_EARLY], | |||
| 218 | # Code from module strerror: | 219 | # Code from module strerror: |
| 219 | # Code from module strerror-override: | 220 | # Code from module strerror-override: |
| 220 | # Code from module string-h: | 221 | # Code from module string-h: |
| 222 | # Code from module stringeq: | ||
| 221 | # Code from module strings-h: | 223 | # Code from module strings-h: |
| 222 | # Code from module strncasecmp: | 224 | # Code from module strncasecmp: |
| 223 | # Code from module strncpy: | 225 | # Code from module strncpy: |
| @@ -570,7 +572,8 @@ AC_DEFUN([gl_INIT], | |||
| 570 | ]) | 572 | ]) |
| 571 | gl_UNISTD_MODULE_INDICATOR([getdtablesize]) | 573 | gl_UNISTD_MODULE_INDICATOR([getdtablesize]) |
| 572 | gl_FUNC_GETHOSTNAME | 574 | gl_FUNC_GETHOSTNAME |
| 573 | gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME], [test $HAVE_GETHOSTNAME = 0]) | 575 | gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME], |
| 576 | [test $HAVE_GETHOSTNAME = 0 || test $UNISTD_H_HAVE_WINSOCK2_H = 1]) | ||
| 574 | AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [ | 577 | AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [ |
| 575 | gl_PREREQ_GETHOSTNAME | 578 | gl_PREREQ_GETHOSTNAME |
| 576 | ]) | 579 | ]) |
| @@ -614,8 +617,7 @@ AC_DEFUN([gl_INIT], | |||
| 614 | gl_PREREQ_GETPROGNAME | 617 | gl_PREREQ_GETPROGNAME |
| 615 | ]) | 618 | ]) |
| 616 | gl_STDLIB_MODULE_INDICATOR([getprogname]) | 619 | gl_STDLIB_MODULE_INDICATOR([getprogname]) |
| 617 | AC_SUBST([LIBINTL]) | 620 | gl_GETTEXT_H |
| 618 | AC_SUBST([LTLIBINTL]) | ||
| 619 | AC_PROG_MKDIR_P | 621 | AC_PROG_MKDIR_P |
| 620 | GNULIB_I18N | 622 | GNULIB_I18N |
| 621 | AC_REQUIRE([gl_FUNC_SETLOCALE_NULL]) | 623 | AC_REQUIRE([gl_FUNC_SETLOCALE_NULL]) |
| @@ -884,19 +886,6 @@ AC_DEFUN([gl_INIT], | |||
| 884 | gl_STDIO_H | 886 | gl_STDIO_H |
| 885 | gl_STDIO_H_REQUIRE_DEFAULTS | 887 | gl_STDIO_H_REQUIRE_DEFAULTS |
| 886 | AC_PROG_MKDIR_P | 888 | AC_PROG_MKDIR_P |
| 887 | USES_MSVCRT=0 | ||
| 888 | case "$host_os" in | ||
| 889 | mingw* | windows*) | ||
| 890 | AC_EGREP_CPP([Special], [ | ||
| 891 | #ifndef _UCRT | ||
| 892 | Special | ||
| 893 | #endif | ||
| 894 | ], | ||
| 895 | [USES_MSVCRT=1]) | ||
| 896 | ;; | ||
| 897 | esac | ||
| 898 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1]) | ||
| 899 | AC_CHECK_FUNCS([vasprintf]) | ||
| 900 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1]) | 889 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1]) |
| 901 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1]) | 890 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1]) |
| 902 | dnl No need to create extra modules for these functions. Everyone who uses | 891 | dnl No need to create extra modules for these functions. Everyone who uses |
| @@ -922,6 +911,20 @@ AC_DEFUN([gl_INIT], | |||
| 922 | gl_STDIO_MODULE_INDICATOR([fputs]) | 911 | gl_STDIO_MODULE_INDICATOR([fputs]) |
| 923 | gl_STDIO_MODULE_INDICATOR([puts]) | 912 | gl_STDIO_MODULE_INDICATOR([puts]) |
| 924 | gl_STDIO_MODULE_INDICATOR([fwrite]) | 913 | gl_STDIO_MODULE_INDICATOR([fwrite]) |
| 914 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 915 | USES_MSVCRT=0 | ||
| 916 | case "$host_os" in | ||
| 917 | mingw* | windows*) | ||
| 918 | AC_EGREP_CPP([Special], [ | ||
| 919 | #ifndef _UCRT | ||
| 920 | Special | ||
| 921 | #endif | ||
| 922 | ], | ||
| 923 | [USES_MSVCRT=1]) | ||
| 924 | ;; | ||
| 925 | esac | ||
| 926 | gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1]) | ||
| 927 | AC_CHECK_FUNCS([vasprintf]) | ||
| 925 | gl_STDLIB_H | 928 | gl_STDLIB_H |
| 926 | gl_STDLIB_H_REQUIRE_DEFAULTS | 929 | gl_STDLIB_H_REQUIRE_DEFAULTS |
| 927 | AC_PROG_MKDIR_P | 930 | AC_PROG_MKDIR_P |
| @@ -957,6 +960,9 @@ AC_DEFUN([gl_INIT], | |||
| 957 | gl_STRING_H | 960 | gl_STRING_H |
| 958 | gl_STRING_H_REQUIRE_DEFAULTS | 961 | gl_STRING_H_REQUIRE_DEFAULTS |
| 959 | AC_PROG_MKDIR_P | 962 | AC_PROG_MKDIR_P |
| 963 | gl_FUNC_STREQ | ||
| 964 | gl_FUNC_MEMEQ | ||
| 965 | gl_STRING_MODULE_INDICATOR([stringeq]) | ||
| 960 | gl_STRINGS_H | 966 | gl_STRINGS_H |
| 961 | gl_STRINGS_H_REQUIRE_DEFAULTS | 967 | gl_STRINGS_H_REQUIRE_DEFAULTS |
| 962 | AC_PROG_MKDIR_P | 968 | AC_PROG_MKDIR_P |
| @@ -1021,35 +1027,35 @@ AC_DEFUN([gl_INIT], | |||
| 1021 | gl_UNICASE_H | 1027 | gl_UNICASE_H |
| 1022 | gl_UNICASE_H_REQUIRE_DEFAULTS | 1028 | gl_UNICASE_H_REQUIRE_DEFAULTS |
| 1023 | AC_PROG_MKDIR_P | 1029 | AC_PROG_MKDIR_P |
| 1024 | gl_LIBUNISTRING_MODULE([1.3], [unicase/tolower]) | 1030 | gl_LIBUNISTRING_MODULE([1.4], [unicase/tolower]) |
| 1025 | gl_LIBUNISTRING_LIBHEADER([1.3], [unictype.h]) | 1031 | gl_LIBUNISTRING_LIBHEADER([1.3], [unictype.h]) |
| 1026 | gl_UNICTYPE_H | 1032 | gl_UNICTYPE_H |
| 1027 | gl_UNICTYPE_H_REQUIRE_DEFAULTS | 1033 | gl_UNICTYPE_H_REQUIRE_DEFAULTS |
| 1028 | AC_PROG_MKDIR_P | 1034 | AC_PROG_MKDIR_P |
| 1029 | AC_REQUIRE([AC_C_INLINE]) | 1035 | AC_REQUIRE([AC_C_INLINE]) |
| 1030 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-alnum]) | 1036 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alnum]) |
| 1031 | AC_REQUIRE([AC_C_INLINE]) | 1037 | AC_REQUIRE([AC_C_INLINE]) |
| 1032 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-alpha]) | 1038 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alpha]) |
| 1033 | AC_REQUIRE([AC_C_INLINE]) | 1039 | AC_REQUIRE([AC_C_INLINE]) |
| 1034 | gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-blank]) | 1040 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-blank]) |
| 1035 | AC_REQUIRE([AC_C_INLINE]) | 1041 | AC_REQUIRE([AC_C_INLINE]) |
| 1036 | gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-cntrl]) | 1042 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-cntrl]) |
| 1037 | AC_REQUIRE([AC_C_INLINE]) | 1043 | AC_REQUIRE([AC_C_INLINE]) |
| 1038 | gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-digit]) | 1044 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-digit]) |
| 1039 | AC_REQUIRE([AC_C_INLINE]) | 1045 | AC_REQUIRE([AC_C_INLINE]) |
| 1040 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-graph]) | 1046 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-graph]) |
| 1041 | AC_REQUIRE([AC_C_INLINE]) | 1047 | AC_REQUIRE([AC_C_INLINE]) |
| 1042 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-lower]) | 1048 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-lower]) |
| 1043 | AC_REQUIRE([AC_C_INLINE]) | 1049 | AC_REQUIRE([AC_C_INLINE]) |
| 1044 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-print]) | 1050 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-print]) |
| 1045 | AC_REQUIRE([AC_C_INLINE]) | 1051 | AC_REQUIRE([AC_C_INLINE]) |
| 1046 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-punct]) | 1052 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-punct]) |
| 1047 | AC_REQUIRE([AC_C_INLINE]) | 1053 | AC_REQUIRE([AC_C_INLINE]) |
| 1048 | gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-space]) | 1054 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-space]) |
| 1049 | AC_REQUIRE([AC_C_INLINE]) | 1055 | AC_REQUIRE([AC_C_INLINE]) |
| 1050 | gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-upper]) | 1056 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-upper]) |
| 1051 | AC_REQUIRE([AC_C_INLINE]) | 1057 | AC_REQUIRE([AC_C_INLINE]) |
| 1052 | gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-xdigit]) | 1058 | gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-xdigit]) |
| 1053 | gl_LIBUNISTRING_LIBHEADER([1.2], [uninorm.h]) | 1059 | gl_LIBUNISTRING_LIBHEADER([1.2], [uninorm.h]) |
| 1054 | gl_UNINORM_H | 1060 | gl_UNINORM_H |
| 1055 | gl_UNINORM_H_REQUIRE_DEFAULTS | 1061 | gl_UNINORM_H_REQUIRE_DEFAULTS |
| @@ -1062,7 +1068,7 @@ AC_DEFUN([gl_INIT], | |||
| 1062 | gl_UNITYPES_H | 1068 | gl_UNITYPES_H |
| 1063 | gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h]) | 1069 | gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h]) |
| 1064 | AC_PROG_MKDIR_P | 1070 | AC_PROG_MKDIR_P |
| 1065 | gl_LIBUNISTRING_MODULE([1.3], [uniwidth/width]) | 1071 | gl_LIBUNISTRING_MODULE([1.4], [uniwidth/width]) |
| 1066 | gl_FUNC_GLIBC_UNLOCKED_IO | 1072 | gl_FUNC_GLIBC_UNLOCKED_IO |
| 1067 | gl_FUNC_UNSETENV | 1073 | gl_FUNC_UNSETENV |
| 1068 | gl_CONDITIONAL([GL_COND_OBJ_UNSETENV], | 1074 | gl_CONDITIONAL([GL_COND_OBJ_UNSETENV], |
| @@ -1535,6 +1541,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 1535 | lib/strerror-override.c | 1541 | lib/strerror-override.c |
| 1536 | lib/strerror-override.h | 1542 | lib/strerror-override.h |
| 1537 | lib/strerror.c | 1543 | lib/strerror.c |
| 1544 | lib/string.c | ||
| 1538 | lib/string.in.h | 1545 | lib/string.in.h |
| 1539 | lib/strings.in.h | 1546 | lib/strings.in.h |
| 1540 | lib/stripslash.c | 1547 | lib/stripslash.c |
| @@ -1677,6 +1684,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 1677 | m4/getloadavg.m4 | 1684 | m4/getloadavg.m4 |
| 1678 | m4/getopt.m4 | 1685 | m4/getopt.m4 |
| 1679 | m4/getprogname.m4 | 1686 | m4/getprogname.m4 |
| 1687 | m4/gettext_h.m4 | ||
| 1680 | m4/gl-openssl.m4 | 1688 | m4/gl-openssl.m4 |
| 1681 | m4/gnulib-common.m4 | 1689 | m4/gnulib-common.m4 |
| 1682 | m4/gnulib-i18n.m4 | 1690 | m4/gnulib-i18n.m4 |
| @@ -1773,6 +1781,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 1773 | m4/strcasestr.m4 | 1781 | m4/strcasestr.m4 |
| 1774 | m4/strerror.m4 | 1782 | m4/strerror.m4 |
| 1775 | m4/string_h.m4 | 1783 | m4/string_h.m4 |
| 1784 | m4/stringeq.m4 | ||
| 1776 | m4/strings_h.m4 | 1785 | m4/strings_h.m4 |
| 1777 | m4/strncasecmp.m4 | 1786 | m4/strncasecmp.m4 |
| 1778 | m4/strncpy.m4 | 1787 | m4/strncpy.m4 |
diff --git a/gl/m4/gnulib-i18n.m4 b/gl/m4/gnulib-i18n.m4 index 868043e7..9a389187 100644 --- a/gl/m4/gnulib-i18n.m4 +++ b/gl/m4/gnulib-i18n.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # gnulib-i18n.m4 | 1 | # gnulib-i18n.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 index 8634a6e9..83d1e701 100644 --- a/gl/m4/gnulib-tool.m4 +++ b/gl/m4/gnulib-tool.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # gnulib-tool.m4 | 1 | # gnulib-tool.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2004-2005, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004-2005, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4 index 9278285c..0303ff80 100644 --- a/gl/m4/hostent.m4 +++ b/gl/m4/hostent.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # hostent.m4 | 1 | # hostent.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4 index 6e855e9a..a7091ad3 100644 --- a/gl/m4/idpriv.m4 +++ b/gl/m4/idpriv.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # idpriv.m4 | 1 | # idpriv.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index 80de991e..a19f2dfd 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # include_next.m4 | 1 | # include_next.m4 |
| 2 | # serial 27 | 2 | # serial 27 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 index 693bd51b..62e7a575 100644 --- a/gl/m4/inet_ntop.m4 +++ b/gl/m4/inet_ntop.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # inet_ntop.m4 | 1 | # inet_ntop.m4 |
| 2 | # serial 22 | 2 | # serial 23 |
| 3 | dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP], | |||
| 19 | dnl Solaris 8..10 provide inet_ntop in libnsl instead. | 19 | dnl Solaris 8..10 provide inet_ntop in libnsl instead. |
| 20 | dnl Solaris 2.6..7 provide inet_ntop in libresolv instead. | 20 | dnl Solaris 2.6..7 provide inet_ntop in libresolv instead. |
| 21 | dnl Haiku provides it in -lnetwork. | 21 | dnl Haiku provides it in -lnetwork. |
| 22 | dnl QNX provides it in -lsocket. | ||
| 22 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in | 23 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in |
| 23 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl | 24 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl |
| 24 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). | 25 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). |
| @@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP], | |||
| 39 | fi | 40 | fi |
| 40 | else | 41 | else |
| 41 | gl_saved_LIBS=$LIBS | 42 | gl_saved_LIBS=$LIBS |
| 42 | AC_SEARCH_LIBS([inet_ntop], [nsl resolv network], [], | 43 | AC_SEARCH_LIBS([inet_ntop], [nsl resolv network socket], [], |
| 43 | [AC_CHECK_FUNCS([inet_ntop]) | 44 | [AC_CHECK_FUNCS([inet_ntop]) |
| 44 | if test $ac_cv_func_inet_ntop = no; then | 45 | if test $ac_cv_func_inet_ntop = no; then |
| 45 | HAVE_INET_NTOP=0 | 46 | HAVE_INET_NTOP=0 |
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4 index b6e59a25..150c3a07 100644 --- a/gl/m4/inet_pton.m4 +++ b/gl/m4/inet_pton.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # inet_pton.m4 | 1 | # inet_pton.m4 |
| 2 | # serial 20 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_PTON], | |||
| 19 | dnl Solaris 8..10 provide inet_pton in libnsl instead. | 19 | dnl Solaris 8..10 provide inet_pton in libnsl instead. |
| 20 | dnl Solaris 2.6..7 provide inet_pton in libresolv instead. | 20 | dnl Solaris 2.6..7 provide inet_pton in libresolv instead. |
| 21 | dnl Haiku provides it in -lnetwork. | 21 | dnl Haiku provides it in -lnetwork. |
| 22 | dnl QNX provides it in -lsocket. | ||
| 22 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in | 23 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in |
| 23 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl | 24 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl |
| 24 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). | 25 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). |
| @@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_PTON], | |||
| 39 | fi | 40 | fi |
| 40 | else | 41 | else |
| 41 | gl_saved_LIBS=$LIBS | 42 | gl_saved_LIBS=$LIBS |
| 42 | AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [], | 43 | AC_SEARCH_LIBS([inet_pton], [nsl resolv network socket], [], |
| 43 | [AC_CHECK_FUNCS([inet_pton]) | 44 | [AC_CHECK_FUNCS([inet_pton]) |
| 44 | if test $ac_cv_func_inet_pton = no; then | 45 | if test $ac_cv_func_inet_pton = no; then |
| 45 | HAVE_INET_PTON=0 | 46 | HAVE_INET_PTON=0 |
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4 index c1df7b27..ad79536c 100644 --- a/gl/m4/intmax_t.m4 +++ b/gl/m4/intmax_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # intmax_t.m4 | 1 | # intmax_t.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 1997-2004, 2006-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 1997-2004, 2006-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4 index 63c82c61..ec17c237 100644 --- a/gl/m4/inttypes.m4 +++ b/gl/m4/inttypes.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # inttypes.m4 | 1 | # inttypes.m4 |
| 2 | # serial 37 | 2 | # serial 37 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4 index ad939a53..ed9e7033 100644 --- a/gl/m4/inttypes_h.m4 +++ b/gl/m4/inttypes_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # inttypes_h.m4 | 1 | # inttypes_h.m4 |
| 2 | # serial 10 | 2 | # serial 10 |
| 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/iswblank.m4 b/gl/m4/iswblank.m4 index d06b16a2..2c301a97 100644 --- a/gl/m4/iswblank.m4 +++ b/gl/m4/iswblank.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # iswblank.m4 | 1 | # iswblank.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/iswctype.m4 b/gl/m4/iswctype.m4 index f5a3b760..3b179a76 100644 --- a/gl/m4/iswctype.m4 +++ b/gl/m4/iswctype.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # iswctype.m4 | 1 | # iswctype.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/iswdigit.m4 b/gl/m4/iswdigit.m4 index 4582f598..7fca8167 100644 --- a/gl/m4/iswdigit.m4 +++ b/gl/m4/iswdigit.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # iswdigit.m4 | 1 | # iswdigit.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/iswpunct.m4 b/gl/m4/iswpunct.m4 index d8e8d712..be312d6c 100644 --- a/gl/m4/iswpunct.m4 +++ b/gl/m4/iswpunct.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # iswpunct.m4 | 1 | # iswpunct.m4 |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/iswxdigit.m4 b/gl/m4/iswxdigit.m4 index 95226fc4..2cb8e873 100644 --- a/gl/m4/iswxdigit.m4 +++ b/gl/m4/iswxdigit.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # iswxdigit.m4 | 1 | # iswxdigit.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4 index 69f936f0..3ed8d593 100644 --- a/gl/m4/langinfo_h.m4 +++ b/gl/m4/langinfo_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # langinfo_h.m4 | 1 | # langinfo_h.m4 |
| 2 | # serial 13 | 2 | # serial 14 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -18,18 +18,15 @@ AC_DEFUN_ONCE([gl_LANGINFO_H], | |||
| 18 | 18 | ||
| 19 | dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS. | 19 | dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS. |
| 20 | HAVE_LANGINFO_CODESET=0 | 20 | HAVE_LANGINFO_CODESET=0 |
| 21 | HAVE_LANGINFO_T_FMT_AMPM=0 | ||
| 22 | HAVE_LANGINFO_ALTMON=0 | 21 | HAVE_LANGINFO_ALTMON=0 |
| 23 | HAVE_LANGINFO_ABALTMON=0 | 22 | HAVE_LANGINFO_ABALTMON=0 |
| 24 | HAVE_LANGINFO_ERA=0 | 23 | HAVE_LANGINFO_ERA=0 |
| 25 | HAVE_LANGINFO_YESEXPR=0 | ||
| 26 | AC_CHECK_HEADERS_ONCE([langinfo.h]) | 24 | AC_CHECK_HEADERS_ONCE([langinfo.h]) |
| 27 | if test $ac_cv_header_langinfo_h = yes; then | 25 | if test $ac_cv_header_langinfo_h = yes; then |
| 28 | HAVE_LANGINFO_H=1 | 26 | HAVE_LANGINFO_H=1 |
| 29 | dnl Determine what <langinfo.h> defines. | 27 | dnl Determine what <langinfo.h> defines. |
| 30 | dnl CODESET is missing on OpenBSD 3.8. | 28 | dnl CODESET is missing on OpenBSD 3.8. |
| 31 | dnl ERA etc. are missing on OpenBSD 6.7. | 29 | dnl ERA etc. are missing on OpenBSD 6.7. |
| 32 | dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. | ||
| 33 | dnl ALTMON_* are missing on glibc 2.26 and many other systems. | 30 | dnl ALTMON_* are missing on glibc 2.26 and many other systems. |
| 34 | dnl ABALTMON_* are missing on glibc 2.41 and many other systems. | 31 | dnl ABALTMON_* are missing on glibc 2.41 and many other systems. |
| 35 | AC_CACHE_CHECK([whether langinfo.h defines CODESET], | 32 | AC_CACHE_CHECK([whether langinfo.h defines CODESET], |
| @@ -44,18 +41,6 @@ int a = CODESET; | |||
| 44 | if test $gl_cv_header_langinfo_codeset = yes; then | 41 | if test $gl_cv_header_langinfo_codeset = yes; then |
| 45 | HAVE_LANGINFO_CODESET=1 | 42 | HAVE_LANGINFO_CODESET=1 |
| 46 | fi | 43 | fi |
| 47 | AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], | ||
| 48 | [gl_cv_header_langinfo_t_fmt_ampm], | ||
| 49 | [AC_COMPILE_IFELSE( | ||
| 50 | [AC_LANG_PROGRAM([[#include <langinfo.h> | ||
| 51 | int a = T_FMT_AMPM; | ||
| 52 | ]])], | ||
| 53 | [gl_cv_header_langinfo_t_fmt_ampm=yes], | ||
| 54 | [gl_cv_header_langinfo_t_fmt_ampm=no]) | ||
| 55 | ]) | ||
| 56 | if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then | ||
| 57 | HAVE_LANGINFO_T_FMT_AMPM=1 | ||
| 58 | fi | ||
| 59 | AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], | 44 | AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], |
| 60 | [gl_cv_header_langinfo_altmon], | 45 | [gl_cv_header_langinfo_altmon], |
| 61 | [AC_COMPILE_IFELSE( | 46 | [AC_COMPILE_IFELSE( |
| @@ -92,28 +77,14 @@ int a = ERA; | |||
| 92 | if test $gl_cv_header_langinfo_era = yes; then | 77 | if test $gl_cv_header_langinfo_era = yes; then |
| 93 | HAVE_LANGINFO_ERA=1 | 78 | HAVE_LANGINFO_ERA=1 |
| 94 | fi | 79 | fi |
| 95 | AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], | ||
| 96 | [gl_cv_header_langinfo_yesexpr], | ||
| 97 | [AC_COMPILE_IFELSE( | ||
| 98 | [AC_LANG_PROGRAM([[#include <langinfo.h> | ||
| 99 | int a = YESEXPR; | ||
| 100 | ]])], | ||
| 101 | [gl_cv_header_langinfo_yesexpr=yes], | ||
| 102 | [gl_cv_header_langinfo_yesexpr=no]) | ||
| 103 | ]) | ||
| 104 | if test $gl_cv_header_langinfo_yesexpr = yes; then | ||
| 105 | HAVE_LANGINFO_YESEXPR=1 | ||
| 106 | fi | ||
| 107 | else | 80 | else |
| 108 | HAVE_LANGINFO_H=0 | 81 | HAVE_LANGINFO_H=0 |
| 109 | fi | 82 | fi |
| 110 | AC_SUBST([HAVE_LANGINFO_H]) | 83 | AC_SUBST([HAVE_LANGINFO_H]) |
| 111 | AC_SUBST([HAVE_LANGINFO_CODESET]) | 84 | AC_SUBST([HAVE_LANGINFO_CODESET]) |
| 112 | AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) | ||
| 113 | AC_SUBST([HAVE_LANGINFO_ALTMON]) | 85 | AC_SUBST([HAVE_LANGINFO_ALTMON]) |
| 114 | AC_SUBST([HAVE_LANGINFO_ABALTMON]) | 86 | AC_SUBST([HAVE_LANGINFO_ABALTMON]) |
| 115 | AC_SUBST([HAVE_LANGINFO_ERA]) | 87 | AC_SUBST([HAVE_LANGINFO_ERA]) |
| 116 | AC_SUBST([HAVE_LANGINFO_YESEXPR]) | ||
| 117 | 88 | ||
| 118 | dnl Check for declarations of anything we want to poison if the | 89 | dnl Check for declarations of anything we want to poison if the |
| 119 | dnl corresponding gnulib module is not in use. | 90 | dnl corresponding gnulib module is not in use. |
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 index b24f657d..3134f336 100644 --- a/gl/m4/largefile.m4 +++ b/gl/m4/largefile.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # largefile.m4 | 1 | # largefile.m4 |
| 2 | # serial 2 | 2 | # serial 4 |
| 3 | dnl Copyright 1992-1996, 1998-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 1992-1996, 1998-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -355,8 +355,7 @@ AC_DEFUN([gl_LARGEFILE], | |||
| 355 | *) | 355 | *) |
| 356 | dnl Nothing to do on gnulib's side. | 356 | dnl Nothing to do on gnulib's side. |
| 357 | dnl A 64-bit off_t is | 357 | dnl A 64-bit off_t is |
| 358 | dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX, | 358 | dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, Cygwin, |
| 359 | dnl OSF/1, Cygwin, | ||
| 360 | dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on | 359 | dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on |
| 361 | dnl glibc, HP-UX, Solaris, | 360 | dnl glibc, HP-UX, Solaris, |
| 362 | dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX, | 361 | dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX, |
diff --git a/gl/m4/libunistring-base.m4 b/gl/m4/libunistring-base.m4 index 9b5795ed..f2f144ac 100644 --- a/gl/m4/libunistring-base.m4 +++ b/gl/m4/libunistring-base.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # libunistring-base.m4 | 1 | # libunistring-base.m4 |
| 2 | # serial 10 | 2 | # serial 10 |
| 3 | dnl Copyright (C) 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4 index 202df492..048c8fab 100644 --- a/gl/m4/limits-h.m4 +++ b/gl/m4/limits-h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # limits-h.m4 | 1 | # limits-h.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright 2016-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2016-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4 index 374a48f1..8e2c2755 100644 --- a/gl/m4/localcharset.m4 +++ b/gl/m4/localcharset.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # localcharset.m4 | 1 | # localcharset.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002, 2004, 2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/locale-en.m4 b/gl/m4/locale-en.m4 index 4151428a..f5e035f3 100644 --- a/gl/m4/locale-en.m4 +++ b/gl/m4/locale-en.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # locale-en.m4 | 1 | # locale-en.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2003-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -19,7 +19,7 @@ AC_DEFUN_ONCE([gt_LOCALE_EN_UTF8], | |||
| 19 | *-musl* | midipix*) | 19 | *-musl* | midipix*) |
| 20 | dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without | 20 | dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without |
| 21 | dnl any locale file on disk. But they are effectively equivalent to the | 21 | dnl any locale file on disk. But they are effectively equivalent to the |
| 22 | dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES) | 22 | dnl C.UTF-8 locale, except for locale categories (such as LC_MESSAGES) |
| 23 | dnl for which localizations (.mo files) have been installed. | 23 | dnl for which localizations (.mo files) have been installed. |
| 24 | gt_cv_locale_en_utf8=en_US.UTF-8 | 24 | gt_cv_locale_en_utf8=en_US.UTF-8 |
| 25 | ;; | 25 | ;; |
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4 index f504d5b5..097cefa6 100644 --- a/gl/m4/locale-fr.m4 +++ b/gl/m4/locale-fr.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # locale-fr.m4 | 1 | # locale-fr.m4 |
| 2 | # serial 24 | 2 | # serial 25 |
| 3 | dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -112,7 +112,7 @@ int main () { | |||
| 112 | if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 112 | if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
| 113 | gt_cv_locale_fr=fr_FR.ISO-8859-1 | 113 | gt_cv_locale_fr=fr_FR.ISO-8859-1 |
| 114 | else | 114 | else |
| 115 | # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. | 115 | # Test for the AIX, FreeBSD, NetBSD, OpenBSD locale name. |
| 116 | if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 116 | if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
| 117 | gt_cv_locale_fr=fr_FR.ISO8859-1 | 117 | gt_cv_locale_fr=fr_FR.ISO8859-1 |
| 118 | else | 118 | else |
| @@ -156,7 +156,7 @@ AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8], | |||
| 156 | *-musl* | midipix*) | 156 | *-musl* | midipix*) |
| 157 | dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without | 157 | dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without |
| 158 | dnl any locale file on disk. But they are effectively equivalent to the | 158 | dnl any locale file on disk. But they are effectively equivalent to the |
| 159 | dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES) | 159 | dnl C.UTF-8 locale, except for locale categories (such as LC_MESSAGES) |
| 160 | dnl for which localizations (.mo files) have been installed. | 160 | dnl for which localizations (.mo files) have been installed. |
| 161 | gt_cv_locale_fr_utf8=fr_FR.UTF-8 | 161 | gt_cv_locale_fr_utf8=fr_FR.UTF-8 |
| 162 | ;; | 162 | ;; |
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4 index 1c813b89..ee4309ed 100644 --- a/gl/m4/locale-ja.m4 +++ b/gl/m4/locale-ja.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # locale-ja.m4 | 1 | # locale-ja.m4 |
| 2 | # serial 19 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -112,11 +112,11 @@ int main () | |||
| 112 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 112 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
| 113 | gt_cv_locale_ja=ja_JP.EUC-JP | 113 | gt_cv_locale_ja=ja_JP.EUC-JP |
| 114 | else | 114 | else |
| 115 | # Test for the HP-UX, OSF/1, NetBSD locale name. | 115 | # Test for the HP-UX, NetBSD locale name. |
| 116 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 116 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
| 117 | gt_cv_locale_ja=ja_JP.eucJP | 117 | gt_cv_locale_ja=ja_JP.eucJP |
| 118 | else | 118 | else |
| 119 | # Test for the IRIX, FreeBSD locale name. | 119 | # Test for the FreeBSD locale name. |
| 120 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 120 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
| 121 | gt_cv_locale_ja=ja_JP.EUC | 121 | gt_cv_locale_ja=ja_JP.EUC |
| 122 | else | 122 | else |
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4 index 6f9374d2..98975bdd 100644 --- a/gl/m4/locale-zh.m4 +++ b/gl/m4/locale-zh.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # locale-zh.m4 | 1 | # locale-zh.m4 |
| 2 | # serial 20 | 2 | # serial 20 |
| 3 | dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4 index e1afbc16..aeda9f9d 100644 --- a/gl/m4/locale_h.m4 +++ b/gl/m4/locale_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # locale_h.m4 | 1 | # locale_h.m4 |
| 2 | # serial 37 | 2 | # serial 39 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -63,8 +63,8 @@ AC_DEFUN_ONCE([gl_LOCALE_H], | |||
| 63 | 63 | ||
| 64 | dnl Check whether 'struct lconv' is complete. | 64 | dnl Check whether 'struct lconv' is complete. |
| 65 | dnl Bionic libc's 'struct lconv' is just a dummy. | 65 | dnl Bionic libc's 'struct lconv' is just a dummy. |
| 66 | dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, | 66 | dnl On OpenBSD 4.9, HP-UX 11, Solaris 9, Cygwin 1.5.x, mingw, MSVC 9, |
| 67 | dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members. | 67 | dnl it lacks the int_p_* and int_n_* members. |
| 68 | AC_CACHE_CHECK([whether struct lconv is properly defined], | 68 | AC_CACHE_CHECK([whether struct lconv is properly defined], |
| 69 | [gl_cv_sys_struct_lconv_ok], | 69 | [gl_cv_sys_struct_lconv_ok], |
| 70 | [AC_COMPILE_IFELSE( | 70 | [AC_COMPILE_IFELSE( |
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4 index 55a669d0..9fa31de8 100644 --- a/gl/m4/localeconv.m4 +++ b/gl/m4/localeconv.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # localeconv.m4 | 1 | # localeconv.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 index b1d3f435..7058fb30 100644 --- a/gl/m4/lock.m4 +++ b/gl/m4/lock.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # lock.m4 | 1 | # lock.m4 |
| 2 | # serial 14 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -12,8 +12,8 @@ AC_DEFUN([gl_LOCK], | |||
| 12 | [ | 12 | [ |
| 13 | AC_REQUIRE([gl_THREADLIB]) | 13 | AC_REQUIRE([gl_THREADLIB]) |
| 14 | if test "$gl_threads_api" = posix; then | 14 | if test "$gl_threads_api" = posix; then |
| 15 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the | 15 | # Mac OS X 10.1 lacks the pthread_rwlock_t type and the pthread_rwlock_* |
| 16 | # pthread_rwlock_* functions. | 16 | # functions. |
| 17 | has_rwlock=false | 17 | has_rwlock=false |
| 18 | AC_CHECK_TYPE([pthread_rwlock_t], | 18 | AC_CHECK_TYPE([pthread_rwlock_t], |
| 19 | [has_rwlock=true | 19 | [has_rwlock=true |
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 index ddfadd38..342fc55b 100644 --- a/gl/m4/lseek.m4 +++ b/gl/m4/lseek.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # lseek.m4 | 1 | # lseek.m4 |
| 2 | # serial 15 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4 index efae2485..57df6fd9 100644 --- a/gl/m4/lstat.m4 +++ b/gl/m4/lstat.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # lstat.m4 | 1 | # lstat.m4 |
| 2 | # serial 36 | 2 | # serial 36 |
| 3 | dnl Copyright (C) 1997-2001, 2003-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1997-2001, 2003-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 index 547b4e4d..a95e33db 100644 --- a/gl/m4/malloc.m4 +++ b/gl/m4/malloc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # malloc.m4 | 1 | # malloc.m4 |
| 2 | # serial 43.1 | 2 | # serial 46 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -187,40 +187,42 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], | |||
| 187 | [gl_cv_func_malloc_posix="guessing yes"], | 187 | [gl_cv_func_malloc_posix="guessing yes"], |
| 188 | [gl_cv_func_malloc_posix="guessing no"]) | 188 | [gl_cv_func_malloc_posix="guessing no"]) |
| 189 | ;; | 189 | ;; |
| 190 | irix* | solaris*) | 190 | solaris*) |
| 191 | dnl On IRIX 6.5, the three functions return NULL with errno unset | 191 | dnl On Solaris 11.3, the three functions might fail with errno set |
| 192 | dnl when the argument is larger than PTRDIFF_MAX. | ||
| 193 | dnl On Solaris 11.3, the three functions return NULL with errno set | ||
| 194 | dnl to EAGAIN, not ENOMEM, when the argument is larger than | 192 | dnl to EAGAIN, not ENOMEM, when the argument is larger than |
| 195 | dnl PTRDIFF_MAX. | 193 | dnl PTRDIFF_MAX. See: |
| 194 | dnl https://lists.gnu.org/r/bug-gnulib/2021-05/msg00052.html | ||
| 196 | dnl Here is a test program: | 195 | dnl Here is a test program: |
| 196 | |||
| 197 | m4_divert_push([KILL]) | 197 | m4_divert_push([KILL]) |
| 198 | #include <errno.h> | 198 | #include <errno.h> |
| 199 | #include <stddef.h> | ||
| 199 | #include <stdio.h> | 200 | #include <stdio.h> |
| 201 | #include <stdint.h> | ||
| 200 | #include <stdlib.h> | 202 | #include <stdlib.h> |
| 201 | #define ptrdiff_t long | ||
| 202 | #ifndef PTRDIFF_MAX | ||
| 203 | # define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1)) | ||
| 204 | #endif | ||
| 205 | 203 | ||
| 206 | int main () | 204 | #define TEST_CALL(call) \ |
| 205 | do { \ | ||
| 206 | void *p = call; \ | ||
| 207 | if (p) \ | ||
| 208 | fprintf (stderr, "returned %p (incorrect success)\n", p); \ | ||
| 209 | else if (errno == ENOMEM) \ | ||
| 210 | perror ("correct failure"); \ | ||
| 211 | else \ | ||
| 212 | perror ("incorrect failure (wrong errno)"); \ | ||
| 213 | free (p); \ | ||
| 214 | } while (0) | ||
| 215 | |||
| 216 | int | ||
| 217 | main () | ||
| 207 | { | 218 | { |
| 208 | void *p; | 219 | size_t big = PTRDIFF_MAX; |
| 209 | 220 | TEST_CALL (malloc (big + 1)); | |
| 210 | fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX); | 221 | TEST_CALL (calloc (big / 2 + 1, 2)); |
| 211 | 222 | TEST_CALL (realloc (NULL, big + 1)); | |
| 212 | errno = 0; | 223 | void *small = malloc (1); |
| 213 | p = malloc ((unsigned long) PTRDIFF_MAX + 1); | 224 | TEST_CALL (realloc (small, big + 1)); |
| 214 | fprintf (stderr, "p=%p errno=%d\n", p, errno); | 225 | free (small); |
| 215 | |||
| 216 | errno = 0; | ||
| 217 | p = calloc (PTRDIFF_MAX / 2 + 1, 2); | ||
| 218 | fprintf (stderr, "p=%p errno=%d\n", p, errno); | ||
| 219 | |||
| 220 | errno = 0; | ||
| 221 | p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1); | ||
| 222 | fprintf (stderr, "p=%p errno=%d\n", p, errno); | ||
| 223 | |||
| 224 | return 0; | 226 | return 0; |
| 225 | } | 227 | } |
| 226 | m4_divert_pop([KILL]) | 228 | m4_divert_pop([KILL]) |
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4 index cabe5fe7..2c0ed8ea 100644 --- a/gl/m4/malloca.m4 +++ b/gl/m4/malloca.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # malloca.m4 | 1 | # malloca.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2003-2004, 2006-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 index 8c27503b..4cf59671 100644 --- a/gl/m4/math_h.m4 +++ b/gl/m4/math_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # math_h.m4 | 1 | # math_h.m4 |
| 2 | # serial 140.1 | 2 | # serial 146 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -131,8 +131,11 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS], | |||
| 131 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBF]) | 131 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBF]) |
| 132 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBL]) | 132 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBL]) |
| 133 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE]) | 133 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE]) |
| 134 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE_NO_CXX]) | ||
| 134 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) | 135 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) |
| 136 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF_NO_CXX]) | ||
| 135 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) | 137 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) |
| 138 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN_NO_CXX]) | ||
| 136 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) | 139 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) |
| 137 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) | 140 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) |
| 138 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL]) | 141 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL]) |
| @@ -177,6 +180,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS], | |||
| 177 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF]) | 180 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF]) |
| 178 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL]) | 181 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL]) |
| 179 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT]) | 182 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT]) |
| 183 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT_NO_CXX]) | ||
| 180 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF]) | 184 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF]) |
| 181 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL]) | 185 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL]) |
| 182 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINHF]) | 186 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINHF]) |
| @@ -220,14 +224,19 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
| 220 | HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) | 224 | HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) |
| 221 | HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) | 225 | HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) |
| 222 | HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) | 226 | HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) |
| 227 | HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF]) | ||
| 223 | HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) | 228 | HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) |
| 224 | HAVE_COSF=1; AC_SUBST([HAVE_COSF]) | 229 | HAVE_COSF=1; AC_SUBST([HAVE_COSF]) |
| 225 | HAVE_COSL=1; AC_SUBST([HAVE_COSL]) | 230 | HAVE_COSL=1; AC_SUBST([HAVE_COSL]) |
| 226 | HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) | 231 | HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) |
| 227 | HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) | 232 | HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) |
| 228 | HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) | 233 | HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) |
| 234 | HAVE_EXP2=1; AC_SUBST([HAVE_EXP2]) | ||
| 235 | HAVE_EXP2F=1; AC_SUBST([HAVE_EXP2F]) | ||
| 236 | HAVE_EXP2L=1; AC_SUBST([HAVE_EXP2L]) | ||
| 229 | HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) | 237 | HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) |
| 230 | HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) | 238 | HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) |
| 239 | HAVE_EXPM1L=1; AC_SUBST([HAVE_EXPM1L]) | ||
| 231 | HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) | 240 | HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) |
| 232 | HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) | 241 | HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) |
| 233 | HAVE_FMA=1; AC_SUBST([HAVE_FMA]) | 242 | HAVE_FMA=1; AC_SUBST([HAVE_FMA]) |
| @@ -255,6 +264,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
| 255 | HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) | 264 | HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) |
| 256 | HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) | 265 | HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) |
| 257 | HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) | 266 | HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) |
| 267 | HAVE_LOG2=1; AC_SUBST([HAVE_LOG2]) | ||
| 268 | HAVE_LOG2F=1; AC_SUBST([HAVE_LOG2F]) | ||
| 269 | HAVE_LOG2L=1; AC_SUBST([HAVE_LOG2L]) | ||
| 258 | HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) | 270 | HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) |
| 259 | HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) | 271 | HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) |
| 260 | HAVE_LOGP1=1; AC_SUBST([HAVE_LOGP1]) | 272 | HAVE_LOGP1=1; AC_SUBST([HAVE_LOGP1]) |
| @@ -265,8 +277,13 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
| 265 | HAVE_POWF=1; AC_SUBST([HAVE_POWF]) | 277 | HAVE_POWF=1; AC_SUBST([HAVE_POWF]) |
| 266 | HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) | 278 | HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) |
| 267 | HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) | 279 | HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) |
| 280 | HAVE_REMAINDERL=1; AC_SUBST([HAVE_REMAINDERL]) | ||
| 268 | HAVE_RINT=1; AC_SUBST([HAVE_RINT]) | 281 | HAVE_RINT=1; AC_SUBST([HAVE_RINT]) |
| 282 | HAVE_RINTF=1; AC_SUBST([HAVE_RINTF]) | ||
| 269 | HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) | 283 | HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) |
| 284 | HAVE_ROUND=1; AC_SUBST([HAVE_ROUND]) | ||
| 285 | HAVE_ROUNDF=1; AC_SUBST([HAVE_ROUNDF]) | ||
| 286 | HAVE_ROUNDL=1; AC_SUBST([HAVE_ROUNDL]) | ||
| 270 | HAVE_SETPAYLOAD=1; AC_SUBST([HAVE_SETPAYLOAD]) | 287 | HAVE_SETPAYLOAD=1; AC_SUBST([HAVE_SETPAYLOAD]) |
| 271 | HAVE_SETPAYLOADF=1; AC_SUBST([HAVE_SETPAYLOADF]) | 288 | HAVE_SETPAYLOADF=1; AC_SUBST([HAVE_SETPAYLOADF]) |
| 272 | HAVE_SETPAYLOADL=1; AC_SUBST([HAVE_SETPAYLOADL]) | 289 | HAVE_SETPAYLOADL=1; AC_SUBST([HAVE_SETPAYLOADL]) |
| @@ -290,33 +307,17 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
| 290 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) | 307 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) |
| 291 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) | 308 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) |
| 292 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) | 309 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) |
| 293 | HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF]) | ||
| 294 | HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL]) | ||
| 295 | HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) | 310 | HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) |
| 296 | HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) | 311 | HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) |
| 297 | HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF]) | ||
| 298 | HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) | 312 | HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) |
| 299 | HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) | 313 | HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) |
| 300 | HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2]) | ||
| 301 | HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F]) | ||
| 302 | HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L]) | ||
| 303 | HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L]) | ||
| 304 | HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) | 314 | HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) |
| 305 | HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) | 315 | HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) |
| 306 | HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) | 316 | HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) |
| 307 | HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) | 317 | HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) |
| 308 | HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) | 318 | HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) |
| 309 | HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) | 319 | HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) |
| 310 | HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2]) | ||
| 311 | HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F]) | ||
| 312 | HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L]) | ||
| 313 | HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) | 320 | HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) |
| 314 | HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER]) | ||
| 315 | HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL]) | ||
| 316 | HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF]) | ||
| 317 | HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) | ||
| 318 | HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) | ||
| 319 | HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) | ||
| 320 | HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) | 321 | HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) |
| 321 | HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) | 322 | HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) |
| 322 | HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) | 323 | HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) |
diff --git a/gl/m4/mbchar.m4 b/gl/m4/mbchar.m4 index b76f1d7b..4251a84c 100644 --- a/gl/m4/mbchar.m4 +++ b/gl/m4/mbchar.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbchar.m4 | 1 | # mbchar.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mbiter.m4 b/gl/m4/mbiter.m4 index b51242e6..927876bc 100644 --- a/gl/m4/mbiter.m4 +++ b/gl/m4/mbiter.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbiter.m4 | 1 | # mbiter.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mbrtoc32.m4 b/gl/m4/mbrtoc32.m4 index 1991529c..d1690fb4 100644 --- a/gl/m4/mbrtoc32.m4 +++ b/gl/m4/mbrtoc32.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbrtoc32.m4 | 1 | # mbrtoc32.m4 |
| 2 | # serial 21 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2014-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2014-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4 index cc09a5fb..a49872fa 100644 --- a/gl/m4/mbrtowc.m4 +++ b/gl/m4/mbrtowc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbrtowc.m4 | 1 | # mbrtowc.m4 |
| 2 | # serial 46 | 2 | # serial 47 |
| 3 | dnl Copyright (C) 2001-2002, 2004-2005, 2008-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2001-2002, 2004-2005, 2008-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -33,7 +33,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC], | |||
| 33 | REPLACE_MBRTOWC=1 | 33 | REPLACE_MBRTOWC=1 |
| 34 | else | 34 | else |
| 35 | gl_MBRTOWC_NULL_ARG1 | 35 | gl_MBRTOWC_NULL_ARG1 |
| 36 | gl_MBRTOWC_NULL_ARG2 | ||
| 37 | gl_MBRTOWC_RETVAL | 36 | gl_MBRTOWC_RETVAL |
| 38 | gl_MBRTOWC_NUL_RETVAL | 37 | gl_MBRTOWC_NUL_RETVAL |
| 39 | gl_MBRTOWC_STORES_INCOMPLETE | 38 | gl_MBRTOWC_STORES_INCOMPLETE |
| @@ -46,13 +45,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC], | |||
| 46 | REPLACE_MBRTOWC=1 | 45 | REPLACE_MBRTOWC=1 |
| 47 | ;; | 46 | ;; |
| 48 | esac | 47 | esac |
| 49 | case "$gl_cv_func_mbrtowc_null_arg2" in | ||
| 50 | *yes) ;; | ||
| 51 | *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], | ||
| 52 | [Define if the mbrtowc function has the NULL string argument bug.]) | ||
| 53 | REPLACE_MBRTOWC=1 | ||
| 54 | ;; | ||
| 55 | esac | ||
| 56 | case "$gl_cv_func_mbrtowc_retval" in | 48 | case "$gl_cv_func_mbrtowc_retval" in |
| 57 | *yes) ;; | 49 | *yes) ;; |
| 58 | *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], | 50 | *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], |
| @@ -170,10 +162,10 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], | |||
| 170 | dnl is present. | 162 | dnl is present. |
| 171 | changequote(,)dnl | 163 | changequote(,)dnl |
| 172 | case "$host_os" in | 164 | case "$host_os" in |
| 173 | # Guess no on AIX and OSF/1. | 165 | # Guess no on AIX. |
| 174 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | 166 | aix*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; |
| 175 | # Guess yes otherwise. | 167 | # Guess yes otherwise. |
| 176 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | 168 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; |
| 177 | esac | 169 | esac |
| 178 | changequote([,])dnl | 170 | changequote([,])dnl |
| 179 | if test $LOCALE_JA != none; then | 171 | if test $LOCALE_JA != none; then |
| @@ -346,57 +338,6 @@ int main () | |||
| 346 | ]) | 338 | ]) |
| 347 | ]) | 339 | ]) |
| 348 | 340 | ||
| 349 | dnl Test whether mbrtowc supports a NULL string argument correctly. | ||
| 350 | dnl Result is gl_cv_func_mbrtowc_null_arg2. | ||
| 351 | |||
| 352 | AC_DEFUN([gl_MBRTOWC_NULL_ARG2], | ||
| 353 | [ | ||
| 354 | AC_REQUIRE([AC_PROG_CC]) | ||
| 355 | AC_REQUIRE([gt_LOCALE_EN_UTF8]) | ||
| 356 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
| 357 | AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], | ||
| 358 | [gl_cv_func_mbrtowc_null_arg2], | ||
| 359 | [ | ||
| 360 | dnl Initial guess, used when cross-compiling or when no suitable locale | ||
| 361 | dnl is present. | ||
| 362 | changequote(,)dnl | ||
| 363 | case "$host_os" in | ||
| 364 | # Guess no on OSF/1. | ||
| 365 | osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; | ||
| 366 | # Guess yes otherwise. | ||
| 367 | *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; | ||
| 368 | esac | ||
| 369 | changequote([,])dnl | ||
| 370 | if test "$LOCALE_EN_UTF8" != none; then | ||
| 371 | AC_RUN_IFELSE( | ||
| 372 | [AC_LANG_SOURCE([[ | ||
| 373 | #include <locale.h> | ||
| 374 | #include <string.h> | ||
| 375 | #include <wchar.h> | ||
| 376 | int main () | ||
| 377 | { | ||
| 378 | if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL) | ||
| 379 | { | ||
| 380 | mbstate_t state; | ||
| 381 | wchar_t wc; | ||
| 382 | int ret; | ||
| 383 | |||
| 384 | memset (&state, '\0', sizeof (mbstate_t)); | ||
| 385 | wc = (wchar_t) 0xBADFACE; | ||
| 386 | mbrtowc (&wc, NULL, 5, &state); | ||
| 387 | /* Check that wc was not modified. */ | ||
| 388 | if (wc != (wchar_t) 0xBADFACE) | ||
| 389 | return 2; | ||
| 390 | } | ||
| 391 | return 0; | ||
| 392 | }]])], | ||
| 393 | [gl_cv_func_mbrtowc_null_arg2=yes], | ||
| 394 | [gl_cv_func_mbrtowc_null_arg2=no], | ||
| 395 | [:]) | ||
| 396 | fi | ||
| 397 | ]) | ||
| 398 | ]) | ||
| 399 | |||
| 400 | dnl Test whether mbrtowc, when parsing the end of a multibyte character, | 341 | dnl Test whether mbrtowc, when parsing the end of a multibyte character, |
| 401 | dnl correctly returns the number of bytes that were needed to complete the | 342 | dnl correctly returns the number of bytes that were needed to complete the |
| 402 | dnl character (not the total number of bytes of the multibyte character). | 343 | dnl character (not the total number of bytes of the multibyte character). |
| @@ -716,7 +657,7 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT], | |||
| 716 | dnl Test whether mbrtowc reports encoding errors in the C locale. | 657 | dnl Test whether mbrtowc reports encoding errors in the C locale. |
| 717 | dnl Although POSIX was never intended to allow this, the GNU C Library | 658 | dnl Although POSIX was never intended to allow this, the GNU C Library |
| 718 | dnl and other implementations do it. See: | 659 | dnl and other implementations do it. See: |
| 719 | dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932 | 660 | dnl https://sourceware.org/PR19932 |
| 720 | dnl POSIX has now clarified it: | 661 | dnl POSIX has now clarified it: |
| 721 | dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html> | 662 | dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html> |
| 722 | dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte | 663 | dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte |
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4 index 69cfa574..757f2360 100644 --- a/gl/m4/mbsinit.m4 +++ b/gl/m4/mbsinit.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbsinit.m4 | 1 | # mbsinit.m4 |
| 2 | # serial 10 | 2 | # serial 10 |
| 3 | dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4 index 59df1e2e..88307d7a 100644 --- a/gl/m4/mbstate_t.m4 +++ b/gl/m4/mbstate_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbstate_t.m4 | 1 | # mbstate_t.m4 |
| 2 | # serial 14 | 2 | # serial 14 |
| 3 | dnl Copyright (C) 2000-2002, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2000-2002, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4 index 3e3f6ce0..9c5887d3 100644 --- a/gl/m4/mbtowc.m4 +++ b/gl/m4/mbtowc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mbtowc.m4 | 1 | # mbtowc.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4 index 1c2ecf1d..c5c74682 100644 --- a/gl/m4/memchr.m4 +++ b/gl/m4/memchr.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # memchr.m4 | 1 | # memchr.m4 |
| 2 | # serial 20 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2002-2004, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -21,7 +21,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], | |||
| 21 | # https://bugzilla.redhat.com/show_bug.cgi?id=499689 | 21 | # https://bugzilla.redhat.com/show_bug.cgi?id=499689 |
| 22 | # memchr should not dereference overestimated length after a match | 22 | # memchr should not dereference overestimated length after a match |
| 23 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | 23 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 |
| 24 | # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 | 24 | # https://sourceware.org/PR10162 |
| 25 | # memchr should cast the second argument to 'unsigned char'. | 25 | # memchr should cast the second argument to 'unsigned char'. |
| 26 | # This bug exists in Android 4.3. | 26 | # This bug exists in Android 4.3. |
| 27 | # Assume that memchr works on platforms that lack mprotect. | 27 | # Assume that memchr works on platforms that lack mprotect. |
| @@ -33,31 +33,20 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], | |||
| 33 | # include <unistd.h> | 33 | # include <unistd.h> |
| 34 | # include <sys/types.h> | 34 | # include <sys/types.h> |
| 35 | # include <sys/mman.h> | 35 | # include <sys/mman.h> |
| 36 | # ifndef MAP_FILE | ||
| 37 | # define MAP_FILE 0 | ||
| 38 | # endif | ||
| 39 | #endif | 36 | #endif |
| 40 | ]], [[ | 37 | ]], [[ |
| 41 | int result = 0; | 38 | int result = 0; |
| 42 | char *fence = NULL; | 39 | char *fence = NULL; |
| 43 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | 40 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT |
| 44 | # if HAVE_MAP_ANONYMOUS | 41 | { |
| 45 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | 42 | long int pagesize = sysconf (_SC_PAGESIZE); |
| 46 | const int fd = -1; | 43 | char *two_pages = |
| 47 | # else /* !HAVE_MAP_ANONYMOUS */ | 44 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, |
| 48 | const int flags = MAP_FILE | MAP_PRIVATE; | 45 | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); |
| 49 | int fd = open ("/dev/zero", O_RDONLY, 0666); | 46 | if (two_pages != (char *)(-1) |
| 50 | if (fd >= 0) | 47 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) |
| 51 | # endif | 48 | fence = two_pages + pagesize; |
| 52 | { | 49 | } |
| 53 | long int pagesize = sysconf (_SC_PAGESIZE); | ||
| 54 | char *two_pages = | ||
| 55 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | ||
| 56 | flags, fd, 0); | ||
| 57 | if (two_pages != (char *)(-1) | ||
| 58 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | ||
| 59 | fence = two_pages + pagesize; | ||
| 60 | } | ||
| 61 | #endif | 50 | #endif |
| 62 | if (fence) | 51 | if (fence) |
| 63 | { | 52 | { |
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4 index 69c8a89f..3344e3f7 100644 --- a/gl/m4/minmax.m4 +++ b/gl/m4/minmax.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # minmax.m4 | 1 | # minmax.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4 index eca6c4d8..fa32d138 100644 --- a/gl/m4/mktime.m4 +++ b/gl/m4/mktime.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mktime.m4 | 1 | # mktime.m4 |
| 2 | # serial 42 | 2 | # serial 43 |
| 3 | dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2002-2003, 2005-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -113,22 +113,6 @@ mktime_test (time_t now) | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static int | 115 | static int |
| 116 | irix_6_4_bug () | ||
| 117 | { | ||
| 118 | /* Based on code from Ariel Faigon. */ | ||
| 119 | struct tm tm; | ||
| 120 | tm.tm_year = 96; | ||
| 121 | tm.tm_mon = 3; | ||
| 122 | tm.tm_mday = 0; | ||
| 123 | tm.tm_hour = 0; | ||
| 124 | tm.tm_min = 0; | ||
| 125 | tm.tm_sec = 0; | ||
| 126 | tm.tm_isdst = -1; | ||
| 127 | mktime (&tm); | ||
| 128 | return tm.tm_mon == 2 && tm.tm_mday == 31; | ||
| 129 | } | ||
| 130 | |||
| 131 | static int | ||
| 132 | bigtime_test (int j) | 116 | bigtime_test (int j) |
| 133 | { | 117 | { |
| 134 | struct tm tm; | 118 | struct tm tm; |
| @@ -255,12 +239,10 @@ main () | |||
| 255 | if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) | 239 | if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) |
| 256 | result |= 8; | 240 | result |= 8; |
| 257 | } | 241 | } |
| 258 | if (! irix_6_4_bug ()) | ||
| 259 | result |= 16; | ||
| 260 | if (! spring_forward_gap ()) | 242 | if (! spring_forward_gap ()) |
| 261 | result |= 32; | 243 | result |= 16; |
| 262 | if (! year_2050_test () || ! indiana_test ()) | 244 | if (! year_2050_test () || ! indiana_test ()) |
| 263 | result |= 64; | 245 | result |= 32; |
| 264 | return result; | 246 | return result; |
| 265 | }]])], | 247 | }]])], |
| 266 | [gl_cv_func_working_mktime=yes], | 248 | [gl_cv_func_working_mktime=yes], |
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4 index 3f7a6656..b5e323d4 100644 --- a/gl/m4/mmap-anon.m4 +++ b/gl/m4/mmap-anon.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mmap-anon.m4 | 1 | # mmap-anon.m4 |
| 2 | # serial 12 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -8,12 +8,10 @@ dnl This file is offered as-is, without any warranty. | |||
| 8 | 8 | ||
| 9 | # Detect how mmap can be used to create anonymous (not file-backed) memory | 9 | # Detect how mmap can be used to create anonymous (not file-backed) memory |
| 10 | # mappings. | 10 | # mappings. |
| 11 | # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS | 11 | # - On Linux, AIX, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS and |
| 12 | # and MAP_ANON exist and have the same value. | 12 | # MAP_ANON exist and have the same value. |
| 13 | # - On HP-UX, only MAP_ANONYMOUS exists. | 13 | # - On HP-UX, only MAP_ANONYMOUS exists. |
| 14 | # - On Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, only MAP_ANON exists. | 14 | # - On Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, only MAP_ANON exists. |
| 15 | # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be | ||
| 16 | # used. | ||
| 17 | 15 | ||
| 18 | AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON], | 16 | AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON], |
| 19 | [ | 17 | [ |
| @@ -23,11 +21,13 @@ AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON], | |||
| 23 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | 21 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it |
| 24 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | 22 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is |
| 25 | # irrelevant for anonymous mappings. | 23 | # irrelevant for anonymous mappings. |
| 26 | AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) | 24 | # Instead, assume that mmap() exists if and only if <sys/mman.h> exists. |
| 25 | # Code needs to tests HAVE_SYS_MMAN_H, not HAVE_MMAP. | ||
| 26 | AC_CHECK_HEADERS_ONCE([sys/mman.h]) | ||
| 27 | 27 | ||
| 28 | # Try to allow MAP_ANONYMOUS. | 28 | # Try to allow MAP_ANONYMOUS. |
| 29 | gl_have_mmap_anonymous=no | 29 | gl_have_mmap_anonymous=no |
| 30 | if test $gl_have_mmap = yes; then | 30 | if test $ac_cv_header_sys_mman_h = yes; then |
| 31 | AC_MSG_CHECKING([for MAP_ANONYMOUS]) | 31 | AC_MSG_CHECKING([for MAP_ANONYMOUS]) |
| 32 | AC_EGREP_CPP([I cannot identify this map], [ | 32 | AC_EGREP_CPP([I cannot identify this map], [ |
| 33 | #include <sys/mman.h> | 33 | #include <sys/mman.h> |
| @@ -48,10 +48,5 @@ AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON], | |||
| 48 | gl_have_mmap_anonymous=yes]) | 48 | gl_have_mmap_anonymous=yes]) |
| 49 | fi | 49 | fi |
| 50 | AC_MSG_RESULT([$gl_have_mmap_anonymous]) | 50 | AC_MSG_RESULT([$gl_have_mmap_anonymous]) |
| 51 | if test $gl_have_mmap_anonymous = yes; then | ||
| 52 | AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], | ||
| 53 | [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including | ||
| 54 | config.h and <sys/mman.h>.]) | ||
| 55 | fi | ||
| 56 | fi | 51 | fi |
| 57 | ]) | 52 | ]) |
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4 index 7dae201b..4621813d 100644 --- a/gl/m4/mode_t.m4 +++ b/gl/m4/mode_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mode_t.m4 | 1 | # mode_t.m4 |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4 index e7eac2e9..311e00b2 100644 --- a/gl/m4/mountlist.m4 +++ b/gl/m4/mountlist.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # mountlist.m4 | 1 | # mountlist.m4 |
| 2 | # serial 18 | 2 | # serial 20 |
| 3 | dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -75,7 +75,7 @@ $ac_includes_default | |||
| 75 | # Determine whether it's the one-argument variant or the two-argument one. | 75 | # Determine whether it's the one-argument variant or the two-argument one. |
| 76 | 76 | ||
| 77 | if test -z "$ac_list_mounted_fs"; then | 77 | if test -z "$ac_list_mounted_fs"; then |
| 78 | # glibc, HP-UX, IRIX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS. | 78 | # glibc, HP-UX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS. |
| 79 | AC_CACHE_CHECK([for one-argument getmntent function], | 79 | AC_CACHE_CHECK([for one-argument getmntent function], |
| 80 | [fu_cv_sys_mounted_getmntent1], | 80 | [fu_cv_sys_mounted_getmntent1], |
| 81 | [AC_COMPILE_IFELSE( | 81 | [AC_COMPILE_IFELSE( |
| @@ -107,7 +107,7 @@ $ac_includes_default | |||
| 107 | AC_DEFINE([MOUNTED_GETMNTENT1], [1], | 107 | AC_DEFINE([MOUNTED_GETMNTENT1], [1], |
| 108 | [Define if there is a function named getmntent for reading the list | 108 | [Define if there is a function named getmntent for reading the list |
| 109 | of mounted file systems, and that function takes a single argument. | 109 | of mounted file systems, and that function takes a single argument. |
| 110 | (4.3BSD, SunOS, HP-UX, Irix)]) | 110 | (4.3BSD, SunOS, HP-UX)]) |
| 111 | gl_CHECK_FUNCS_ANDROID([setmntent], | 111 | gl_CHECK_FUNCS_ANDROID([setmntent], |
| 112 | [[#include <stdio.h> | 112 | [[#include <stdio.h> |
| 113 | #include <mntent.h> | 113 | #include <mntent.h> |
| @@ -159,7 +159,7 @@ $ac_includes_default | |||
| 159 | fi | 159 | fi |
| 160 | 160 | ||
| 161 | if test -z "$ac_list_mounted_fs"; then | 161 | if test -z "$ac_list_mounted_fs"; then |
| 162 | # OSF/1, also (obsolete) Apple Darwin 1.3. | 162 | # (obsolete) Apple Darwin 1.3. |
| 163 | # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h | 163 | # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h |
| 164 | 164 | ||
| 165 | AC_CACHE_CHECK([for getfsstat function], | 165 | AC_CACHE_CHECK([for getfsstat function], |
| @@ -185,7 +185,7 @@ $getfsstat_includes | |||
| 185 | ac_list_mounted_fs=found | 185 | ac_list_mounted_fs=found |
| 186 | AC_DEFINE([MOUNTED_GETFSSTAT], [1], | 186 | AC_DEFINE([MOUNTED_GETFSSTAT], [1], |
| 187 | [Define if there is a function named getfsstat for reading the | 187 | [Define if there is a function named getfsstat for reading the |
| 188 | list of mounted file systems. (DEC Alpha running OSF/1)]) | 188 | list of mounted file systems. (obsolete Darwin)]) |
| 189 | fi | 189 | fi |
| 190 | fi | 190 | fi |
| 191 | 191 | ||
| @@ -212,10 +212,9 @@ $getfsstat_includes | |||
| 212 | 212 | ||
| 213 | if test -z "$ac_list_mounted_fs"; then | 213 | if test -z "$ac_list_mounted_fs"; then |
| 214 | # Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, also (obsolete) 4.4BSD. | 214 | # Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, also (obsolete) 4.4BSD. |
| 215 | # OSF/1 also has getmntinfo but is already handled above. | ||
| 216 | # We cannot use AC_CHECK_FUNCS([getmntinfo]) here, because at the linker | 215 | # We cannot use AC_CHECK_FUNCS([getmntinfo]) here, because at the linker |
| 217 | # level the function is sometimes called getmntinfo64 or getmntinfo$INODE64 | 216 | # level the function is sometimes called getmntinfo64 or getmntinfo$INODE64 |
| 218 | # on Mac OS X, __getmntinfo13 on NetBSD and Minix, _F64_getmntinfo on OSF/1. | 217 | # on Mac OS X, __getmntinfo13 on NetBSD and Minix. |
| 219 | AC_CACHE_CHECK([for getmntinfo function], | 218 | AC_CACHE_CHECK([for getmntinfo function], |
| 220 | [fu_cv_sys_mounted_getmntinfo], | 219 | [fu_cv_sys_mounted_getmntinfo], |
| 221 | [AC_LINK_IFELSE( | 220 | [AC_LINK_IFELSE( |
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 index bfbb983b..565c0d3a 100644 --- a/gl/m4/msvc-inval.m4 +++ b/gl/m4/msvc-inval.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # msvc-inval.m4 | 1 | # msvc-inval.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 index 6a470971..1c2b491e 100644 --- a/gl/m4/msvc-nothrow.m4 +++ b/gl/m4/msvc-nothrow.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # msvc-nothrow.m4 | 1 | # msvc-nothrow.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 index 817f01f1..4fb642b7 100644 --- a/gl/m4/multiarch.m4 +++ b/gl/m4/multiarch.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # multiarch.m4 | 1 | # multiarch.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/musl.m4 b/gl/m4/musl.m4 index 6ff778cb..15b34466 100644 --- a/gl/m4/musl.m4 +++ b/gl/m4/musl.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # musl.m4 | 1 | # musl.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4 index 88512546..bcf19b01 100644 --- a/gl/m4/netdb_h.m4 +++ b/gl/m4/netdb_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # netdb_h.m4 | 1 | # netdb_h.m4 |
| 2 | # serial 15 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4 index b56e354c..6d9eaf97 100644 --- a/gl/m4/netinet_in_h.m4 +++ b/gl/m4/netinet_in_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # netinet_in_h.m4 | 1 | # netinet_in_h.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4 index 9b1e0f32..a3ec57f7 100644 --- a/gl/m4/nl_langinfo.m4 +++ b/gl/m4/nl_langinfo.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # nl_langinfo.m4 | 1 | # nl_langinfo.m4 |
| 2 | # serial 12.1 | 2 | # serial 14 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -16,31 +16,6 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], | |||
| 16 | AC_REQUIRE([gl_PTHREADLIB]) | 16 | AC_REQUIRE([gl_PTHREADLIB]) |
| 17 | AC_CHECK_HEADERS_ONCE([threads.h]) | 17 | AC_CHECK_HEADERS_ONCE([threads.h]) |
| 18 | if test $ac_cv_func_nl_langinfo = yes; then | 18 | if test $ac_cv_func_nl_langinfo = yes; then |
| 19 | # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. | ||
| 20 | AC_CACHE_CHECK([whether YESEXPR works], | ||
| 21 | [gl_cv_func_nl_langinfo_yesexpr_works], | ||
| 22 | [AC_RUN_IFELSE( | ||
| 23 | [AC_LANG_PROGRAM([[#include <langinfo.h> | ||
| 24 | ]], [[return !*nl_langinfo(YESEXPR); | ||
| 25 | ]])], | ||
| 26 | [gl_cv_func_nl_langinfo_yesexpr_works=yes], | ||
| 27 | [gl_cv_func_nl_langinfo_yesexpr_works=no], | ||
| 28 | [ | ||
| 29 | case "$host_os" in | ||
| 30 | # Guess no on irix systems. | ||
| 31 | irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; | ||
| 32 | # Guess yes elsewhere. | ||
| 33 | *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; | ||
| 34 | esac | ||
| 35 | ]) | ||
| 36 | ]) | ||
| 37 | case $gl_cv_func_nl_langinfo_yesexpr_works in | ||
| 38 | *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; | ||
| 39 | *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; | ||
| 40 | esac | ||
| 41 | AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], | ||
| 42 | [$FUNC_NL_LANGINFO_YESEXPR_WORKS], | ||
| 43 | [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) | ||
| 44 | # On macOS 26, Solaris 10, and Solaris 11.3, nl_langinfo is not | 19 | # On macOS 26, Solaris 10, and Solaris 11.3, nl_langinfo is not |
| 45 | # multithread-safe. | 20 | # multithread-safe. |
| 46 | case "$host_os" in | 21 | case "$host_os" in |
| @@ -50,11 +25,9 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], | |||
| 50 | AC_DEFINE_UNQUOTED([NL_LANGINFO_MTSAFE], [$NL_LANGINFO_MTSAFE], | 25 | AC_DEFINE_UNQUOTED([NL_LANGINFO_MTSAFE], [$NL_LANGINFO_MTSAFE], |
| 51 | [Define to 1 if nl_langinfo is multithread-safe.]) | 26 | [Define to 1 if nl_langinfo is multithread-safe.]) |
| 52 | if test $HAVE_LANGINFO_CODESET = 1 \ | 27 | if test $HAVE_LANGINFO_CODESET = 1 \ |
| 53 | && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \ | ||
| 54 | && test $HAVE_LANGINFO_ALTMON = 1 \ | 28 | && test $HAVE_LANGINFO_ALTMON = 1 \ |
| 55 | && test $HAVE_LANGINFO_ABALTMON = 1 \ | 29 | && test $HAVE_LANGINFO_ABALTMON = 1 \ |
| 56 | && test $HAVE_LANGINFO_ERA = 1 \ | 30 | && test $HAVE_LANGINFO_ERA = 1 \ |
| 57 | && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \ | ||
| 58 | && test $NL_LANGINFO_MTSAFE = 1; then | 31 | && test $NL_LANGINFO_MTSAFE = 1; then |
| 59 | : | 32 | : |
| 60 | else | 33 | else |
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 index 662fb049..5c1af8c7 100644 --- a/gl/m4/nocrash.m4 +++ b/gl/m4/nocrash.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # nocrash.m4 | 1 | # nocrash.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/off64_t.m4 b/gl/m4/off64_t.m4 index 963d53e9..93d9e37b 100644 --- a/gl/m4/off64_t.m4 +++ b/gl/m4/off64_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # off64_t.m4 | 1 | # off64_t.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4 index f4f4bbf6..d7d6aa0c 100644 --- a/gl/m4/off_t.m4 +++ b/gl/m4/off_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # off_t.m4 | 1 | # off_t.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/once.m4 b/gl/m4/once.m4 index 7876a8fe..a478d81a 100644 --- a/gl/m4/once.m4 +++ b/gl/m4/once.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # once.m4 | 1 | # once.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4 index 860541b0..9c9aef23 100644 --- a/gl/m4/open-cloexec.m4 +++ b/gl/m4/open-cloexec.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # open-cloexec.m4 | 1 | # open-cloexec.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright 2017-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2017-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4 index 2cba48fe..c36bdced 100644 --- a/gl/m4/open-slash.m4 +++ b/gl/m4/open-slash.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # open-slash.m4 | 1 | # open-slash.m4 |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4 index dd3a805f..f5b2a91c 100644 --- a/gl/m4/open.m4 +++ b/gl/m4/open.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # open.m4 | 1 | # open.m4 |
| 2 | # serial 17 | 2 | # serial 17 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4 index 0c3925df..d6bdf43e 100644 --- a/gl/m4/pathmax.m4 +++ b/gl/m4/pathmax.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pathmax.m4 | 1 | # pathmax.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2002-2003, 2005-2006, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2002-2003, 2005-2006, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/pid_t.m4 b/gl/m4/pid_t.m4 index a8bdabc2..314792ed 100644 --- a/gl/m4/pid_t.m4 +++ b/gl/m4/pid_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pid_t.m4 | 1 | # pid_t.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index 4619a402..0de493b6 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # printf.m4 | 1 | # printf.m4 |
| 2 | # serial 96 | 2 | # serial 98 |
| 3 | dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -659,7 +659,7 @@ int main () | |||
| 659 | && strcmp (buf, "0x8.0p-2") != 0)) | 659 | && strcmp (buf, "0x8.0p-2") != 0)) |
| 660 | result |= 16; | 660 | result |= 16; |
| 661 | /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a | 661 | /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a |
| 662 | glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908> | 662 | glibc 2.4 bug <https://sourceware.org/PR2908> |
| 663 | and a FreeBSD 6.4, NetBSD 10.0 bug. */ | 663 | and a FreeBSD 6.4, NetBSD 10.0 bug. */ |
| 664 | if (sprintf (buf, "%.1La", 1.999L) < 0 | 664 | if (sprintf (buf, "%.1La", 1.999L) < 0 |
| 665 | || (strcmp (buf, "0x1.0p+1") != 0 | 665 | || (strcmp (buf, "0x1.0p+1") != 0 |
| @@ -937,7 +937,7 @@ int main () | |||
| 937 | _CrtSetReportMode (_CRT_ASSERT, 0); | 937 | _CrtSetReportMode (_CRT_ASSERT, 0); |
| 938 | #endif | 938 | #endif |
| 939 | signal (SIGABRT, abort_handler); | 939 | signal (SIGABRT, abort_handler); |
| 940 | /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) | 940 | /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE >= 2) |
| 941 | support %n in format strings in read-only memory but not in writable | 941 | support %n in format strings in read-only memory but not in writable |
| 942 | memory. */ | 942 | memory. */ |
| 943 | strcpy (fmtstring, "%d %n"); | 943 | strcpy (fmtstring, "%d %n"); |
| @@ -994,7 +994,7 @@ int main () | |||
| 994 | int result = 0; | 994 | int result = 0; |
| 995 | char buf[100]; | 995 | char buf[100]; |
| 996 | /* Test whether %ls works at all. | 996 | /* Test whether %ls works at all. |
| 997 | This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on | 997 | This test fails on OpenBSD 4.0, Solaris 2.6, Haiku, but not on |
| 998 | Cygwin 1.5. */ | 998 | Cygwin 1.5. */ |
| 999 | { | 999 | { |
| 1000 | static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; | 1000 | static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; |
| @@ -1003,8 +1003,8 @@ int main () | |||
| 1003 | || strcmp (buf, "abc") != 0) | 1003 | || strcmp (buf, "abc") != 0) |
| 1004 | result |= 1; | 1004 | result |= 1; |
| 1005 | } | 1005 | } |
| 1006 | /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an | 1006 | /* This test fails on Solaris 2.6, Cygwin 1.5, Haiku (with an assertion |
| 1007 | assertion failure inside libc), but not on OpenBSD 4.0. */ | 1007 | failure inside libc), but not on OpenBSD 4.0. */ |
| 1008 | { | 1008 | { |
| 1009 | static const wchar_t wstring[] = { 'a', 0 }; | 1009 | static const wchar_t wstring[] = { 'a', 0 }; |
| 1010 | buf[0] = '\0'; | 1010 | buf[0] = '\0'; |
| @@ -1037,7 +1037,6 @@ changequote(,)dnl | |||
| 1037 | # Guess yes on OpenBSD >= 6.0. | 1037 | # Guess yes on OpenBSD >= 6.0. |
| 1038 | openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";; | 1038 | openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";; |
| 1039 | openbsd*) gl_cv_func_printf_directive_ls="guessing yes";; | 1039 | openbsd*) gl_cv_func_printf_directive_ls="guessing yes";; |
| 1040 | irix*) gl_cv_func_printf_directive_ls="guessing no";; | ||
| 1041 | solaris*) gl_cv_func_printf_directive_ls="guessing no";; | 1040 | solaris*) gl_cv_func_printf_directive_ls="guessing no";; |
| 1042 | cygwin*) gl_cv_func_printf_directive_ls="guessing no";; | 1041 | cygwin*) gl_cv_func_printf_directive_ls="guessing no";; |
| 1043 | beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; | 1042 | beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; |
| @@ -1589,10 +1588,6 @@ changequote(,)dnl | |||
| 1589 | *) gl_cv_func_printf_enomem="guessing no";; | 1588 | *) gl_cv_func_printf_enomem="guessing no";; |
| 1590 | esac | 1589 | esac |
| 1591 | ;; | 1590 | ;; |
| 1592 | # Guess yes on IRIX. | ||
| 1593 | irix*) gl_cv_func_printf_enomem="guessing yes";; | ||
| 1594 | # Guess yes on OSF/1. | ||
| 1595 | osf*) gl_cv_func_printf_enomem="guessing yes";; | ||
| 1596 | # Guess yes on BeOS. | 1591 | # Guess yes on BeOS. |
| 1597 | beos*) gl_cv_func_printf_enomem="guessing yes";; | 1592 | beos*) gl_cv_func_printf_enomem="guessing yes";; |
| 1598 | # Guess yes on Haiku. | 1593 | # Guess yes on Haiku. |
| @@ -1684,11 +1679,6 @@ changequote(,)dnl | |||
| 1684 | # Guess yes on HP-UX >= 11. | 1679 | # Guess yes on HP-UX >= 11. |
| 1685 | hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; | 1680 | hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; |
| 1686 | hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; | 1681 | hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; |
| 1687 | # Guess yes on IRIX >= 6.5. | ||
| 1688 | irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; | ||
| 1689 | # Guess yes on OSF/1 >= 5. | ||
| 1690 | osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; | ||
| 1691 | osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; | ||
| 1692 | # Guess yes on NetBSD >= 3. | 1682 | # Guess yes on NetBSD >= 3. |
| 1693 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) | 1683 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) |
| 1694 | gl_cv_func_snprintf_truncation_c99="guessing no";; | 1684 | gl_cv_func_snprintf_truncation_c99="guessing no";; |
| @@ -1710,7 +1700,7 @@ changequote([,])dnl | |||
| 1710 | dnl Test whether the return value of the snprintf function is the number | 1700 | dnl Test whether the return value of the snprintf function is the number |
| 1711 | dnl of bytes (excluding the terminating NUL) that would have been produced | 1701 | dnl of bytes (excluding the terminating NUL) that would have been produced |
| 1712 | dnl if the buffer had been large enough. (ISO C99, POSIX:2001) | 1702 | dnl if the buffer had been large enough. (ISO C99, POSIX:2001) |
| 1713 | dnl For example, this test program fails on IRIX 6.5: | 1703 | dnl For example, this test program fails on HP-UX 11.31 and Solaris 9: |
| 1714 | dnl --------------------------------------------------------------------- | 1704 | dnl --------------------------------------------------------------------- |
| 1715 | dnl #include <stdio.h> | 1705 | dnl #include <stdio.h> |
| 1716 | dnl int main() | 1706 | dnl int main() |
| @@ -1859,7 +1849,7 @@ int main () | |||
| 1859 | { | 1849 | { |
| 1860 | int count = -1; | 1850 | int count = -1; |
| 1861 | signal (SIGABRT, abort_handler); | 1851 | signal (SIGABRT, abort_handler); |
| 1862 | /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) | 1852 | /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE >= 2) |
| 1863 | support %n in format strings in read-only memory but not in writable | 1853 | support %n in format strings in read-only memory but not in writable |
| 1864 | memory. */ | 1854 | memory. */ |
| 1865 | strcpy (fmtstring, "%d %n"); | 1855 | strcpy (fmtstring, "%d %n"); |
| @@ -1899,11 +1889,6 @@ changequote(,)dnl | |||
| 1899 | # Guess yes on AIX >= 4. | 1889 | # Guess yes on AIX >= 4. |
| 1900 | aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; | 1890 | aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; |
| 1901 | aix*) gl_cv_func_snprintf_directive_n="guessing yes";; | 1891 | aix*) gl_cv_func_snprintf_directive_n="guessing yes";; |
| 1902 | # Guess yes on IRIX >= 6.5. | ||
| 1903 | irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; | ||
| 1904 | # Guess yes on OSF/1 >= 5. | ||
| 1905 | osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; | ||
| 1906 | osf*) gl_cv_func_snprintf_directive_n="guessing yes";; | ||
| 1907 | # Guess yes on NetBSD >= 3. | 1892 | # Guess yes on NetBSD >= 3. |
| 1908 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) | 1893 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) |
| 1909 | gl_cv_func_snprintf_directive_n="guessing no";; | 1894 | gl_cv_func_snprintf_directive_n="guessing no";; |
| @@ -2058,8 +2043,6 @@ changequote(,)dnl | |||
| 2058 | # Guess yes on AIX >= 4. | 2043 | # Guess yes on AIX >= 4. |
| 2059 | aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; | 2044 | aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; |
| 2060 | aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; | 2045 | aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; |
| 2061 | # Guess yes on IRIX >= 6.5. | ||
| 2062 | irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; | ||
| 2063 | # Guess yes on NetBSD >= 3. | 2046 | # Guess yes on NetBSD >= 3. |
| 2064 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) | 2047 | netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) |
| 2065 | gl_cv_func_vsnprintf_zerosize_c99="guessing no";; | 2048 | gl_cv_func_vsnprintf_zerosize_c99="guessing no";; |
diff --git a/gl/m4/pthread-once.m4 b/gl/m4/pthread-once.m4 index 85549254..9080363d 100644 --- a/gl/m4/pthread-once.m4 +++ b/gl/m4/pthread-once.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pthread-once.m4 | 1 | # pthread-once.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/pthread-spin.m4 b/gl/m4/pthread-spin.m4 index aae2fb3b..17fa3b5e 100644 --- a/gl/m4/pthread-spin.m4 +++ b/gl/m4/pthread-spin.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pthread-spin.m4 | 1 | # pthread-spin.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/pthread_h.m4 b/gl/m4/pthread_h.m4 index bb921386..f01dc3d3 100644 --- a/gl/m4/pthread_h.m4 +++ b/gl/m4/pthread_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pthread_h.m4 | 1 | # pthread_h.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4 index aec9f076..c16c781d 100644 --- a/gl/m4/pthread_rwlock_rdlock.m4 +++ b/gl/m4/pthread_rwlock_rdlock.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # pthread_rwlock_rdlock.m4 | 1 | # pthread_rwlock_rdlock.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2017-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -32,7 +32,7 @@ dnl https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rd | |||
| 32 | dnl but this test verifies the guarantee regardless of TPS and regardless of | 32 | dnl but this test verifies the guarantee regardless of TPS and regardless of |
| 33 | dnl scheduling policy. | 33 | dnl scheduling policy. |
| 34 | dnl Glibc does not provide this guarantee (and never will on Linux), see | 34 | dnl Glibc does not provide this guarantee (and never will on Linux), see |
| 35 | dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701 | 35 | dnl https://sourceware.org/PR13701 |
| 36 | dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 | 36 | dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 |
| 37 | AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], | 37 | AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], |
| 38 | [ | 38 | [ |
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 index 67c1476b..8938db92 100644 --- a/gl/m4/realloc.m4 +++ b/gl/m4/realloc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # realloc.m4 | 1 | # realloc.m4 |
| 2 | # serial 39.1 | 2 | # serial 40 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4 index 3970d9e1..e789967c 100644 --- a/gl/m4/reallocarray.m4 +++ b/gl/m4/reallocarray.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # reallocarray.m4 | 1 | # reallocarray.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2017-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4 index 49a8059f..45a10490 100644 --- a/gl/m4/regex.m4 +++ b/gl/m4/regex.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # regex.m4 | 1 | # regex.m4 |
| 2 | # serial 81 | 2 | # serial 81 |
| 3 | dnl Copyright (C) 1996-2001, 2003-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1996-2001, 2003-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/sched_h.m4 b/gl/m4/sched_h.m4 index 1ffd465f..92ebe1b7 100644 --- a/gl/m4/sched_h.m4 +++ b/gl/m4/sched_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sched_h.m4 | 1 | # sched_h.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4 index ba6ebd1d..97bcad0f 100644 --- a/gl/m4/servent.m4 +++ b/gl/m4/servent.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # servent.m4 | 1 | # servent.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4 index 727e35af..5faf28d2 100644 --- a/gl/m4/setenv.m4 +++ b/gl/m4/setenv.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # setenv.m4 | 1 | # setenv.m4 |
| 2 | # serial 35 | 2 | # serial 36 |
| 3 | dnl Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -85,8 +85,6 @@ AC_DEFUN([gl_FUNC_UNSETENV], | |||
| 85 | [AC_COMPILE_IFELSE( | 85 | [AC_COMPILE_IFELSE( |
| 86 | [AC_LANG_PROGRAM( | 86 | [AC_LANG_PROGRAM( |
| 87 | [[ | 87 | [[ |
| 88 | #undef _BSD | ||
| 89 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | ||
| 90 | #include <stdlib.h> | 88 | #include <stdlib.h> |
| 91 | extern | 89 | extern |
| 92 | #ifdef __cplusplus | 90 | #ifdef __cplusplus |
diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4 index 3c8b693e..b6727245 100644 --- a/gl/m4/setlocale_null.m4 +++ b/gl/m4/setlocale_null.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # setlocale_null.m4 | 1 | # setlocale_null.m4 |
| 2 | # serial 10 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -32,8 +32,8 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL], | |||
| 32 | [gl_cv_func_setlocale_null_all_mtsafe=yes], | 32 | [gl_cv_func_setlocale_null_all_mtsafe=yes], |
| 33 | [gl_cv_func_setlocale_null_all_mtsafe=no]) | 33 | [gl_cv_func_setlocale_null_all_mtsafe=no]) |
| 34 | ;; | 34 | ;; |
| 35 | # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. | 35 | # Guess yes on glibc, HP-UX, Solaris, native Windows. |
| 36 | *-gnu* | gnu* | hpux* | irix* | solaris* | mingw* | windows*) | 36 | *-gnu* | gnu* | hpux* | solaris* | mingw* | windows*) |
| 37 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; | 37 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; |
| 38 | # If we don't know, obey --enable-cross-guesses. | 38 | # If we don't know, obey --enable-cross-guesses. |
| 39 | *) | 39 | *) |
| @@ -63,8 +63,8 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL], | |||
| 63 | # Guess no on OpenBSD, AIX. | 63 | # Guess no on OpenBSD, AIX. |
| 64 | openbsd* | aix*) | 64 | openbsd* | aix*) |
| 65 | gl_cv_func_setlocale_null_one_mtsafe=no ;; | 65 | gl_cv_func_setlocale_null_one_mtsafe=no ;; |
| 66 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. | 66 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, Solaris, Haiku, Cygwin, native Windows. |
| 67 | *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw* | windows*) | 67 | *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | solaris* | haiku* | cygwin* | mingw* | windows*) |
| 68 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; | 68 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; |
| 69 | # If we don't know, obey --enable-cross-guesses. | 69 | # If we don't know, obey --enable-cross-guesses. |
| 70 | *) | 70 | *) |
diff --git a/gl/m4/sha256.m4 b/gl/m4/sha256.m4 index 30e8deeb..a9bd7857 100644 --- a/gl/m4/sha256.m4 +++ b/gl/m4/sha256.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sha256.m4 | 1 | # sha256.m4 |
| 2 | # serial 8 | 2 | # serial 8 |
| 3 | dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 index b0460d45..b7a5153a 100644 --- a/gl/m4/size_max.m4 +++ b/gl/m4/size_max.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # size_max.m4 | 1 | # size_max.m4 |
| 2 | # serial 12 | 2 | # serial 12 |
| 3 | dnl Copyright (C) 2003, 2005-2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4 index 2c50cee9..6de225c2 100644 --- a/gl/m4/snprintf.m4 +++ b/gl/m4/snprintf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # snprintf.m4 | 1 | # snprintf.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4 index e3509f81..f62ffcfd 100644 --- a/gl/m4/socketlib.m4 +++ b/gl/m4/socketlib.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # socketlib.m4 | 1 | # socketlib.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4 index 54f4dc79..95800d2e 100644 --- a/gl/m4/sockets.m4 +++ b/gl/m4/sockets.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sockets.m4 | 1 | # sockets.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4 index a8ac25b1..e5156511 100644 --- a/gl/m4/socklen.m4 +++ b/gl/m4/socklen.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # socklen.m4 | 1 | # socklen.m4 |
| 2 | # serial 11 | 2 | # serial 13 |
| 3 | dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -11,7 +11,7 @@ dnl From Albert Chin, Windows fixes from Simon Josefsson. | |||
| 11 | dnl Check for socklen_t: historically on BSD it is an int, and in | 11 | dnl Check for socklen_t: historically on BSD it is an int, and in |
| 12 | dnl POSIX 1g it is a type of its own, but some platforms use different | 12 | dnl POSIX 1g it is a type of its own, but some platforms use different |
| 13 | dnl types for the argument to getsockopt, getpeername, etc.: | 13 | dnl types for the argument to getsockopt, getpeername, etc.: |
| 14 | dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. | 14 | dnl HP-UX 10.20, Interix 3.5, BeOS. |
| 15 | dnl So we have to test to find something that will work. | 15 | dnl So we have to test to find something that will work. |
| 16 | 16 | ||
| 17 | AC_DEFUN([gl_TYPE_SOCKLEN_T], | 17 | AC_DEFUN([gl_TYPE_SOCKLEN_T], |
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index 08ce843d..6379766d 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sockpfaf.m4 | 1 | # sockpfaf.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2004, 2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004, 2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 index a2ffd6fc..8710cb72 100644 --- a/gl/m4/ssize_t.m4 +++ b/gl/m4/ssize_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # ssize_t.m4 | 1 | # ssize_t.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2001-2003, 2006, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001-2003, 2006, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4 index 4aa24e7f..10eb1dfa 100644 --- a/gl/m4/stat-time.m4 +++ b/gl/m4/stat-time.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stat-time.m4 | 1 | # stat-time.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2025 Free Software | 3 | dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2026 Free Software |
| 4 | dnl Foundation, Inc. | 4 | dnl Foundation, Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4 index 66876305..3764ec0b 100644 --- a/gl/m4/stat.m4 +++ b/gl/m4/stat.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stat.m4 | 1 | # stat.m4 |
| 2 | # serial 21 | 2 | # serial 21 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/std-gnu11.m4 b/gl/m4/std-gnu11.m4 index 762764e0..0868a43a 100644 --- a/gl/m4/std-gnu11.m4 +++ b/gl/m4/std-gnu11.m4 | |||
| @@ -16,7 +16,7 @@ m4_ifndef([_AC_C_C23_OPTIONS], [ | |||
| 16 | m4_version_prereq([2.70], [], [ | 16 | m4_version_prereq([2.70], [], [ |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | # Copyright (C) 2001-2025 Free Software Foundation, Inc. | 19 | # Copyright (C) 2001-2026 Free Software Foundation, Inc. |
| 20 | 20 | ||
| 21 | # This file is part of Autoconf. This program is free | 21 | # This file is part of Autoconf. This program is free |
| 22 | # software; you can redistribute it and/or modify it under the | 22 | # software; you can redistribute it and/or modify it under the |
| @@ -777,7 +777,7 @@ AC_DEFUN([_AC_CXX_CXX11_TEST_BODY], | |||
| 777 | } | 777 | } |
| 778 | { | 778 | { |
| 779 | // Unicode literals | 779 | // Unicode literals |
| 780 | char const *utf8 = u8"UTF-8 string \u2500"; | 780 | auto const *utf8 = u8"UTF-8 string \u2500"; // This is portable to C++20. |
| 781 | char16_t const *utf16 = u"UTF-8 string \u2500"; | 781 | char16_t const *utf16 = u"UTF-8 string \u2500"; |
| 782 | char32_t const *utf32 = U"UTF-32 string \u2500"; | 782 | char32_t const *utf32 = U"UTF-32 string \u2500"; |
| 783 | } | 783 | } |
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4 index 885feafd..7177d034 100644 --- a/gl/m4/stdalign.m4 +++ b/gl/m4/stdalign.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdalign.m4 | 1 | # stdalign.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -30,7 +30,7 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 30 | 30 | ||
| 31 | /* Test that alignof yields a result consistent with offsetof. | 31 | /* Test that alignof yields a result consistent with offsetof. |
| 32 | This catches GCC bug 52023 | 32 | This catches GCC bug 52023 |
| 33 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ | 33 | <https://gcc.gnu.org/PR52023>. */ |
| 34 | #ifdef __cplusplus | 34 | #ifdef __cplusplus |
| 35 | template <class t> struct alignof_helper { char a; t b; }; | 35 | template <class t> struct alignof_helper { char a; t b; }; |
| 36 | # define ao(type) offsetof (alignof_helper<type>, b) | 36 | # define ao(type) offsetof (alignof_helper<type>, b) |
| @@ -82,8 +82,8 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 82 | 82 | ||
| 83 | References: | 83 | References: |
| 84 | ISO C23 (latest free draft | 84 | ISO C23 (latest free draft |
| 85 | <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>) | 85 | <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf>) |
| 86 | sections 6.5.3.4, 6.7.5, 7.15. | 86 | sections 6.2.8, 6.7.6. |
| 87 | C++11 (latest free draft | 87 | C++11 (latest free draft |
| 88 | <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) | 88 | <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) |
| 89 | section 18.10. */ | 89 | section 18.10. */ |
| @@ -103,7 +103,7 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 103 | want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ | 103 | want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ |
| 104 | 104 | ||
| 105 | /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 | 105 | /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 |
| 106 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. | 106 | <https://gcc.gnu.org/PR52023>. |
| 107 | clang versions < 8.0.0 have the same bug. | 107 | clang versions < 8.0.0 have the same bug. |
| 108 | IBM XL C V16.1.0 cc (non-clang) has the same bug. */ | 108 | IBM XL C V16.1.0 cc (non-clang) has the same bug. */ |
| 109 | # if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ | 109 | # if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ |
diff --git a/gl/m4/stdckdint_h.m4 b/gl/m4/stdckdint_h.m4 index d269faa5..eb8c858a 100644 --- a/gl/m4/stdckdint_h.m4 +++ b/gl/m4/stdckdint_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdckdint_h.m4 | 1 | # stdckdint_h.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright 2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2025-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 index 127ec05b..299472b1 100644 --- a/gl/m4/stddef_h.m4 +++ b/gl/m4/stddef_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stddef_h.m4 | 1 | # stddef_h.m4 |
| 2 | # serial 23 | 2 | # serial 23 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -85,7 +85,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H], | |||
| 85 | dnl Provide gl_unreachable() unconditionally. | 85 | dnl Provide gl_unreachable() unconditionally. |
| 86 | GL_GENERATE_STDDEF_H=true | 86 | GL_GENERATE_STDDEF_H=true |
| 87 | 87 | ||
| 88 | dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869 | 88 | dnl https://gcc.gnu.org/PR114869 |
| 89 | AC_CACHE_CHECK([whether nullptr_t needs <stddef.h>], | 89 | AC_CACHE_CHECK([whether nullptr_t needs <stddef.h>], |
| 90 | [gl_cv_nullptr_t_needs_stddef], | 90 | [gl_cv_nullptr_t_needs_stddef], |
| 91 | [AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[nullptr_t x;]], | 91 | [AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[nullptr_t x;]], |
| @@ -96,7 +96,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H], | |||
| 96 | GL_GENERATE_STDDEF_H=true | 96 | GL_GENERATE_STDDEF_H=true |
| 97 | fi | 97 | fi |
| 98 | 98 | ||
| 99 | dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870 | 99 | dnl https://gcc.gnu.org/PR114870 |
| 100 | dnl affects GCC 13.3 and 14.2. | 100 | dnl affects GCC 13.3 and 14.2. |
| 101 | AC_CACHE_CHECK([whether <stddef.h> is idempotent], | 101 | AC_CACHE_CHECK([whether <stddef.h> is idempotent], |
| 102 | [gl_cv_stddef_idempotent], | 102 | [gl_cv_stddef_idempotent], |
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 index 2d69088b..410da153 100644 --- a/gl/m4/stdint.m4 +++ b/gl/m4/stdint.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdint.m4 | 1 | # stdint.m4 |
| 2 | # serial 64 | 2 | # serial 65 |
| 3 | dnl Copyright (C) 2001-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -391,9 +391,9 @@ AC_DEFUN([gl_STDINT_BITSIZEOF], | |||
| 391 | ]) | 391 | ]) |
| 392 | eval result=\$gl_cv_bitsizeof_${gltype} | 392 | eval result=\$gl_cv_bitsizeof_${gltype} |
| 393 | if test $result = unknown; then | 393 | if test $result = unknown; then |
| 394 | dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, | 394 | dnl Use a nonempty default, because some old compilers do a syntax check |
| 395 | dnl do a syntax check even on unused #if conditions and give an error | 395 | dnl even on unused #if conditions and give an error on valid C code like |
| 396 | dnl on valid C code like this: | 396 | dnl this: |
| 397 | dnl #if 0 | 397 | dnl #if 0 |
| 398 | dnl # if > 32 | 398 | dnl # if > 32 |
| 399 | dnl # endif | 399 | dnl # endif |
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4 index d4f1acdd..7f60af20 100644 --- a/gl/m4/stdint_h.m4 +++ b/gl/m4/stdint_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdint_h.m4 | 1 | # stdint_h.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 71d86180..9d4126f5 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdio_h.m4 | 1 | # stdio_h.m4 |
| 2 | # serial 75 | 2 | # serial 75 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index 2d25da37..f35d6611 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # stdlib_h.m4 | 1 | # stdlib_h.m4 |
| 2 | # serial 84 | 2 | # serial 86 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -205,7 +205,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 205 | HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) | 205 | HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) |
| 206 | HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) | 206 | HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) |
| 207 | HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) | 207 | HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) |
| 208 | HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) | ||
| 209 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) | 208 | HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) |
| 210 | HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY]) | 209 | HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY]) |
| 211 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) | 210 | HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) |
| @@ -224,6 +223,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], | |||
| 224 | HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) | 223 | HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) |
| 225 | HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) | 224 | HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) |
| 226 | HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) | 225 | HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) |
| 226 | HAVE_SYS_PROCESS_H=0; AC_SUBST([HAVE_SYS_PROCESS_H]) | ||
| 227 | HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) | 227 | HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) |
| 228 | HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) | 228 | HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) |
| 229 | REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT]) | 229 | REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT]) |
diff --git a/gl/m4/strcasecmp.m4 b/gl/m4/strcasecmp.m4 index eb4345d9..f9f90928 100644 --- a/gl/m4/strcasecmp.m4 +++ b/gl/m4/strcasecmp.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strcasecmp.m4 | 1 | # strcasecmp.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2002-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4 index eb2862f1..f56eed58 100644 --- a/gl/m4/strcasestr.m4 +++ b/gl/m4/strcasestr.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strcasestr.m4 | 1 | # strcasestr.m4 |
| 2 | # serial 29 | 2 | # serial 29 |
| 3 | dnl Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -22,8 +22,8 @@ AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], | |||
| 22 | if test $REPLACE_MEMCHR = 1; then | 22 | if test $REPLACE_MEMCHR = 1; then |
| 23 | REPLACE_STRCASESTR=1 | 23 | REPLACE_STRCASESTR=1 |
| 24 | else | 24 | else |
| 25 | dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092 | 25 | dnl Detect https://sourceware.org/PR12092 |
| 26 | dnl and https://sourceware.org/bugzilla/show_bug.cgi?id=23637. | 26 | dnl and https://sourceware.org/PR23637. |
| 27 | AC_CACHE_CHECK([whether strcasestr works], | 27 | AC_CACHE_CHECK([whether strcasestr works], |
| 28 | [gl_cv_func_strcasestr_works_always], | 28 | [gl_cv_func_strcasestr_works_always], |
| 29 | [AC_RUN_IFELSE( | 29 | [AC_RUN_IFELSE( |
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 index c8b3b207..9bb60c3f 100644 --- a/gl/m4/strerror.m4 +++ b/gl/m4/strerror.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strerror.m4 | 1 | # strerror.m4 |
| 2 | # serial 25 | 2 | # serial 25 |
| 3 | dnl Copyright (C) 2002, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 index fc73603a..2a6e4db4 100644 --- a/gl/m4/string_h.m4 +++ b/gl/m4/string_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # string_h.m4 | 1 | # string_h.m4 |
| 2 | # serial 44.1 | 2 | # serial 46 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -63,6 +63,7 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS], | |||
| 63 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY]) | 63 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY]) |
| 64 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL]) | 64 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL]) |
| 65 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP]) | 65 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP]) |
| 66 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRINGEQ]) | ||
| 66 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT]) | 67 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT]) |
| 67 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCPY]) | 68 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCPY]) |
| 68 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP]) | 69 | gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP]) |
| @@ -115,6 +116,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS], | |||
| 115 | HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) | 116 | HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) |
| 116 | HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) | 117 | HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) |
| 117 | HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) | 118 | HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) |
| 119 | HAVE_DECL_MEMEQ=0; AC_SUBST([HAVE_DECL_MEMEQ]) | ||
| 118 | HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) | 120 | HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) |
| 119 | HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) | 121 | HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) |
| 120 | HAVE_MEMSET_EXPLICIT=1; AC_SUBST([HAVE_MEMSET_EXPLICIT]) | 122 | HAVE_MEMSET_EXPLICIT=1; AC_SUBST([HAVE_MEMSET_EXPLICIT]) |
| @@ -124,6 +126,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS], | |||
| 124 | HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) | 126 | HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) |
| 125 | HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) | 127 | HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) |
| 126 | HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) | 128 | HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) |
| 129 | HAVE_DECL_STREQ=0; AC_SUBST([HAVE_DECL_STREQ]) | ||
| 127 | HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) | 130 | HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) |
| 128 | HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) | 131 | HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) |
| 129 | HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) | 132 | HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) |
diff --git a/gl/m4/stringeq.m4 b/gl/m4/stringeq.m4 new file mode 100644 index 00000000..ffea8afc --- /dev/null +++ b/gl/m4/stringeq.m4 | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # stringeq.m4 | ||
| 2 | # serial 1 | ||
| 3 | dnl Copyright (C) 2025-2026 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 8 | |||
| 9 | AC_DEFUN([gl_FUNC_STREQ], | ||
| 10 | [ | ||
| 11 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) | ||
| 12 | AC_CHECK_DECLS_ONCE([streq]) | ||
| 13 | if test $ac_cv_have_decl_streq != no; then | ||
| 14 | HAVE_DECL_STREQ=1 | ||
| 15 | fi | ||
| 16 | ]) | ||
| 17 | |||
| 18 | AC_DEFUN([gl_FUNC_MEMEQ], | ||
| 19 | [ | ||
| 20 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) | ||
| 21 | AC_CHECK_DECLS_ONCE([memeq]) | ||
| 22 | if test $ac_cv_have_decl_memeq != no; then | ||
| 23 | HAVE_DECL_MEMEQ=1 | ||
| 24 | fi | ||
| 25 | ]) | ||
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4 index 18f30d4a..aec4f715 100644 --- a/gl/m4/strings_h.m4 +++ b/gl/m4/strings_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strings_h.m4 | 1 | # strings_h.m4 |
| 2 | # serial 14 | 2 | # serial 14 |
| 3 | dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/strncasecmp.m4 b/gl/m4/strncasecmp.m4 index c7c8b240..4314b603 100644 --- a/gl/m4/strncasecmp.m4 +++ b/gl/m4/strncasecmp.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strncasecmp.m4 | 1 | # strncasecmp.m4 |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright (C) 2002-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/strncpy.m4 b/gl/m4/strncpy.m4 index 57876171..b94abede 100644 --- a/gl/m4/strncpy.m4 +++ b/gl/m4/strncpy.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strncpy.m4 | 1 | # strncpy.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2002-2004, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4 index b018ff88..6afd34a9 100644 --- a/gl/m4/strsep.m4 +++ b/gl/m4/strsep.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strsep.m4 | 1 | # strsep.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2002-2004, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/strstr.m4 b/gl/m4/strstr.m4 index 1b5ef6c1..3a9e9c60 100644 --- a/gl/m4/strstr.m4 +++ b/gl/m4/strstr.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # strstr.m4 | 1 | # strstr.m4 |
| 2 | # serial 25 | 2 | # serial 25 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -14,8 +14,8 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], | |||
| 14 | if test $REPLACE_MEMCHR = 1; then | 14 | if test $REPLACE_MEMCHR = 1; then |
| 15 | REPLACE_STRSTR=1 | 15 | REPLACE_STRSTR=1 |
| 16 | else | 16 | else |
| 17 | dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092 | 17 | dnl Detect https://sourceware.org/PR12092 |
| 18 | dnl and https://sourceware.org/bugzilla/show_bug.cgi?id=23637. | 18 | dnl and https://sourceware.org/PR23637. |
| 19 | AC_CACHE_CHECK([whether strstr works], | 19 | AC_CACHE_CHECK([whether strstr works], |
| 20 | [gl_cv_func_strstr_works_always], | 20 | [gl_cv_func_strstr_works_always], |
| 21 | [AC_RUN_IFELSE( | 21 | [AC_RUN_IFELSE( |
diff --git a/gl/m4/sys_cdefs_h.m4 b/gl/m4/sys_cdefs_h.m4 index d72796ca..a1398a29 100644 --- a/gl/m4/sys_cdefs_h.m4 +++ b/gl/m4/sys_cdefs_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc? | 1 | # sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc? |
| 2 | # serial 2 | 2 | # serial 2 |
| 3 | dnl Copyright 2024-2025 Free Software Foundation, Inc. | 3 | dnl Copyright 2024-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 index fb69209b..cdc374e4 100644 --- a/gl/m4/sys_socket_h.m4 +++ b/gl/m4/sys_socket_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sys_socket_h.m4 | 1 | # sys_socket_h.m4 |
| 2 | # serial 31 | 2 | # serial 32 |
| 3 | dnl Copyright (C) 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -13,17 +13,6 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H], | |||
| 13 | AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) | 13 | AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) |
| 14 | AC_REQUIRE([AC_CANONICAL_HOST]) | 14 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| 15 | 15 | ||
| 16 | dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have | ||
| 17 | dnl old-style declarations (with return type 'int' instead of 'ssize_t') | ||
| 18 | dnl unless _POSIX_PII_SOCKET is defined. | ||
| 19 | case "$host_os" in | ||
| 20 | osf*) | ||
| 21 | AC_DEFINE([_POSIX_PII_SOCKET], [1], | ||
| 22 | [Define to 1 in order to get the POSIX compatible declarations | ||
| 23 | of socket functions.]) | ||
| 24 | ;; | ||
| 25 | esac | ||
| 26 | |||
| 27 | GL_GENERATE_SYS_SOCKET_H=false | 16 | GL_GENERATE_SYS_SOCKET_H=false |
| 28 | AC_CACHE_CHECK([whether <sys/socket.h> is self-contained], | 17 | AC_CACHE_CHECK([whether <sys/socket.h> is self-contained], |
| 29 | [gl_cv_header_sys_socket_h_selfcontained], | 18 | [gl_cv_header_sys_socket_h_selfcontained], |
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 index fdcc8954..04dfce7e 100644 --- a/gl/m4/sys_stat_h.m4 +++ b/gl/m4/sys_stat_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sys_stat_h.m4 | 1 | # sys_stat_h.m4 |
| 2 | # serial 42 -*- Autoconf -*- | 2 | # serial 44 -*- Autoconf -*- |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 index e99fdcc6..b284e08e 100644 --- a/gl/m4/sys_types_h.m4 +++ b/gl/m4/sys_types_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sys_types_h.m4 | 1 | # sys_types_h.m4 |
| 2 | # serial 15 | 2 | # serial 15 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4 index eb0e8424..59496e01 100644 --- a/gl/m4/sys_uio_h.m4 +++ b/gl/m4/sys_uio_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # sys_uio_h.m4 | 1 | # sys_uio_h.m4 |
| 2 | # serial 3 | 2 | # serial 3 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4 index 333c8fe0..bdea4b97 100644 --- a/gl/m4/threadlib.m4 +++ b/gl/m4/threadlib.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # threadlib.m4 | 1 | # threadlib.m4 |
| 2 | # serial 45.1 | 2 | # serial 49 |
| 3 | dnl Copyright (C) 2005-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -57,16 +57,6 @@ AC_DEFUN([gl_ANYTHREADLIB_EARLY], | |||
| 57 | [ | 57 | [ |
| 58 | AC_REQUIRE([AC_CANONICAL_HOST]) | 58 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| 59 | if test -z "$gl_anythreadlib_early_done"; then | 59 | if test -z "$gl_anythreadlib_early_done"; then |
| 60 | AS_CASE([$host_os], | ||
| 61 | [osf*], | ||
| 62 | [# On OSF/1, the compiler needs the flag -D_REENTRANT so that it | ||
| 63 | # groks <pthread.h>. cc also understands the flag -pthread, but | ||
| 64 | # we do not use it because 1. gcc-2.95 does not understand -pthread, | ||
| 65 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | ||
| 66 | # causes the AC_LINK_IFELSE test below to succeed unexpectedly, | ||
| 67 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | ||
| 68 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | ||
| 69 | ]) | ||
| 70 | # Some systems optimize for single-threaded programs by default, and | 60 | # Some systems optimize for single-threaded programs by default, and |
| 71 | # need special flags to disable these optimizations. For example, the | 61 | # need special flags to disable these optimizations. For example, the |
| 72 | # definition of errno in <errno.h>. | 62 | # definition of errno in <errno.h>. |
| @@ -190,17 +180,13 @@ AC_DEFUN([gl_PTHREADLIB_BODY], | |||
| 190 | gl_pthread_api=no | 180 | gl_pthread_api=no |
| 191 | LIBPTHREAD= | 181 | LIBPTHREAD= |
| 192 | LIBPMULTITHREAD= | 182 | LIBPMULTITHREAD= |
| 193 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | ||
| 194 | # it groks <pthread.h>. It is added above, in gl_ANYTHREADLIB_EARLY. | ||
| 195 | AC_CHECK_HEADER([pthread.h], | 183 | AC_CHECK_HEADER([pthread.h], |
| 196 | [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) | 184 | [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) |
| 197 | AS_IF([test "$gl_have_pthread_h" = yes], [ | 185 | AS_IF([test "$gl_have_pthread_h" = yes], [ |
| 198 | # Other possible tests: | 186 | # Other possible tests: |
| 199 | # -lpthreads (FSU threads, PCthreads) | 187 | # -lpthreads (FSU threads, PCthreads) |
| 200 | # -lgthreads | 188 | # -lgthreads |
| 201 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | 189 | # Test whether both pthread_mutex_lock exists in libc. |
| 202 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | ||
| 203 | # the second one only in libpthread, and lock.c needs it. | ||
| 204 | # | 190 | # |
| 205 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | 191 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 |
| 206 | # needs -pthread for some reason. See: | 192 | # needs -pthread for some reason. See: |
| @@ -212,10 +198,8 @@ AC_DEFUN([gl_PTHREADLIB_BODY], | |||
| 212 | [AC_LANG_PROGRAM( | 198 | [AC_LANG_PROGRAM( |
| 213 | [[#include <pthread.h> | 199 | [[#include <pthread.h> |
| 214 | pthread_mutex_t m; | 200 | pthread_mutex_t m; |
| 215 | pthread_mutexattr_t ma; | ||
| 216 | ]], | 201 | ]], |
| 217 | [[pthread_mutex_lock (&m); | 202 | [[pthread_mutex_lock (&m);]])], |
| 218 | pthread_mutexattr_init (&ma);]])], | ||
| 219 | [gl_pthread_api=yes | 203 | [gl_pthread_api=yes |
| 220 | LIBPTHREAD=$gl_pthread | 204 | LIBPTHREAD=$gl_pthread |
| 221 | LIBPMULTITHREAD=$gl_pthread]) | 205 | LIBPMULTITHREAD=$gl_pthread]) |
| @@ -244,8 +228,7 @@ AC_DEFUN([gl_PTHREADLIB_BODY], | |||
| 244 | ]) | 228 | ]) |
| 245 | echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD | 229 | echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD |
| 246 | 230 | ||
| 247 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | 231 | # Test for libpthread by looking for pthread_kill. |
| 248 | # since it is defined as a macro on OSF/1.) | ||
| 249 | AS_IF([test $gl_pthread_api = yes && test -z "$LIBPTHREAD"], [ | 232 | AS_IF([test $gl_pthread_api = yes && test -z "$LIBPTHREAD"], [ |
| 250 | # The program links fine without libpthread. But it may actually | 233 | # The program links fine without libpthread. But it may actually |
| 251 | # need to link with libpthread in order to create multiple threads. | 234 | # need to link with libpthread in order to create multiple threads. |
| @@ -451,18 +434,19 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY], | |||
| 451 | dnl gl_use_winpthreads_default defaults to "no", because in mingw 10, like | 434 | dnl gl_use_winpthreads_default defaults to "no", because in mingw 10, like |
| 452 | dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash. | 435 | dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash. |
| 453 | m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no]) | 436 | m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no]) |
| 437 | dnl Don't display the --disable-threads option | ||
| 438 | dnl - if the package builds one or more libraries, because libraries must | ||
| 439 | dnl always be multithread-safe (as far as possible), | ||
| 440 | dnl - if the package defines gl_THREADLIB_DEFAULT_NO, because the option | ||
| 441 | dnl would then be a no-op. | ||
| 454 | AC_ARG_ENABLE([threads], | 442 | AC_ARG_ENABLE([threads], |
| 455 | AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ | 443 | AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([LT_INIT], [], [m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ |
| 456 | AS_HELP_STRING([[--disable-threads]], [build without multithread safety])]), | 444 | AS_HELP_STRING([[--disable-threads]], [build without multithread safety])])]), |
| 457 | [gl_use_threads=$enableval], | 445 | [gl_use_threads=$enableval], |
| 458 | [if test -n "$gl_use_threads_default"; then | 446 | [if test -n "$gl_use_threads_default"; then |
| 459 | gl_use_threads="$gl_use_threads_default" | 447 | gl_use_threads="$gl_use_threads_default" |
| 460 | else | 448 | else |
| 461 | AS_CASE([$host_os], | 449 | AS_CASE([$host_os], |
| 462 | dnl Disable multithreading by default on OSF/1, because it interferes | ||
| 463 | dnl with fork()/exec(): When msgexec is linked with -lpthread, its | ||
| 464 | dnl child process gets an endless segmentation fault inside execvp(). | ||
| 465 | [osf*], [gl_use_threads=no], | ||
| 466 | dnl Disable multithreading by default on Cygwin 1.5.x, because it has | 450 | dnl Disable multithreading by default on Cygwin 1.5.x, because it has |
| 467 | dnl bugs that lead to endless loops or crashes. See | 451 | dnl bugs that lead to endless loops or crashes. See |
| 468 | dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>. | 452 | dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>. |
| @@ -665,13 +649,8 @@ dnl | |||
| 665 | dnl HP-UX 11 posix -lpthread N (cc) OK | 649 | dnl HP-UX 11 posix -lpthread N (cc) OK |
| 666 | dnl Y (gcc) | 650 | dnl Y (gcc) |
| 667 | dnl | 651 | dnl |
| 668 | dnl IRIX 6.5 posix -lpthread Y 0.5 | ||
| 669 | dnl | ||
| 670 | dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK | 652 | dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK |
| 671 | dnl | 653 | dnl |
| 672 | dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK | ||
| 673 | dnl -lpthread (gcc) Y | ||
| 674 | dnl | ||
| 675 | dnl Cygwin posix -lpthread Y OK | 654 | dnl Cygwin posix -lpthread Y OK |
| 676 | dnl | 655 | dnl |
| 677 | dnl Mingw windows N OK | 656 | dnl Mingw windows N OK |
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 index f4d8e20f..8d896ea5 100644 --- a/gl/m4/time_h.m4 +++ b/gl/m4/time_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # time_h.m4 | 1 | # time_h.m4 |
| 2 | # serial 27 | 2 | # serial 27 |
| 3 | dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2000-2001, 2003-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4 index 96f5c5b5..59477e3b 100644 --- a/gl/m4/time_r.m4 +++ b/gl/m4/time_r.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # time_r.m4 | 1 | # time_r.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/timegm.m4 b/gl/m4/timegm.m4 index cb6da6da..50a98b25 100644 --- a/gl/m4/timegm.m4 +++ b/gl/m4/timegm.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # timegm.m4 | 1 | # timegm.m4 |
| 2 | # serial 16 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/uchar_h.m4 b/gl/m4/uchar_h.m4 index b2309385..20b63b6c 100644 --- a/gl/m4/uchar_h.m4 +++ b/gl/m4/uchar_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # uchar_h.m4 | 1 | # uchar_h.m4 |
| 2 | # serial 32 | 2 | # serial 32 |
| 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4 index 969b60e8..299c43f2 100644 --- a/gl/m4/ungetc.m4 +++ b/gl/m4/ungetc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # ungetc.m4 | 1 | # ungetc.m4 |
| 2 | # serial 12 | 2 | # serial 12 |
| 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/unicase_h.m4 b/gl/m4/unicase_h.m4 index bf5d4c2e..71dccf06 100644 --- a/gl/m4/unicase_h.m4 +++ b/gl/m4/unicase_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # unicase_h.m4 | 1 | # unicase_h.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/unictype_h.m4 b/gl/m4/unictype_h.m4 index 68ddaf6c..ba5a3688 100644 --- a/gl/m4/unictype_h.m4 +++ b/gl/m4/unictype_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # unictype_h.m4 | 1 | # unictype_h.m4 |
| 2 | # serial 4 | 2 | # serial 4 |
| 3 | dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/uninorm_h.m4 b/gl/m4/uninorm_h.m4 index d416f73b..5ec9ea67 100644 --- a/gl/m4/uninorm_h.m4 +++ b/gl/m4/uninorm_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # uninorm_h.m4 | 1 | # uninorm_h.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 6ec16286..8000e888 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # unistd_h.m4 | 1 | # unistd_h.m4 |
| 2 | # serial 97 | 2 | # serial 97 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/unitypes_h.m4 b/gl/m4/unitypes_h.m4 index 264e61be..733b9ee2 100644 --- a/gl/m4/unitypes_h.m4 +++ b/gl/m4/unitypes_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # unitypes_h.m4 | 1 | # unitypes_h.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2021-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2021-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/unlocked-io.m4 b/gl/m4/unlocked-io.m4 index 97f43f4b..16ab6e9a 100644 --- a/gl/m4/unlocked-io.m4 +++ b/gl/m4/unlocked-io.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # unlocked-io.m4 | 1 | # unlocked-io.m4 |
| 2 | # serial 16 | 2 | # serial 17 |
| 3 | dnl Copyright (C) 1998-2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 1998-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], | |||
| 25 | AC_CHECK_DECLS_ONCE([ferror_unlocked]) | 25 | AC_CHECK_DECLS_ONCE([ferror_unlocked]) |
| 26 | AC_CHECK_DECLS_ONCE([fflush_unlocked]) | 26 | AC_CHECK_DECLS_ONCE([fflush_unlocked]) |
| 27 | AC_CHECK_DECLS_ONCE([fgets_unlocked]) | 27 | AC_CHECK_DECLS_ONCE([fgets_unlocked]) |
| 28 | AC_CHECK_DECLS_ONCE([fileno_unlocked]) | ||
| 28 | AC_CHECK_DECLS_ONCE([fputc_unlocked]) | 29 | AC_CHECK_DECLS_ONCE([fputc_unlocked]) |
| 29 | AC_CHECK_DECLS_ONCE([fputs_unlocked]) | 30 | AC_CHECK_DECLS_ONCE([fputs_unlocked]) |
| 30 | AC_CHECK_DECLS_ONCE([fread_unlocked]) | 31 | AC_CHECK_DECLS_ONCE([fread_unlocked]) |
diff --git a/gl/m4/vararrays.m4 b/gl/m4/vararrays.m4 index 086e409f..3dd8e68f 100644 --- a/gl/m4/vararrays.m4 +++ b/gl/m4/vararrays.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # vararrays.m4 | 1 | # vararrays.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2001, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 index 1d040d6e..4e01fbc9 100644 --- a/gl/m4/vasnprintf.m4 +++ b/gl/m4/vasnprintf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # vasnprintf.m4 | 1 | # vasnprintf.m4 |
| 2 | # serial 56 | 2 | # serial 56 |
| 3 | dnl Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4 index 6ea602bd..3e6913e2 100644 --- a/gl/m4/vasprintf.m4 +++ b/gl/m4/vasprintf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # vasprintf.m4 | 1 | # vasprintf.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2002-2003, 2006-2007, 2009-2025 Free Software Foundation, | 3 | dnl Copyright (C) 2002-2003, 2006-2007, 2009-2026 Free Software Foundation, |
| 4 | dnl Inc. | 4 | dnl Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| 6 | dnl gives unlimited permission to copy and/or distribute it, | 6 | dnl gives unlimited permission to copy and/or distribute it, |
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4 index c2cd38d0..55ceb672 100644 --- a/gl/m4/visibility.m4 +++ b/gl/m4/visibility.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # visibility.m4 | 1 | # visibility.m4 |
| 2 | # serial 9 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2005, 2008, 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2005, 2008, 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4 index 68ab757d..df767486 100644 --- a/gl/m4/vsnprintf.m4 +++ b/gl/m4/vsnprintf.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # vsnprintf.m4 | 1 | # vsnprintf.m4 |
| 2 | # serial 7 | 2 | # serial 7 |
| 3 | dnl Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2004, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 index 73cf16fb..3765368c 100644 --- a/gl/m4/warn-on-use.m4 +++ b/gl/m4/warn-on-use.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # warn-on-use.m4 | 1 | # warn-on-use.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2010-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4 index 722fcfc2..42338a00 100644 --- a/gl/m4/wchar_h.m4 +++ b/gl/m4/wchar_h.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # wchar_h.m4 | 1 | # wchar_h.m4 |
| 2 | # serial 65 | 2 | # serial 66 |
| 3 | dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -65,8 +65,8 @@ dnl Check whether <wchar.h> is usable at all. | |||
| 65 | AC_DEFUN([gl_WCHAR_H_INLINE_OK], | 65 | AC_DEFUN([gl_WCHAR_H_INLINE_OK], |
| 66 | [ | 66 | [ |
| 67 | dnl Test whether <wchar.h> suffers due to the transition from '__inline' to | 67 | dnl Test whether <wchar.h> suffers due to the transition from '__inline' to |
| 68 | dnl 'gnu_inline'. See <https://sourceware.org/bugzilla/show_bug.cgi?id=4022> | 68 | dnl 'gnu_inline'. See <https://sourceware.org/PR4022> |
| 69 | dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary, | 69 | dnl and <https://gcc.gnu.org/PR42440>. In summary, |
| 70 | dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and | 70 | dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and |
| 71 | dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>. | 71 | dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>. |
| 72 | AC_REQUIRE([AC_CANONICAL_HOST]) | 72 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| @@ -239,7 +239,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], | |||
| 239 | HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) | 239 | HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) |
| 240 | HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) | 240 | HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) |
| 241 | HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) | 241 | HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) |
| 242 | HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) | 242 | HAVE_WCTOB=1; AC_SUBST([HAVE_WCTOB]) |
| 243 | HAVE_DECL_WCSDUP=1; AC_SUBST([HAVE_DECL_WCSDUP]) | 243 | HAVE_DECL_WCSDUP=1; AC_SUBST([HAVE_DECL_WCSDUP]) |
| 244 | HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) | 244 | HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) |
| 245 | REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) | 245 | REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) |
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4 index 91530176..a69f17c4 100644 --- a/gl/m4/wcrtomb.m4 +++ b/gl/m4/wcrtomb.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # wcrtomb.m4 | 1 | # wcrtomb.m4 |
| 2 | # serial 21 | 2 | # serial 22 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_WCRTOMB], | |||
| 33 | dnl fi | 33 | dnl fi |
| 34 | if test $REPLACE_WCRTOMB = 0; then | 34 | if test $REPLACE_WCRTOMB = 0; then |
| 35 | dnl On Android 4.3, wcrtomb produces wrong characters in the C locale. | 35 | dnl On Android 4.3, wcrtomb produces wrong characters in the C locale. |
| 36 | dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL) | 36 | dnl On AIX 4.3 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL) |
| 37 | dnl sometimes returns 0 instead of 1. | 37 | dnl sometimes returns 0 instead of 1. |
| 38 | AC_REQUIRE([AC_PROG_CC]) | 38 | AC_REQUIRE([AC_PROG_CC]) |
| 39 | AC_REQUIRE([gt_LOCALE_FR]) | 39 | AC_REQUIRE([gt_LOCALE_FR]) |
| @@ -83,8 +83,8 @@ int main () | |||
| 83 | dnl is present. | 83 | dnl is present. |
| 84 | changequote(,)dnl | 84 | changequote(,)dnl |
| 85 | case "$host_os" in | 85 | case "$host_os" in |
| 86 | # Guess no on AIX 4, OSF/1, Solaris, native Windows. | 86 | # Guess no on AIX 4, Solaris, native Windows. |
| 87 | aix4* | osf* | solaris* | mingw* | windows*) | 87 | aix4* | solaris* | mingw* | windows*) |
| 88 | gl_cv_func_wcrtomb_retval="guessing no" ;; | 88 | gl_cv_func_wcrtomb_retval="guessing no" ;; |
| 89 | # Guess yes otherwise. | 89 | # Guess yes otherwise. |
| 90 | *) | 90 | *) |
diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4 index 56593cd5..6a6cb3a4 100644 --- a/gl/m4/wctype.m4 +++ b/gl/m4/wctype.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # wctype.m4 | 1 | # wctype.m4 |
| 2 | # serial 6 | 2 | # serial 6 |
| 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4 index 8e54678d..12b4c618 100644 --- a/gl/m4/wctype_h.m4 +++ b/gl/m4/wctype_h.m4 | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. | 4 | dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. |
| 5 | 5 | ||
| 6 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 6 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 7 | dnl This file is free software; the Free Software Foundation | 7 | dnl This file is free software; the Free Software Foundation |
| 8 | dnl gives unlimited permission to copy and/or distribute it, | 8 | dnl gives unlimited permission to copy and/or distribute it, |
| 9 | dnl with or without modifications, as long as this notice is preserved. | 9 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/wcwidth.m4 b/gl/m4/wcwidth.m4 index 2cc6ebb1..515076ba 100644 --- a/gl/m4/wcwidth.m4 +++ b/gl/m4/wcwidth.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # wcwidth.m4 | 1 | # wcwidth.m4 |
| 2 | # serial 38 | 2 | # serial 39 |
| 3 | dnl Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| @@ -44,7 +44,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH], | |||
| 44 | dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. | 44 | dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. |
| 45 | dnl On macOS 12.5, NetBSD 9.3, OpenBSD 5.0, MidnightBSD 1.1, | 45 | dnl On macOS 12.5, NetBSD 9.3, OpenBSD 5.0, MidnightBSD 1.1, |
| 46 | dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. | 46 | dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. |
| 47 | dnl On macOS 12.5, NetBSD 9.3, MidnightBSD 1.1, OSF/1 5.1, | 47 | dnl On macOS 12.5, NetBSD 9.3, MidnightBSD 1.1, |
| 48 | dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. | 48 | dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. |
| 49 | dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0. | 49 | dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0. |
| 50 | dnl This leads to bugs in 'ls' (coreutils). | 50 | dnl This leads to bugs in 'ls' (coreutils). |
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4 index 8a3c7944..384462d2 100644 --- a/gl/m4/wint_t.m4 +++ b/gl/m4/wint_t.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # wint_t.m4 | 1 | # wint_t.m4 |
| 2 | # serial 11 | 2 | # serial 11 |
| 3 | dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003, 2007-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4 index c10c4189..a0d0f060 100644 --- a/gl/m4/xalloc.m4 +++ b/gl/m4/xalloc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # xalloc.m4 | 1 | # xalloc.m4 |
| 2 | # serial 18 | 2 | # serial 18 |
| 3 | dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4 index 157d635c..4e35a5fe 100644 --- a/gl/m4/xsize.m4 +++ b/gl/m4/xsize.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # xsize.m4 | 1 | # xsize.m4 |
| 2 | # serial 5 | 2 | # serial 5 |
| 3 | dnl Copyright (C) 2003-2004, 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003-2004, 2008-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4 index 343bda5c..fed091ca 100644 --- a/gl/m4/zzgnulib.m4 +++ b/gl/m4/zzgnulib.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # zzgnulib.m4 | 1 | # zzgnulib.m4 |
| 2 | # serial 1 | 2 | # serial 1 |
| 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
diff --git a/gl/malloc.c b/gl/malloc.c index 5642c83c..f7d11921 100644 --- a/gl/malloc.c +++ b/gl/malloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* malloc() function that is glibc compatible. | 1 | /* malloc() function that is glibc compatible. |
| 2 | 2 | ||
| 3 | Copyright (C) 1997-1998, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1997-1998, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/malloc/dynarray-skeleton.c b/gl/malloc/dynarray-skeleton.c index 6b0585c1..9d83658e 100644 --- a/gl/malloc/dynarray-skeleton.c +++ b/gl/malloc/dynarray-skeleton.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Type-safe arrays which grow dynamically. | 1 | /* Type-safe arrays which grow dynamically. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray.h b/gl/malloc/dynarray.h index 6cbbe50e..e6a998d3 100644 --- a/gl/malloc/dynarray.h +++ b/gl/malloc/dynarray.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Type-safe arrays which grow dynamically. Shared definitions. | 1 | /* Type-safe arrays which grow dynamically. Shared definitions. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray_at_failure.c b/gl/malloc/dynarray_at_failure.c index b94ac3df..c05807f0 100644 --- a/gl/malloc/dynarray_at_failure.c +++ b/gl/malloc/dynarray_at_failure.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Report an dynamic array index out of bounds condition. | 1 | /* Report an dynamic array index out of bounds condition. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray_emplace_enlarge.c b/gl/malloc/dynarray_emplace_enlarge.c index 53126863..d3bb0447 100644 --- a/gl/malloc/dynarray_emplace_enlarge.c +++ b/gl/malloc/dynarray_emplace_enlarge.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Increase the size of a dynamic array in preparation of an emplace operation. | 1 | /* Increase the size of a dynamic array in preparation of an emplace operation. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray_finalize.c b/gl/malloc/dynarray_finalize.c index 3178c687..b2e37837 100644 --- a/gl/malloc/dynarray_finalize.c +++ b/gl/malloc/dynarray_finalize.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. | 1 | /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray_resize.c b/gl/malloc/dynarray_resize.c index 3cd1626a..d890b253 100644 --- a/gl/malloc/dynarray_resize.c +++ b/gl/malloc/dynarray_resize.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Increase the size of a dynamic array. | 1 | /* Increase the size of a dynamic array. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloc/dynarray_resize_clear.c b/gl/malloc/dynarray_resize_clear.c index 7bfc0005..34d01062 100644 --- a/gl/malloc/dynarray_resize_clear.c +++ b/gl/malloc/dynarray_resize_clear.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Increase the size of a dynamic array and clear the new part. | 1 | /* Increase the size of a dynamic array and clear the new part. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/malloca.c b/gl/malloca.c index 4bce9a3d..943140c8 100644 --- a/gl/malloca.c +++ b/gl/malloca.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Safe automatic memory allocation. | 1 | /* Safe automatic memory allocation. |
| 2 | Copyright (C) 2003, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2003, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2003, 2018. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2003, 2018. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/malloca.h b/gl/malloca.h index f131fd5a..1ebe6916 100644 --- a/gl/malloca.h +++ b/gl/malloca.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Safe automatic memory allocation. | 1 | /* Safe automatic memory allocation. |
| 2 | Copyright (C) 2003-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2003. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2003. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <math.h>. | 1 | /* Inline functions for <math.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/math.in.h b/gl/math.in.h index f4e80c53..14218ea0 100644 --- a/gl/math.in.h +++ b/gl/math.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <math.h>. | 1 | /* A GNU-like <math.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -251,8 +251,8 @@ _NaN () | |||
| 251 | 251 | ||
| 252 | #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) | 252 | #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) |
| 253 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ | 253 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ |
| 254 | # if defined __NetBSD__ || defined __sgi | 254 | # if defined __NetBSD__ |
| 255 | /* NetBSD, IRIX 6.5: match what ilogb() does */ | 255 | /* NetBSD: match what ilogb() does */ |
| 256 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | 256 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ |
| 257 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | 257 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ |
| 258 | # elif defined _AIX | 258 | # elif defined _AIX |
| @@ -288,7 +288,6 @@ _GL_CXXALIAS_SYS (acosf, float, (float x)); | |||
| 288 | # endif | 288 | # endif |
| 289 | _GL_CXXALIASWARN (acosf); | 289 | _GL_CXXALIASWARN (acosf); |
| 290 | #elif defined GNULIB_POSIXCHECK | 290 | #elif defined GNULIB_POSIXCHECK |
| 291 | # undef acosf | ||
| 292 | # if HAVE_RAW_DECL_ACOSF | 291 | # if HAVE_RAW_DECL_ACOSF |
| 293 | _GL_WARN_ON_USE (acosf, "acosf is unportable - " | 292 | _GL_WARN_ON_USE (acosf, "acosf is unportable - " |
| 294 | "use gnulib module acosf for portability"); | 293 | "use gnulib module acosf for portability"); |
| @@ -305,7 +304,6 @@ _GL_CXXALIAS_SYS (acosl, long double, (long double x)); | |||
| 305 | _GL_CXXALIASWARN (acosl); | 304 | _GL_CXXALIASWARN (acosl); |
| 306 | # endif | 305 | # endif |
| 307 | #elif defined GNULIB_POSIXCHECK | 306 | #elif defined GNULIB_POSIXCHECK |
| 308 | # undef acosl | ||
| 309 | # if HAVE_RAW_DECL_ACOSL | 307 | # if HAVE_RAW_DECL_ACOSL |
| 310 | _GL_WARN_ON_USE (acosl, "acosl is unportable - " | 308 | _GL_WARN_ON_USE (acosl, "acosl is unportable - " |
| 311 | "use gnulib module acosl for portability"); | 309 | "use gnulib module acosl for portability"); |
| @@ -330,7 +328,6 @@ _GL_CXXALIAS_SYS (asinf, float, (float x)); | |||
| 330 | # endif | 328 | # endif |
| 331 | _GL_CXXALIASWARN (asinf); | 329 | _GL_CXXALIASWARN (asinf); |
| 332 | #elif defined GNULIB_POSIXCHECK | 330 | #elif defined GNULIB_POSIXCHECK |
| 333 | # undef asinf | ||
| 334 | # if HAVE_RAW_DECL_ASINF | 331 | # if HAVE_RAW_DECL_ASINF |
| 335 | _GL_WARN_ON_USE (asinf, "asinf is unportable - " | 332 | _GL_WARN_ON_USE (asinf, "asinf is unportable - " |
| 336 | "use gnulib module asinf for portability"); | 333 | "use gnulib module asinf for portability"); |
| @@ -347,7 +344,6 @@ _GL_CXXALIAS_SYS (asinl, long double, (long double x)); | |||
| 347 | _GL_CXXALIASWARN (asinl); | 344 | _GL_CXXALIASWARN (asinl); |
| 348 | # endif | 345 | # endif |
| 349 | #elif defined GNULIB_POSIXCHECK | 346 | #elif defined GNULIB_POSIXCHECK |
| 350 | # undef asinl | ||
| 351 | # if HAVE_RAW_DECL_ASINL | 347 | # if HAVE_RAW_DECL_ASINL |
| 352 | _GL_WARN_ON_USE (asinl, "asinl is unportable - " | 348 | _GL_WARN_ON_USE (asinl, "asinl is unportable - " |
| 353 | "use gnulib module asinl for portability"); | 349 | "use gnulib module asinl for portability"); |
| @@ -372,7 +368,6 @@ _GL_CXXALIAS_SYS (atanf, float, (float x)); | |||
| 372 | # endif | 368 | # endif |
| 373 | _GL_CXXALIASWARN (atanf); | 369 | _GL_CXXALIASWARN (atanf); |
| 374 | #elif defined GNULIB_POSIXCHECK | 370 | #elif defined GNULIB_POSIXCHECK |
| 375 | # undef atanf | ||
| 376 | # if HAVE_RAW_DECL_ATANF | 371 | # if HAVE_RAW_DECL_ATANF |
| 377 | _GL_WARN_ON_USE (atanf, "atanf is unportable - " | 372 | _GL_WARN_ON_USE (atanf, "atanf is unportable - " |
| 378 | "use gnulib module atanf for portability"); | 373 | "use gnulib module atanf for portability"); |
| @@ -389,7 +384,6 @@ _GL_CXXALIAS_SYS (atanl, long double, (long double x)); | |||
| 389 | _GL_CXXALIASWARN (atanl); | 384 | _GL_CXXALIASWARN (atanl); |
| 390 | # endif | 385 | # endif |
| 391 | #elif defined GNULIB_POSIXCHECK | 386 | #elif defined GNULIB_POSIXCHECK |
| 392 | # undef atanl | ||
| 393 | # if HAVE_RAW_DECL_ATANL | 387 | # if HAVE_RAW_DECL_ATANL |
| 394 | _GL_WARN_ON_USE (atanl, "atanl is unportable - " | 388 | _GL_WARN_ON_USE (atanl, "atanl is unportable - " |
| 395 | "use gnulib module atanl for portability"); | 389 | "use gnulib module atanl for portability"); |
| @@ -414,7 +408,6 @@ _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); | |||
| 414 | # endif | 408 | # endif |
| 415 | _GL_CXXALIASWARN (atan2f); | 409 | _GL_CXXALIASWARN (atan2f); |
| 416 | #elif defined GNULIB_POSIXCHECK | 410 | #elif defined GNULIB_POSIXCHECK |
| 417 | # undef atan2f | ||
| 418 | # if HAVE_RAW_DECL_ATAN2F | 411 | # if HAVE_RAW_DECL_ATAN2F |
| 419 | _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " | 412 | _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " |
| 420 | "use gnulib module atan2f for portability"); | 413 | "use gnulib module atan2f for portability"); |
| @@ -431,14 +424,13 @@ _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " | |||
| 431 | _GL_FUNCDECL_RPL (cbrtf, float, (float x), ); | 424 | _GL_FUNCDECL_RPL (cbrtf, float, (float x), ); |
| 432 | _GL_CXXALIAS_RPL (cbrtf, float, (float x)); | 425 | _GL_CXXALIAS_RPL (cbrtf, float, (float x)); |
| 433 | # else | 426 | # else |
| 434 | # if !@HAVE_DECL_CBRTF@ | 427 | # if !@HAVE_CBRTF@ |
| 435 | _GL_FUNCDECL_SYS (cbrtf, float, (float x), ); | 428 | _GL_FUNCDECL_SYS (cbrtf, float, (float x), ); |
| 436 | # endif | 429 | # endif |
| 437 | _GL_CXXALIAS_SYS (cbrtf, float, (float x)); | 430 | _GL_CXXALIAS_SYS (cbrtf, float, (float x)); |
| 438 | # endif | 431 | # endif |
| 439 | _GL_CXXALIASWARN (cbrtf); | 432 | _GL_CXXALIASWARN (cbrtf); |
| 440 | #elif defined GNULIB_POSIXCHECK | 433 | #elif defined GNULIB_POSIXCHECK |
| 441 | # undef cbrtf | ||
| 442 | # if HAVE_RAW_DECL_CBRTF | 434 | # if HAVE_RAW_DECL_CBRTF |
| 443 | _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " | 435 | _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " |
| 444 | "use gnulib module cbrtf for portability"); | 436 | "use gnulib module cbrtf for portability"); |
| @@ -454,7 +446,6 @@ _GL_CXXALIAS_SYS (cbrt, double, (double x)); | |||
| 454 | _GL_CXXALIASWARN1 (cbrt, double, (double x)); | 446 | _GL_CXXALIASWARN1 (cbrt, double, (double x)); |
| 455 | # endif | 447 | # endif |
| 456 | #elif defined GNULIB_POSIXCHECK | 448 | #elif defined GNULIB_POSIXCHECK |
| 457 | # undef cbrt | ||
| 458 | # if HAVE_RAW_DECL_CBRT | 449 | # if HAVE_RAW_DECL_CBRT |
| 459 | _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " | 450 | _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " |
| 460 | "use gnulib module cbrt for portability"); | 451 | "use gnulib module cbrt for portability"); |
| @@ -470,7 +461,7 @@ _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " | |||
| 470 | _GL_FUNCDECL_RPL (cbrtl, long double, (long double x), ); | 461 | _GL_FUNCDECL_RPL (cbrtl, long double, (long double x), ); |
| 471 | _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); | 462 | _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); |
| 472 | # else | 463 | # else |
| 473 | # if !@HAVE_DECL_CBRTL@ | 464 | # if !@HAVE_CBRTL@ |
| 474 | _GL_FUNCDECL_SYS (cbrtl, long double, (long double x), ); | 465 | _GL_FUNCDECL_SYS (cbrtl, long double, (long double x), ); |
| 475 | # endif | 466 | # endif |
| 476 | _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); | 467 | _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); |
| @@ -479,7 +470,6 @@ _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); | |||
| 479 | _GL_CXXALIASWARN (cbrtl); | 470 | _GL_CXXALIASWARN (cbrtl); |
| 480 | # endif | 471 | # endif |
| 481 | #elif defined GNULIB_POSIXCHECK | 472 | #elif defined GNULIB_POSIXCHECK |
| 482 | # undef cbrtl | ||
| 483 | # if HAVE_RAW_DECL_CBRTL | 473 | # if HAVE_RAW_DECL_CBRTL |
| 484 | _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " | 474 | _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " |
| 485 | "use gnulib module cbrtl for portability"); | 475 | "use gnulib module cbrtl for portability"); |
| @@ -504,7 +494,6 @@ _GL_CXXALIAS_SYS (ceilf, float, (float x)); | |||
| 504 | # endif | 494 | # endif |
| 505 | _GL_CXXALIASWARN (ceilf); | 495 | _GL_CXXALIASWARN (ceilf); |
| 506 | #elif defined GNULIB_POSIXCHECK | 496 | #elif defined GNULIB_POSIXCHECK |
| 507 | # undef ceilf | ||
| 508 | # if HAVE_RAW_DECL_CEILF | 497 | # if HAVE_RAW_DECL_CEILF |
| 509 | _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " | 498 | _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " |
| 510 | "use gnulib module ceilf for portability"); | 499 | "use gnulib module ceilf for portability"); |
| @@ -546,7 +535,6 @@ _GL_CXXALIAS_SYS (ceill, long double, (long double x)); | |||
| 546 | _GL_CXXALIASWARN (ceill); | 535 | _GL_CXXALIASWARN (ceill); |
| 547 | # endif | 536 | # endif |
| 548 | #elif defined GNULIB_POSIXCHECK | 537 | #elif defined GNULIB_POSIXCHECK |
| 549 | # undef ceill | ||
| 550 | # if HAVE_RAW_DECL_CEILL | 538 | # if HAVE_RAW_DECL_CEILL |
| 551 | _GL_WARN_ON_USE (ceill, "ceill is unportable - " | 539 | _GL_WARN_ON_USE (ceill, "ceill is unportable - " |
| 552 | "use gnulib module ceill for portability"); | 540 | "use gnulib module ceill for portability"); |
| @@ -555,14 +543,13 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - " | |||
| 555 | 543 | ||
| 556 | 544 | ||
| 557 | #if @GNULIB_COPYSIGNF@ | 545 | #if @GNULIB_COPYSIGNF@ |
| 558 | # if !@HAVE_DECL_COPYSIGNF@ | 546 | # if !@HAVE_COPYSIGNF@ |
| 559 | # undef copysignf | 547 | # undef copysignf |
| 560 | _GL_FUNCDECL_SYS (copysignf, float, (float x, float y), ); | 548 | _GL_FUNCDECL_SYS (copysignf, float, (float x, float y), ); |
| 561 | # endif | 549 | # endif |
| 562 | _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); | 550 | _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); |
| 563 | _GL_CXXALIASWARN (copysignf); | 551 | _GL_CXXALIASWARN (copysignf); |
| 564 | #elif defined GNULIB_POSIXCHECK | 552 | #elif defined GNULIB_POSIXCHECK |
| 565 | # undef copysignf | ||
| 566 | # if HAVE_RAW_DECL_COPYSIGNF | 553 | # if HAVE_RAW_DECL_COPYSIGNF |
| 567 | _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " | 554 | _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " |
| 568 | "use gnulib module copysignf for portability"); | 555 | "use gnulib module copysignf for portability"); |
| @@ -578,7 +565,6 @@ _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); | |||
| 578 | _GL_CXXALIASWARN1 (copysign, double, (double x, double y)); | 565 | _GL_CXXALIASWARN1 (copysign, double, (double x, double y)); |
| 579 | # endif | 566 | # endif |
| 580 | #elif defined GNULIB_POSIXCHECK | 567 | #elif defined GNULIB_POSIXCHECK |
| 581 | # undef copysign | ||
| 582 | # if HAVE_RAW_DECL_COPYSIGN | 568 | # if HAVE_RAW_DECL_COPYSIGN |
| 583 | _GL_WARN_ON_USE (copysign, "copysign is unportable - " | 569 | _GL_WARN_ON_USE (copysign, "copysign is unportable - " |
| 584 | "use gnulib module copysign for portability"); | 570 | "use gnulib module copysign for portability"); |
| @@ -594,7 +580,6 @@ _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); | |||
| 594 | _GL_CXXALIASWARN (copysignl); | 580 | _GL_CXXALIASWARN (copysignl); |
| 595 | # endif | 581 | # endif |
| 596 | #elif defined GNULIB_POSIXCHECK | 582 | #elif defined GNULIB_POSIXCHECK |
| 597 | # undef copysignl | ||
| 598 | # if HAVE_RAW_DECL_COPYSIGNL | 583 | # if HAVE_RAW_DECL_COPYSIGNL |
| 599 | _GL_WARN_ON_USE (copysign, "copysignl is unportable - " | 584 | _GL_WARN_ON_USE (copysign, "copysignl is unportable - " |
| 600 | "use gnulib module copysignl for portability"); | 585 | "use gnulib module copysignl for portability"); |
| @@ -619,7 +604,6 @@ _GL_CXXALIAS_SYS (cosf, float, (float x)); | |||
| 619 | # endif | 604 | # endif |
| 620 | _GL_CXXALIASWARN (cosf); | 605 | _GL_CXXALIASWARN (cosf); |
| 621 | #elif defined GNULIB_POSIXCHECK | 606 | #elif defined GNULIB_POSIXCHECK |
| 622 | # undef cosf | ||
| 623 | # if HAVE_RAW_DECL_COSF | 607 | # if HAVE_RAW_DECL_COSF |
| 624 | _GL_WARN_ON_USE (cosf, "cosf is unportable - " | 608 | _GL_WARN_ON_USE (cosf, "cosf is unportable - " |
| 625 | "use gnulib module cosf for portability"); | 609 | "use gnulib module cosf for portability"); |
| @@ -636,7 +620,6 @@ _GL_CXXALIAS_SYS (cosl, long double, (long double x)); | |||
| 636 | _GL_CXXALIASWARN (cosl); | 620 | _GL_CXXALIASWARN (cosl); |
| 637 | # endif | 621 | # endif |
| 638 | #elif defined GNULIB_POSIXCHECK | 622 | #elif defined GNULIB_POSIXCHECK |
| 639 | # undef cosl | ||
| 640 | # if HAVE_RAW_DECL_COSL | 623 | # if HAVE_RAW_DECL_COSL |
| 641 | _GL_WARN_ON_USE (cosl, "cosl is unportable - " | 624 | _GL_WARN_ON_USE (cosl, "cosl is unportable - " |
| 642 | "use gnulib module cosl for portability"); | 625 | "use gnulib module cosl for portability"); |
| @@ -661,7 +644,6 @@ _GL_CXXALIAS_SYS (coshf, float, (float x)); | |||
| 661 | # endif | 644 | # endif |
| 662 | _GL_CXXALIASWARN (coshf); | 645 | _GL_CXXALIASWARN (coshf); |
| 663 | #elif defined GNULIB_POSIXCHECK | 646 | #elif defined GNULIB_POSIXCHECK |
| 664 | # undef coshf | ||
| 665 | # if HAVE_RAW_DECL_COSHF | 647 | # if HAVE_RAW_DECL_COSHF |
| 666 | _GL_WARN_ON_USE (coshf, "coshf is unportable - " | 648 | _GL_WARN_ON_USE (coshf, "coshf is unportable - " |
| 667 | "use gnulib module coshf for portability"); | 649 | "use gnulib module coshf for portability"); |
| @@ -686,7 +668,6 @@ _GL_CXXALIAS_SYS (expf, float, (float x)); | |||
| 686 | # endif | 668 | # endif |
| 687 | _GL_CXXALIASWARN (expf); | 669 | _GL_CXXALIASWARN (expf); |
| 688 | #elif defined GNULIB_POSIXCHECK | 670 | #elif defined GNULIB_POSIXCHECK |
| 689 | # undef expf | ||
| 690 | # if HAVE_RAW_DECL_EXPF | 671 | # if HAVE_RAW_DECL_EXPF |
| 691 | _GL_WARN_ON_USE (expf, "expf is unportable - " | 672 | _GL_WARN_ON_USE (expf, "expf is unportable - " |
| 692 | "use gnulib module expf for portability"); | 673 | "use gnulib module expf for portability"); |
| @@ -712,7 +693,6 @@ _GL_CXXALIAS_SYS (expl, long double, (long double x)); | |||
| 712 | _GL_CXXALIASWARN (expl); | 693 | _GL_CXXALIASWARN (expl); |
| 713 | # endif | 694 | # endif |
| 714 | #elif defined GNULIB_POSIXCHECK | 695 | #elif defined GNULIB_POSIXCHECK |
| 715 | # undef expl | ||
| 716 | # if HAVE_RAW_DECL_EXPL | 696 | # if HAVE_RAW_DECL_EXPL |
| 717 | _GL_WARN_ON_USE (expl, "expl is unportable - " | 697 | _GL_WARN_ON_USE (expl, "expl is unportable - " |
| 718 | "use gnulib module expl for portability"); | 698 | "use gnulib module expl for portability"); |
| @@ -721,13 +701,12 @@ _GL_WARN_ON_USE (expl, "expl is unportable - " | |||
| 721 | 701 | ||
| 722 | 702 | ||
| 723 | #if @GNULIB_EXP2F@ | 703 | #if @GNULIB_EXP2F@ |
| 724 | # if !@HAVE_DECL_EXP2F@ | 704 | # if !@HAVE_EXP2F@ |
| 725 | _GL_FUNCDECL_SYS (exp2f, float, (float x), ); | 705 | _GL_FUNCDECL_SYS (exp2f, float, (float x), ); |
| 726 | # endif | 706 | # endif |
| 727 | _GL_CXXALIAS_SYS (exp2f, float, (float x)); | 707 | _GL_CXXALIAS_SYS (exp2f, float, (float x)); |
| 728 | _GL_CXXALIASWARN (exp2f); | 708 | _GL_CXXALIASWARN (exp2f); |
| 729 | #elif defined GNULIB_POSIXCHECK | 709 | #elif defined GNULIB_POSIXCHECK |
| 730 | # undef exp2f | ||
| 731 | # if HAVE_RAW_DECL_EXP2F | 710 | # if HAVE_RAW_DECL_EXP2F |
| 732 | _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " | 711 | _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " |
| 733 | "use gnulib module exp2f for portability"); | 712 | "use gnulib module exp2f for portability"); |
| @@ -743,7 +722,7 @@ _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " | |||
| 743 | _GL_FUNCDECL_RPL (exp2, double, (double x), ); | 722 | _GL_FUNCDECL_RPL (exp2, double, (double x), ); |
| 744 | _GL_CXXALIAS_RPL (exp2, double, (double x)); | 723 | _GL_CXXALIAS_RPL (exp2, double, (double x)); |
| 745 | # else | 724 | # else |
| 746 | # if !@HAVE_DECL_EXP2@ | 725 | # if !@HAVE_EXP2@ |
| 747 | _GL_FUNCDECL_SYS (exp2, double, (double x), ); | 726 | _GL_FUNCDECL_SYS (exp2, double, (double x), ); |
| 748 | # endif | 727 | # endif |
| 749 | _GL_CXXALIAS_SYS (exp2, double, (double x)); | 728 | _GL_CXXALIAS_SYS (exp2, double, (double x)); |
| @@ -752,7 +731,6 @@ _GL_CXXALIAS_SYS (exp2, double, (double x)); | |||
| 752 | _GL_CXXALIASWARN1 (exp2, double, (double x)); | 731 | _GL_CXXALIASWARN1 (exp2, double, (double x)); |
| 753 | # endif | 732 | # endif |
| 754 | #elif defined GNULIB_POSIXCHECK | 733 | #elif defined GNULIB_POSIXCHECK |
| 755 | # undef exp2 | ||
| 756 | # if HAVE_RAW_DECL_EXP2 | 734 | # if HAVE_RAW_DECL_EXP2 |
| 757 | _GL_WARN_ON_USE (exp2, "exp2 is unportable - " | 735 | _GL_WARN_ON_USE (exp2, "exp2 is unportable - " |
| 758 | "use gnulib module exp2 for portability"); | 736 | "use gnulib module exp2 for portability"); |
| @@ -768,7 +746,7 @@ _GL_WARN_ON_USE (exp2, "exp2 is unportable - " | |||
| 768 | _GL_FUNCDECL_RPL (exp2l, long double, (long double x), ); | 746 | _GL_FUNCDECL_RPL (exp2l, long double, (long double x), ); |
| 769 | _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); | 747 | _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); |
| 770 | # else | 748 | # else |
| 771 | # if !@HAVE_DECL_EXP2L@ | 749 | # if !@HAVE_EXP2L@ |
| 772 | # undef exp2l | 750 | # undef exp2l |
| 773 | _GL_FUNCDECL_SYS (exp2l, long double, (long double x), ); | 751 | _GL_FUNCDECL_SYS (exp2l, long double, (long double x), ); |
| 774 | # endif | 752 | # endif |
| @@ -778,7 +756,6 @@ _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); | |||
| 778 | _GL_CXXALIASWARN (exp2l); | 756 | _GL_CXXALIASWARN (exp2l); |
| 779 | # endif | 757 | # endif |
| 780 | #elif defined GNULIB_POSIXCHECK | 758 | #elif defined GNULIB_POSIXCHECK |
| 781 | # undef exp2l | ||
| 782 | # if HAVE_RAW_DECL_EXP2L | 759 | # if HAVE_RAW_DECL_EXP2L |
| 783 | _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " | 760 | _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " |
| 784 | "use gnulib module exp2l for portability"); | 761 | "use gnulib module exp2l for portability"); |
| @@ -802,7 +779,6 @@ _GL_CXXALIAS_SYS (expm1f, float, (float x)); | |||
| 802 | # endif | 779 | # endif |
| 803 | _GL_CXXALIASWARN (expm1f); | 780 | _GL_CXXALIASWARN (expm1f); |
| 804 | #elif defined GNULIB_POSIXCHECK | 781 | #elif defined GNULIB_POSIXCHECK |
| 805 | # undef expm1f | ||
| 806 | # if HAVE_RAW_DECL_EXPM1F | 782 | # if HAVE_RAW_DECL_EXPM1F |
| 807 | _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " | 783 | _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " |
| 808 | "use gnulib module expm1f for portability"); | 784 | "use gnulib module expm1f for portability"); |
| @@ -827,7 +803,6 @@ _GL_CXXALIAS_SYS (expm1, double, (double x)); | |||
| 827 | _GL_CXXALIASWARN1 (expm1, double, (double x)); | 803 | _GL_CXXALIASWARN1 (expm1, double, (double x)); |
| 828 | # endif | 804 | # endif |
| 829 | #elif defined GNULIB_POSIXCHECK | 805 | #elif defined GNULIB_POSIXCHECK |
| 830 | # undef expm1 | ||
| 831 | # if HAVE_RAW_DECL_EXPM1 | 806 | # if HAVE_RAW_DECL_EXPM1 |
| 832 | _GL_WARN_ON_USE (expm1, "expm1 is unportable - " | 807 | _GL_WARN_ON_USE (expm1, "expm1 is unportable - " |
| 833 | "use gnulib module expm1 for portability"); | 808 | "use gnulib module expm1 for portability"); |
| @@ -843,7 +818,7 @@ _GL_WARN_ON_USE (expm1, "expm1 is unportable - " | |||
| 843 | _GL_FUNCDECL_RPL (expm1l, long double, (long double x), ); | 818 | _GL_FUNCDECL_RPL (expm1l, long double, (long double x), ); |
| 844 | _GL_CXXALIAS_RPL (expm1l, long double, (long double x)); | 819 | _GL_CXXALIAS_RPL (expm1l, long double, (long double x)); |
| 845 | # else | 820 | # else |
| 846 | # if !@HAVE_DECL_EXPM1L@ | 821 | # if !@HAVE_EXPM1L@ |
| 847 | # undef expm1l | 822 | # undef expm1l |
| 848 | # if !(defined __cplusplus && defined _AIX) | 823 | # if !(defined __cplusplus && defined _AIX) |
| 849 | _GL_FUNCDECL_SYS (expm1l, long double, (long double x), ); | 824 | _GL_FUNCDECL_SYS (expm1l, long double, (long double x), ); |
| @@ -855,7 +830,6 @@ _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); | |||
| 855 | _GL_CXXALIASWARN (expm1l); | 830 | _GL_CXXALIASWARN (expm1l); |
| 856 | # endif | 831 | # endif |
| 857 | #elif defined GNULIB_POSIXCHECK | 832 | #elif defined GNULIB_POSIXCHECK |
| 858 | # undef expm1l | ||
| 859 | # if HAVE_RAW_DECL_EXPM1L | 833 | # if HAVE_RAW_DECL_EXPM1L |
| 860 | _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " | 834 | _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " |
| 861 | "use gnulib module expm1l for portability"); | 835 | "use gnulib module expm1l for portability"); |
| @@ -873,7 +847,6 @@ _GL_CXXALIAS_SYS (fabsf, float, (float x)); | |||
| 873 | _GL_CXXALIASWARN (fabsf); | 847 | _GL_CXXALIASWARN (fabsf); |
| 874 | # endif | 848 | # endif |
| 875 | #elif defined GNULIB_POSIXCHECK | 849 | #elif defined GNULIB_POSIXCHECK |
| 876 | # undef fabsf | ||
| 877 | # if HAVE_RAW_DECL_FABSF | 850 | # if HAVE_RAW_DECL_FABSF |
| 878 | _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " | 851 | _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " |
| 879 | "use gnulib module fabsf for portability"); | 852 | "use gnulib module fabsf for portability"); |
| @@ -899,7 +872,6 @@ _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); | |||
| 899 | _GL_CXXALIASWARN (fabsl); | 872 | _GL_CXXALIASWARN (fabsl); |
| 900 | # endif | 873 | # endif |
| 901 | #elif defined GNULIB_POSIXCHECK | 874 | #elif defined GNULIB_POSIXCHECK |
| 902 | # undef fabsl | ||
| 903 | # if HAVE_RAW_DECL_FABSL | 875 | # if HAVE_RAW_DECL_FABSL |
| 904 | _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " | 876 | _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " |
| 905 | "use gnulib module fabsl for portability"); | 877 | "use gnulib module fabsl for portability"); |
| @@ -924,7 +896,6 @@ _GL_CXXALIAS_SYS (floorf, float, (float x)); | |||
| 924 | # endif | 896 | # endif |
| 925 | _GL_CXXALIASWARN (floorf); | 897 | _GL_CXXALIASWARN (floorf); |
| 926 | #elif defined GNULIB_POSIXCHECK | 898 | #elif defined GNULIB_POSIXCHECK |
| 927 | # undef floorf | ||
| 928 | # if HAVE_RAW_DECL_FLOORF | 899 | # if HAVE_RAW_DECL_FLOORF |
| 929 | _GL_WARN_ON_USE (floorf, "floorf is unportable - " | 900 | _GL_WARN_ON_USE (floorf, "floorf is unportable - " |
| 930 | "use gnulib module floorf for portability"); | 901 | "use gnulib module floorf for portability"); |
| @@ -966,7 +937,6 @@ _GL_CXXALIAS_SYS (floorl, long double, (long double x)); | |||
| 966 | _GL_CXXALIASWARN (floorl); | 937 | _GL_CXXALIASWARN (floorl); |
| 967 | # endif | 938 | # endif |
| 968 | #elif defined GNULIB_POSIXCHECK | 939 | #elif defined GNULIB_POSIXCHECK |
| 969 | # undef floorl | ||
| 970 | # if HAVE_RAW_DECL_FLOORL | 940 | # if HAVE_RAW_DECL_FLOORL |
| 971 | _GL_WARN_ON_USE (floorl, "floorl is unportable - " | 941 | _GL_WARN_ON_USE (floorl, "floorl is unportable - " |
| 972 | "use gnulib module floorl for portability"); | 942 | "use gnulib module floorl for portability"); |
| @@ -991,7 +961,6 @@ _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); | |||
| 991 | # endif | 961 | # endif |
| 992 | _GL_CXXALIASWARN (fmaf); | 962 | _GL_CXXALIASWARN (fmaf); |
| 993 | #elif defined GNULIB_POSIXCHECK | 963 | #elif defined GNULIB_POSIXCHECK |
| 994 | # undef fmaf | ||
| 995 | # if HAVE_RAW_DECL_FMAF | 964 | # if HAVE_RAW_DECL_FMAF |
| 996 | _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " | 965 | _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " |
| 997 | "use gnulib module fmaf for portability"); | 966 | "use gnulib module fmaf for portability"); |
| @@ -1017,7 +986,6 @@ _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); | |||
| 1017 | _GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); | 986 | _GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); |
| 1018 | # endif | 987 | # endif |
| 1019 | #elif defined GNULIB_POSIXCHECK | 988 | #elif defined GNULIB_POSIXCHECK |
| 1020 | # undef fma | ||
| 1021 | # if HAVE_RAW_DECL_FMA | 989 | # if HAVE_RAW_DECL_FMA |
| 1022 | _GL_WARN_ON_USE (fma, "fma is unportable - " | 990 | _GL_WARN_ON_USE (fma, "fma is unportable - " |
| 1023 | "use gnulib module fma for portability"); | 991 | "use gnulib module fma for portability"); |
| @@ -1049,7 +1017,6 @@ _GL_CXXALIAS_SYS (fmal, long double, | |||
| 1049 | _GL_CXXALIASWARN (fmal); | 1017 | _GL_CXXALIASWARN (fmal); |
| 1050 | # endif | 1018 | # endif |
| 1051 | #elif defined GNULIB_POSIXCHECK | 1019 | #elif defined GNULIB_POSIXCHECK |
| 1052 | # undef fmal | ||
| 1053 | # if HAVE_RAW_DECL_FMAL | 1020 | # if HAVE_RAW_DECL_FMAL |
| 1054 | _GL_WARN_ON_USE (fmal, "fmal is unportable - " | 1021 | _GL_WARN_ON_USE (fmal, "fmal is unportable - " |
| 1055 | "use gnulib module fmal for portability"); | 1022 | "use gnulib module fmal for portability"); |
| @@ -1074,7 +1041,6 @@ _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); | |||
| 1074 | # endif | 1041 | # endif |
| 1075 | _GL_CXXALIASWARN (fmodf); | 1042 | _GL_CXXALIASWARN (fmodf); |
| 1076 | #elif defined GNULIB_POSIXCHECK | 1043 | #elif defined GNULIB_POSIXCHECK |
| 1077 | # undef fmodf | ||
| 1078 | # if HAVE_RAW_DECL_FMODF | 1044 | # if HAVE_RAW_DECL_FMODF |
| 1079 | _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " | 1045 | _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " |
| 1080 | "use gnulib module fmodf for portability"); | 1046 | "use gnulib module fmodf for portability"); |
| @@ -1096,7 +1062,6 @@ _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); | |||
| 1096 | _GL_CXXALIASWARN1 (fmod, double, (double x, double y)); | 1062 | _GL_CXXALIASWARN1 (fmod, double, (double x, double y)); |
| 1097 | # endif | 1063 | # endif |
| 1098 | #elif defined GNULIB_POSIXCHECK | 1064 | #elif defined GNULIB_POSIXCHECK |
| 1099 | # undef fmod | ||
| 1100 | # if HAVE_RAW_DECL_FMOD | 1065 | # if HAVE_RAW_DECL_FMOD |
| 1101 | _GL_WARN_ON_USE (fmod, "fmod has portability problems - " | 1066 | _GL_WARN_ON_USE (fmod, "fmod has portability problems - " |
| 1102 | "use gnulib module fmod for portability"); | 1067 | "use gnulib module fmod for portability"); |
| @@ -1122,7 +1087,6 @@ _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); | |||
| 1122 | _GL_CXXALIASWARN (fmodl); | 1087 | _GL_CXXALIASWARN (fmodl); |
| 1123 | # endif | 1088 | # endif |
| 1124 | #elif defined GNULIB_POSIXCHECK | 1089 | #elif defined GNULIB_POSIXCHECK |
| 1125 | # undef fmodl | ||
| 1126 | # if HAVE_RAW_DECL_FMODL | 1090 | # if HAVE_RAW_DECL_FMODL |
| 1127 | _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " | 1091 | _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " |
| 1128 | "use gnulib module fmodl for portability"); | 1092 | "use gnulib module fmodl for portability"); |
| @@ -1156,7 +1120,6 @@ _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); | |||
| 1156 | _GL_CXXALIASWARN (frexpf); | 1120 | _GL_CXXALIASWARN (frexpf); |
| 1157 | # endif | 1121 | # endif |
| 1158 | #elif defined GNULIB_POSIXCHECK | 1122 | #elif defined GNULIB_POSIXCHECK |
| 1159 | # undef frexpf | ||
| 1160 | # if HAVE_RAW_DECL_FREXPF | 1123 | # if HAVE_RAW_DECL_FREXPF |
| 1161 | _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " | 1124 | _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " |
| 1162 | "use gnulib module frexpf for portability"); | 1125 | "use gnulib module frexpf for portability"); |
| @@ -1224,7 +1187,6 @@ _GL_CXXALIASWARN (frexpl); | |||
| 1224 | # endif | 1187 | # endif |
| 1225 | #endif | 1188 | #endif |
| 1226 | #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK | 1189 | #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK |
| 1227 | # undef frexpl | ||
| 1228 | # if HAVE_RAW_DECL_FREXPL | 1190 | # if HAVE_RAW_DECL_FREXPL |
| 1229 | _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " | 1191 | _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " |
| 1230 | "use gnulib module frexpl for portability"); | 1192 | "use gnulib module frexpl for portability"); |
| @@ -1251,7 +1213,6 @@ _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); | |||
| 1251 | _GL_CXXALIASWARN (hypotf); | 1213 | _GL_CXXALIASWARN (hypotf); |
| 1252 | # endif | 1214 | # endif |
| 1253 | #elif defined GNULIB_POSIXCHECK | 1215 | #elif defined GNULIB_POSIXCHECK |
| 1254 | # undef hypotf | ||
| 1255 | # if HAVE_RAW_DECL_HYPOTF | 1216 | # if HAVE_RAW_DECL_HYPOTF |
| 1256 | _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " | 1217 | _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " |
| 1257 | "use gnulib module hypotf for portability"); | 1218 | "use gnulib module hypotf for portability"); |
| @@ -1274,7 +1235,6 @@ _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); | |||
| 1274 | _GL_CXXALIASWARN1 (hypot, double, (double x, double y)); | 1235 | _GL_CXXALIASWARN1 (hypot, double, (double x, double y)); |
| 1275 | # endif | 1236 | # endif |
| 1276 | #elif defined GNULIB_POSIXCHECK | 1237 | #elif defined GNULIB_POSIXCHECK |
| 1277 | # undef hypot | ||
| 1278 | # if HAVE_RAW_DECL_HYPOT | 1238 | # if HAVE_RAW_DECL_HYPOT |
| 1279 | _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " | 1239 | _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " |
| 1280 | "use gnulib module hypot for portability"); | 1240 | "use gnulib module hypot for portability"); |
| @@ -1300,7 +1260,6 @@ _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); | |||
| 1300 | _GL_CXXALIASWARN (hypotl); | 1260 | _GL_CXXALIASWARN (hypotl); |
| 1301 | # endif | 1261 | # endif |
| 1302 | #elif defined GNULIB_POSIXCHECK | 1262 | #elif defined GNULIB_POSIXCHECK |
| 1303 | # undef hypotl | ||
| 1304 | # if HAVE_RAW_DECL_HYPOTL | 1263 | # if HAVE_RAW_DECL_HYPOTL |
| 1305 | _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " | 1264 | _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " |
| 1306 | "use gnulib module hypotl for portability"); | 1265 | "use gnulib module hypotl for portability"); |
| @@ -1324,7 +1283,6 @@ _GL_CXXALIAS_SYS (ilogbf, int, (float x)); | |||
| 1324 | # endif | 1283 | # endif |
| 1325 | _GL_CXXALIASWARN (ilogbf); | 1284 | _GL_CXXALIASWARN (ilogbf); |
| 1326 | #elif defined GNULIB_POSIXCHECK | 1285 | #elif defined GNULIB_POSIXCHECK |
| 1327 | # undef ilogbf | ||
| 1328 | # if HAVE_RAW_DECL_ILOGBF | 1286 | # if HAVE_RAW_DECL_ILOGBF |
| 1329 | _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " | 1287 | _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " |
| 1330 | "use gnulib module ilogbf for portability"); | 1288 | "use gnulib module ilogbf for portability"); |
| @@ -1349,7 +1307,6 @@ _GL_CXXALIAS_SYS (ilogb, int, (double x)); | |||
| 1349 | _GL_CXXALIASWARN1 (ilogb, int, (double x)); | 1307 | _GL_CXXALIASWARN1 (ilogb, int, (double x)); |
| 1350 | # endif | 1308 | # endif |
| 1351 | #elif defined GNULIB_POSIXCHECK | 1309 | #elif defined GNULIB_POSIXCHECK |
| 1352 | # undef ilogb | ||
| 1353 | # if HAVE_RAW_DECL_ILOGB | 1310 | # if HAVE_RAW_DECL_ILOGB |
| 1354 | _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " | 1311 | _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " |
| 1355 | "use gnulib module ilogb for portability"); | 1312 | "use gnulib module ilogb for portability"); |
| @@ -1375,7 +1332,6 @@ _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); | |||
| 1375 | _GL_CXXALIASWARN (ilogbl); | 1332 | _GL_CXXALIASWARN (ilogbl); |
| 1376 | # endif | 1333 | # endif |
| 1377 | #elif defined GNULIB_POSIXCHECK | 1334 | #elif defined GNULIB_POSIXCHECK |
| 1378 | # undef ilogbl | ||
| 1379 | # if HAVE_RAW_DECL_ILOGBL | 1335 | # if HAVE_RAW_DECL_ILOGBL |
| 1380 | _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " | 1336 | _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " |
| 1381 | "use gnulib module ilogbl for portability"); | 1337 | "use gnulib module ilogbl for portability"); |
| @@ -1443,7 +1399,6 @@ _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); | |||
| 1443 | _GL_CXXALIASWARN (ldexpf); | 1399 | _GL_CXXALIASWARN (ldexpf); |
| 1444 | # endif | 1400 | # endif |
| 1445 | #elif defined GNULIB_POSIXCHECK | 1401 | #elif defined GNULIB_POSIXCHECK |
| 1446 | # undef ldexpf | ||
| 1447 | # if HAVE_RAW_DECL_LDEXPF | 1402 | # if HAVE_RAW_DECL_LDEXPF |
| 1448 | _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " | 1403 | _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " |
| 1449 | "use gnulib module ldexpf for portability"); | 1404 | "use gnulib module ldexpf for portability"); |
| @@ -1497,7 +1452,6 @@ _GL_CXXALIASWARN (ldexpl); | |||
| 1497 | # endif | 1452 | # endif |
| 1498 | #endif | 1453 | #endif |
| 1499 | #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK | 1454 | #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK |
| 1500 | # undef ldexpl | ||
| 1501 | # if HAVE_RAW_DECL_LDEXPL | 1455 | # if HAVE_RAW_DECL_LDEXPL |
| 1502 | _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " | 1456 | _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " |
| 1503 | "use gnulib module ldexpl for portability"); | 1457 | "use gnulib module ldexpl for portability"); |
| @@ -1522,7 +1476,6 @@ _GL_CXXALIAS_SYS (logf, float, (float x)); | |||
| 1522 | # endif | 1476 | # endif |
| 1523 | _GL_CXXALIASWARN (logf); | 1477 | _GL_CXXALIASWARN (logf); |
| 1524 | #elif defined GNULIB_POSIXCHECK | 1478 | #elif defined GNULIB_POSIXCHECK |
| 1525 | # undef logf | ||
| 1526 | # if HAVE_RAW_DECL_LOGF | 1479 | # if HAVE_RAW_DECL_LOGF |
| 1527 | _GL_WARN_ON_USE (logf, "logf is unportable - " | 1480 | _GL_WARN_ON_USE (logf, "logf is unportable - " |
| 1528 | "use gnulib module logf for portability"); | 1481 | "use gnulib module logf for portability"); |
| @@ -1544,7 +1497,6 @@ _GL_CXXALIAS_SYS (log, double, (double x)); | |||
| 1544 | _GL_CXXALIASWARN1 (log, double, (double x)); | 1497 | _GL_CXXALIASWARN1 (log, double, (double x)); |
| 1545 | # endif | 1498 | # endif |
| 1546 | #elif defined GNULIB_POSIXCHECK | 1499 | #elif defined GNULIB_POSIXCHECK |
| 1547 | # undef log | ||
| 1548 | # if HAVE_RAW_DECL_LOG | 1500 | # if HAVE_RAW_DECL_LOG |
| 1549 | _GL_WARN_ON_USE (log, "log has portability problems - " | 1501 | _GL_WARN_ON_USE (log, "log has portability problems - " |
| 1550 | "use gnulib module log for portability"); | 1502 | "use gnulib module log for portability"); |
| @@ -1570,7 +1522,6 @@ _GL_CXXALIAS_SYS (logl, long double, (long double x)); | |||
| 1570 | _GL_CXXALIASWARN (logl); | 1522 | _GL_CXXALIASWARN (logl); |
| 1571 | # endif | 1523 | # endif |
| 1572 | #elif defined GNULIB_POSIXCHECK | 1524 | #elif defined GNULIB_POSIXCHECK |
| 1573 | # undef logl | ||
| 1574 | # if HAVE_RAW_DECL_LOGL | 1525 | # if HAVE_RAW_DECL_LOGL |
| 1575 | _GL_WARN_ON_USE (logl, "logl is unportable - " | 1526 | _GL_WARN_ON_USE (logl, "logl is unportable - " |
| 1576 | "use gnulib module logl for portability"); | 1527 | "use gnulib module logl for portability"); |
| @@ -1595,7 +1546,6 @@ _GL_CXXALIAS_SYS (log10f, float, (float x)); | |||
| 1595 | # endif | 1546 | # endif |
| 1596 | _GL_CXXALIASWARN (log10f); | 1547 | _GL_CXXALIASWARN (log10f); |
| 1597 | #elif defined GNULIB_POSIXCHECK | 1548 | #elif defined GNULIB_POSIXCHECK |
| 1598 | # undef log10f | ||
| 1599 | # if HAVE_RAW_DECL_LOG10F | 1549 | # if HAVE_RAW_DECL_LOG10F |
| 1600 | _GL_WARN_ON_USE (log10f, "log10f is unportable - " | 1550 | _GL_WARN_ON_USE (log10f, "log10f is unportable - " |
| 1601 | "use gnulib module log10f for portability"); | 1551 | "use gnulib module log10f for portability"); |
| @@ -1617,7 +1567,6 @@ _GL_CXXALIAS_SYS (log10, double, (double x)); | |||
| 1617 | _GL_CXXALIASWARN1 (log10, double, (double x)); | 1567 | _GL_CXXALIASWARN1 (log10, double, (double x)); |
| 1618 | # endif | 1568 | # endif |
| 1619 | #elif defined GNULIB_POSIXCHECK | 1569 | #elif defined GNULIB_POSIXCHECK |
| 1620 | # undef log10 | ||
| 1621 | # if HAVE_RAW_DECL_LOG10 | 1570 | # if HAVE_RAW_DECL_LOG10 |
| 1622 | _GL_WARN_ON_USE (log10, "log10 has portability problems - " | 1571 | _GL_WARN_ON_USE (log10, "log10 has portability problems - " |
| 1623 | "use gnulib module log10 for portability"); | 1572 | "use gnulib module log10 for portability"); |
| @@ -1643,7 +1592,6 @@ _GL_CXXALIAS_SYS (log10l, long double, (long double x)); | |||
| 1643 | _GL_CXXALIASWARN (log10l); | 1592 | _GL_CXXALIASWARN (log10l); |
| 1644 | # endif | 1593 | # endif |
| 1645 | #elif defined GNULIB_POSIXCHECK | 1594 | #elif defined GNULIB_POSIXCHECK |
| 1646 | # undef log10l | ||
| 1647 | # if HAVE_RAW_DECL_LOG10L | 1595 | # if HAVE_RAW_DECL_LOG10L |
| 1648 | _GL_WARN_ON_USE (log10l, "log10l is unportable - " | 1596 | _GL_WARN_ON_USE (log10l, "log10l is unportable - " |
| 1649 | "use gnulib module log10l for portability"); | 1597 | "use gnulib module log10l for portability"); |
| @@ -1667,7 +1615,6 @@ _GL_CXXALIAS_SYS (log1pf, float, (float x)); | |||
| 1667 | # endif | 1615 | # endif |
| 1668 | _GL_CXXALIASWARN (log1pf); | 1616 | _GL_CXXALIASWARN (log1pf); |
| 1669 | #elif defined GNULIB_POSIXCHECK | 1617 | #elif defined GNULIB_POSIXCHECK |
| 1670 | # undef log1pf | ||
| 1671 | # if HAVE_RAW_DECL_LOG1PF | 1618 | # if HAVE_RAW_DECL_LOG1PF |
| 1672 | _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " | 1619 | _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " |
| 1673 | "use gnulib module log1pf for portability"); | 1620 | "use gnulib module log1pf for portability"); |
| @@ -1692,7 +1639,6 @@ _GL_CXXALIAS_SYS (log1p, double, (double x)); | |||
| 1692 | _GL_CXXALIASWARN1 (log1p, double, (double x)); | 1639 | _GL_CXXALIASWARN1 (log1p, double, (double x)); |
| 1693 | # endif | 1640 | # endif |
| 1694 | #elif defined GNULIB_POSIXCHECK | 1641 | #elif defined GNULIB_POSIXCHECK |
| 1695 | # undef log1p | ||
| 1696 | # if HAVE_RAW_DECL_LOG1P | 1642 | # if HAVE_RAW_DECL_LOG1P |
| 1697 | _GL_WARN_ON_USE (log1p, "log1p has portability problems - " | 1643 | _GL_WARN_ON_USE (log1p, "log1p has portability problems - " |
| 1698 | "use gnulib module log1p for portability"); | 1644 | "use gnulib module log1p for portability"); |
| @@ -1717,7 +1663,6 @@ _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); | |||
| 1717 | _GL_CXXALIASWARN (log1pl); | 1663 | _GL_CXXALIASWARN (log1pl); |
| 1718 | # endif | 1664 | # endif |
| 1719 | #elif defined GNULIB_POSIXCHECK | 1665 | #elif defined GNULIB_POSIXCHECK |
| 1720 | # undef log1pl | ||
| 1721 | # if HAVE_RAW_DECL_LOG1PL | 1666 | # if HAVE_RAW_DECL_LOG1PL |
| 1722 | _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " | 1667 | _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " |
| 1723 | "use gnulib module log1pl for portability"); | 1668 | "use gnulib module log1pl for portability"); |
| @@ -1734,7 +1679,7 @@ _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " | |||
| 1734 | _GL_FUNCDECL_RPL (log2f, float, (float x), ); | 1679 | _GL_FUNCDECL_RPL (log2f, float, (float x), ); |
| 1735 | _GL_CXXALIAS_RPL (log2f, float, (float x)); | 1680 | _GL_CXXALIAS_RPL (log2f, float, (float x)); |
| 1736 | # else | 1681 | # else |
| 1737 | # if !@HAVE_DECL_LOG2F@ | 1682 | # if !@HAVE_LOG2F@ |
| 1738 | # undef log2f | 1683 | # undef log2f |
| 1739 | _GL_FUNCDECL_SYS (log2f, float, (float x), ); | 1684 | _GL_FUNCDECL_SYS (log2f, float, (float x), ); |
| 1740 | # endif | 1685 | # endif |
| @@ -1744,7 +1689,6 @@ _GL_CXXALIAS_SYS (log2f, float, (float x)); | |||
| 1744 | _GL_CXXALIASWARN (log2f); | 1689 | _GL_CXXALIASWARN (log2f); |
| 1745 | # endif | 1690 | # endif |
| 1746 | #elif defined GNULIB_POSIXCHECK | 1691 | #elif defined GNULIB_POSIXCHECK |
| 1747 | # undef log2f | ||
| 1748 | # if HAVE_RAW_DECL_LOG2F | 1692 | # if HAVE_RAW_DECL_LOG2F |
| 1749 | _GL_WARN_ON_USE (log2f, "log2f is unportable - " | 1693 | _GL_WARN_ON_USE (log2f, "log2f is unportable - " |
| 1750 | "use gnulib module log2f for portability"); | 1694 | "use gnulib module log2f for portability"); |
| @@ -1760,7 +1704,7 @@ _GL_WARN_ON_USE (log2f, "log2f is unportable - " | |||
| 1760 | _GL_FUNCDECL_RPL (log2, double, (double x), ); | 1704 | _GL_FUNCDECL_RPL (log2, double, (double x), ); |
| 1761 | _GL_CXXALIAS_RPL (log2, double, (double x)); | 1705 | _GL_CXXALIAS_RPL (log2, double, (double x)); |
| 1762 | # else | 1706 | # else |
| 1763 | # if !@HAVE_DECL_LOG2@ | 1707 | # if !@HAVE_LOG2@ |
| 1764 | # undef log2 | 1708 | # undef log2 |
| 1765 | _GL_FUNCDECL_SYS (log2, double, (double x), ); | 1709 | _GL_FUNCDECL_SYS (log2, double, (double x), ); |
| 1766 | # endif | 1710 | # endif |
| @@ -1770,7 +1714,6 @@ _GL_CXXALIAS_SYS (log2, double, (double x)); | |||
| 1770 | _GL_CXXALIASWARN1 (log2, double, (double x)); | 1714 | _GL_CXXALIASWARN1 (log2, double, (double x)); |
| 1771 | # endif | 1715 | # endif |
| 1772 | #elif defined GNULIB_POSIXCHECK | 1716 | #elif defined GNULIB_POSIXCHECK |
| 1773 | # undef log2 | ||
| 1774 | # if HAVE_RAW_DECL_LOG2 | 1717 | # if HAVE_RAW_DECL_LOG2 |
| 1775 | _GL_WARN_ON_USE (log2, "log2 is unportable - " | 1718 | _GL_WARN_ON_USE (log2, "log2 is unportable - " |
| 1776 | "use gnulib module log2 for portability"); | 1719 | "use gnulib module log2 for portability"); |
| @@ -1786,7 +1729,7 @@ _GL_WARN_ON_USE (log2, "log2 is unportable - " | |||
| 1786 | _GL_FUNCDECL_RPL (log2l, long double, (long double x), ); | 1729 | _GL_FUNCDECL_RPL (log2l, long double, (long double x), ); |
| 1787 | _GL_CXXALIAS_RPL (log2l, long double, (long double x)); | 1730 | _GL_CXXALIAS_RPL (log2l, long double, (long double x)); |
| 1788 | # else | 1731 | # else |
| 1789 | # if !@HAVE_DECL_LOG2L@ | 1732 | # if !@HAVE_LOG2L@ |
| 1790 | _GL_FUNCDECL_SYS (log2l, long double, (long double x), ); | 1733 | _GL_FUNCDECL_SYS (log2l, long double, (long double x), ); |
| 1791 | # endif | 1734 | # endif |
| 1792 | _GL_CXXALIAS_SYS (log2l, long double, (long double x)); | 1735 | _GL_CXXALIAS_SYS (log2l, long double, (long double x)); |
| @@ -1795,7 +1738,6 @@ _GL_CXXALIAS_SYS (log2l, long double, (long double x)); | |||
| 1795 | _GL_CXXALIASWARN (log2l); | 1738 | _GL_CXXALIASWARN (log2l); |
| 1796 | # endif | 1739 | # endif |
| 1797 | #elif defined GNULIB_POSIXCHECK | 1740 | #elif defined GNULIB_POSIXCHECK |
| 1798 | # undef log2l | ||
| 1799 | # if HAVE_RAW_DECL_LOG2L | 1741 | # if HAVE_RAW_DECL_LOG2L |
| 1800 | _GL_WARN_ON_USE (log2l, "log2l is unportable - " | 1742 | _GL_WARN_ON_USE (log2l, "log2l is unportable - " |
| 1801 | "use gnulib module log2l for portability"); | 1743 | "use gnulib module log2l for portability"); |
| @@ -1819,7 +1761,6 @@ _GL_CXXALIAS_SYS (logbf, float, (float x)); | |||
| 1819 | # endif | 1761 | # endif |
| 1820 | _GL_CXXALIASWARN (logbf); | 1762 | _GL_CXXALIASWARN (logbf); |
| 1821 | #elif defined GNULIB_POSIXCHECK | 1763 | #elif defined GNULIB_POSIXCHECK |
| 1822 | # undef logbf | ||
| 1823 | # if HAVE_RAW_DECL_LOGBF | 1764 | # if HAVE_RAW_DECL_LOGBF |
| 1824 | _GL_WARN_ON_USE (logbf, "logbf is unportable - " | 1765 | _GL_WARN_ON_USE (logbf, "logbf is unportable - " |
| 1825 | "use gnulib module logbf for portability"); | 1766 | "use gnulib module logbf for portability"); |
| @@ -1844,7 +1785,6 @@ _GL_CXXALIAS_SYS (logb, double, (double x)); | |||
| 1844 | _GL_CXXALIASWARN1 (logb, double, (double x)); | 1785 | _GL_CXXALIASWARN1 (logb, double, (double x)); |
| 1845 | # endif | 1786 | # endif |
| 1846 | #elif defined GNULIB_POSIXCHECK | 1787 | #elif defined GNULIB_POSIXCHECK |
| 1847 | # undef logb | ||
| 1848 | # if HAVE_RAW_DECL_LOGB | 1788 | # if HAVE_RAW_DECL_LOGB |
| 1849 | _GL_WARN_ON_USE (logb, "logb is unportable - " | 1789 | _GL_WARN_ON_USE (logb, "logb is unportable - " |
| 1850 | "use gnulib module logb for portability"); | 1790 | "use gnulib module logb for portability"); |
| @@ -1869,7 +1809,6 @@ _GL_CXXALIAS_SYS (logbl, long double, (long double x)); | |||
| 1869 | _GL_CXXALIASWARN (logbl); | 1809 | _GL_CXXALIASWARN (logbl); |
| 1870 | # endif | 1810 | # endif |
| 1871 | #elif defined GNULIB_POSIXCHECK | 1811 | #elif defined GNULIB_POSIXCHECK |
| 1872 | # undef logbl | ||
| 1873 | # if HAVE_RAW_DECL_LOGBL | 1812 | # if HAVE_RAW_DECL_LOGBL |
| 1874 | _GL_WARN_ON_USE (logbl, "logbl is unportable - " | 1813 | _GL_WARN_ON_USE (logbl, "logbl is unportable - " |
| 1875 | "use gnulib module logbl for portability"); | 1814 | "use gnulib module logbl for portability"); |
| @@ -1886,7 +1825,6 @@ _GL_CXXALIAS_SYS (logp1f, float, (float x)); | |||
| 1886 | _GL_CXXALIASWARN1 (logp1f, float, (float x)); | 1825 | _GL_CXXALIASWARN1 (logp1f, float, (float x)); |
| 1887 | # endif | 1826 | # endif |
| 1888 | #elif defined GNULIB_POSIXCHECK | 1827 | #elif defined GNULIB_POSIXCHECK |
| 1889 | # undef logp1f | ||
| 1890 | # if HAVE_RAW_DECL_LOGP1F | 1828 | # if HAVE_RAW_DECL_LOGP1F |
| 1891 | _GL_WARN_ON_USE (logp1f, "logp1f is unportable - " | 1829 | _GL_WARN_ON_USE (logp1f, "logp1f is unportable - " |
| 1892 | "use gnulib module logp1f for portability"); | 1830 | "use gnulib module logp1f for portability"); |
| @@ -1902,7 +1840,6 @@ _GL_CXXALIAS_SYS (logp1, double, (double x)); | |||
| 1902 | _GL_CXXALIASWARN1 (logp1, double, (double x)); | 1840 | _GL_CXXALIASWARN1 (logp1, double, (double x)); |
| 1903 | # endif | 1841 | # endif |
| 1904 | #elif defined GNULIB_POSIXCHECK | 1842 | #elif defined GNULIB_POSIXCHECK |
| 1905 | # undef logp1 | ||
| 1906 | # if HAVE_RAW_DECL_LOGP1 | 1843 | # if HAVE_RAW_DECL_LOGP1 |
| 1907 | _GL_WARN_ON_USE (logp1, "logp1 is unportable - " | 1844 | _GL_WARN_ON_USE (logp1, "logp1 is unportable - " |
| 1908 | "use gnulib module logp1 for portability"); | 1845 | "use gnulib module logp1 for portability"); |
| @@ -1918,7 +1855,6 @@ _GL_CXXALIAS_SYS (logp1l, long double, (long double x)); | |||
| 1918 | _GL_CXXALIASWARN1 (logp1l, long double, (long double x)); | 1855 | _GL_CXXALIASWARN1 (logp1l, long double, (long double x)); |
| 1919 | # endif | 1856 | # endif |
| 1920 | #elif defined GNULIB_POSIXCHECK | 1857 | #elif defined GNULIB_POSIXCHECK |
| 1921 | # undef logp1l | ||
| 1922 | # if HAVE_RAW_DECL_LOGP1L | 1858 | # if HAVE_RAW_DECL_LOGP1L |
| 1923 | _GL_WARN_ON_USE (logp1l, "logp1l is unportable - " | 1859 | _GL_WARN_ON_USE (logp1l, "logp1l is unportable - " |
| 1924 | "use gnulib module logp1l for portability"); | 1860 | "use gnulib module logp1l for portability"); |
| @@ -1943,7 +1879,6 @@ _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); | |||
| 1943 | # endif | 1879 | # endif |
| 1944 | _GL_CXXALIASWARN (modff); | 1880 | _GL_CXXALIASWARN (modff); |
| 1945 | #elif defined GNULIB_POSIXCHECK | 1881 | #elif defined GNULIB_POSIXCHECK |
| 1946 | # undef modff | ||
| 1947 | # if HAVE_RAW_DECL_MODFF | 1882 | # if HAVE_RAW_DECL_MODFF |
| 1948 | _GL_WARN_ON_USE (modff, "modff is unportable - " | 1883 | _GL_WARN_ON_USE (modff, "modff is unportable - " |
| 1949 | "use gnulib module modff for portability"); | 1884 | "use gnulib module modff for portability"); |
| @@ -1966,7 +1901,6 @@ _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); | |||
| 1966 | _GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); | 1901 | _GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); |
| 1967 | # endif | 1902 | # endif |
| 1968 | #elif defined GNULIB_POSIXCHECK | 1903 | #elif defined GNULIB_POSIXCHECK |
| 1969 | # undef modf | ||
| 1970 | # if HAVE_RAW_DECL_MODF | 1904 | # if HAVE_RAW_DECL_MODF |
| 1971 | _GL_WARN_ON_USE (modf, "modf has portability problems - " | 1905 | _GL_WARN_ON_USE (modf, "modf has portability problems - " |
| 1972 | "use gnulib module modf for portability"); | 1906 | "use gnulib module modf for portability"); |
| @@ -1994,7 +1928,6 @@ _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); | |||
| 1994 | _GL_CXXALIASWARN (modfl); | 1928 | _GL_CXXALIASWARN (modfl); |
| 1995 | # endif | 1929 | # endif |
| 1996 | #elif defined GNULIB_POSIXCHECK | 1930 | #elif defined GNULIB_POSIXCHECK |
| 1997 | # undef modfl | ||
| 1998 | # if HAVE_RAW_DECL_MODFL | 1931 | # if HAVE_RAW_DECL_MODFL |
| 1999 | _GL_WARN_ON_USE (modfl, "modfl is unportable - " | 1932 | _GL_WARN_ON_USE (modfl, "modfl is unportable - " |
| 2000 | "use gnulib module modfl for portability"); | 1933 | "use gnulib module modfl for portability"); |
| @@ -2010,7 +1943,6 @@ _GL_FUNCDECL_SYS (powf, float, (float x, float y), ); | |||
| 2010 | _GL_CXXALIAS_SYS (powf, float, (float x, float y)); | 1943 | _GL_CXXALIAS_SYS (powf, float, (float x, float y)); |
| 2011 | _GL_CXXALIASWARN (powf); | 1944 | _GL_CXXALIASWARN (powf); |
| 2012 | #elif defined GNULIB_POSIXCHECK | 1945 | #elif defined GNULIB_POSIXCHECK |
| 2013 | # undef powf | ||
| 2014 | # if HAVE_RAW_DECL_POWF | 1946 | # if HAVE_RAW_DECL_POWF |
| 2015 | _GL_WARN_ON_USE (powf, "powf is unportable - " | 1947 | _GL_WARN_ON_USE (powf, "powf is unportable - " |
| 2016 | "use gnulib module powf for portability"); | 1948 | "use gnulib module powf for portability"); |
| @@ -2034,7 +1966,6 @@ _GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); | |||
| 2034 | # endif | 1966 | # endif |
| 2035 | _GL_CXXALIASWARN (remainderf); | 1967 | _GL_CXXALIASWARN (remainderf); |
| 2036 | #elif defined GNULIB_POSIXCHECK | 1968 | #elif defined GNULIB_POSIXCHECK |
| 2037 | # undef remainderf | ||
| 2038 | # if HAVE_RAW_DECL_REMAINDERF | 1969 | # if HAVE_RAW_DECL_REMAINDERF |
| 2039 | _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " | 1970 | _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " |
| 2040 | "use gnulib module remainderf for portability"); | 1971 | "use gnulib module remainderf for portability"); |
| @@ -2050,7 +1981,7 @@ _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " | |||
| 2050 | _GL_FUNCDECL_RPL (remainder, double, (double x, double y), ); | 1981 | _GL_FUNCDECL_RPL (remainder, double, (double x, double y), ); |
| 2051 | _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); | 1982 | _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); |
| 2052 | # else | 1983 | # else |
| 2053 | # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ | 1984 | # if !@HAVE_REMAINDER@ |
| 2054 | _GL_FUNCDECL_SYS (remainder, double, (double x, double y), ); | 1985 | _GL_FUNCDECL_SYS (remainder, double, (double x, double y), ); |
| 2055 | # endif | 1986 | # endif |
| 2056 | _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); | 1987 | _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); |
| @@ -2059,7 +1990,6 @@ _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); | |||
| 2059 | _GL_CXXALIASWARN1 (remainder, double, (double x, double y)); | 1990 | _GL_CXXALIASWARN1 (remainder, double, (double x, double y)); |
| 2060 | # endif | 1991 | # endif |
| 2061 | #elif defined GNULIB_POSIXCHECK | 1992 | #elif defined GNULIB_POSIXCHECK |
| 2062 | # undef remainder | ||
| 2063 | # if HAVE_RAW_DECL_REMAINDER | 1993 | # if HAVE_RAW_DECL_REMAINDER |
| 2064 | _GL_WARN_ON_USE (remainder, "remainder is unportable - " | 1994 | _GL_WARN_ON_USE (remainder, "remainder is unportable - " |
| 2065 | "use gnulib module remainder for portability"); | 1995 | "use gnulib module remainder for portability"); |
| @@ -2075,7 +2005,7 @@ _GL_WARN_ON_USE (remainder, "remainder is unportable - " | |||
| 2075 | _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y), ); | 2005 | _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y), ); |
| 2076 | _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); | 2006 | _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); |
| 2077 | # else | 2007 | # else |
| 2078 | # if !@HAVE_DECL_REMAINDERL@ | 2008 | # if !@HAVE_REMAINDERL@ |
| 2079 | # undef remainderl | 2009 | # undef remainderl |
| 2080 | # if !(defined __cplusplus && defined _AIX) | 2010 | # if !(defined __cplusplus && defined _AIX) |
| 2081 | _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y), ); | 2011 | _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y), ); |
| @@ -2087,7 +2017,6 @@ _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); | |||
| 2087 | _GL_CXXALIASWARN (remainderl); | 2017 | _GL_CXXALIASWARN (remainderl); |
| 2088 | # endif | 2018 | # endif |
| 2089 | #elif defined GNULIB_POSIXCHECK | 2019 | #elif defined GNULIB_POSIXCHECK |
| 2090 | # undef remainderl | ||
| 2091 | # if HAVE_RAW_DECL_REMAINDERL | 2020 | # if HAVE_RAW_DECL_REMAINDERL |
| 2092 | _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " | 2021 | _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " |
| 2093 | "use gnulib module remainderl for portability"); | 2022 | "use gnulib module remainderl for portability"); |
| @@ -2096,13 +2025,12 @@ _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " | |||
| 2096 | 2025 | ||
| 2097 | 2026 | ||
| 2098 | #if @GNULIB_RINTF@ | 2027 | #if @GNULIB_RINTF@ |
| 2099 | # if !@HAVE_DECL_RINTF@ | 2028 | # if !@HAVE_RINTF@ |
| 2100 | _GL_FUNCDECL_SYS (rintf, float, (float x), ); | 2029 | _GL_FUNCDECL_SYS (rintf, float, (float x), ); |
| 2101 | # endif | 2030 | # endif |
| 2102 | _GL_CXXALIAS_SYS (rintf, float, (float x)); | 2031 | _GL_CXXALIAS_SYS (rintf, float, (float x)); |
| 2103 | _GL_CXXALIASWARN (rintf); | 2032 | _GL_CXXALIASWARN (rintf); |
| 2104 | #elif defined GNULIB_POSIXCHECK | 2033 | #elif defined GNULIB_POSIXCHECK |
| 2105 | # undef rintf | ||
| 2106 | # if HAVE_RAW_DECL_RINTF | 2034 | # if HAVE_RAW_DECL_RINTF |
| 2107 | _GL_WARN_ON_USE (rintf, "rintf is unportable - " | 2035 | _GL_WARN_ON_USE (rintf, "rintf is unportable - " |
| 2108 | "use gnulib module rintf for portability"); | 2036 | "use gnulib module rintf for portability"); |
| @@ -2118,7 +2046,6 @@ _GL_CXXALIAS_SYS (rint, double, (double x)); | |||
| 2118 | _GL_CXXALIASWARN1 (rint, double, (double x)); | 2046 | _GL_CXXALIASWARN1 (rint, double, (double x)); |
| 2119 | # endif | 2047 | # endif |
| 2120 | #elif defined GNULIB_POSIXCHECK | 2048 | #elif defined GNULIB_POSIXCHECK |
| 2121 | # undef rint | ||
| 2122 | # if HAVE_RAW_DECL_RINT | 2049 | # if HAVE_RAW_DECL_RINT |
| 2123 | _GL_WARN_ON_USE (rint, "rint is unportable - " | 2050 | _GL_WARN_ON_USE (rint, "rint is unportable - " |
| 2124 | "use gnulib module rint for portability"); | 2051 | "use gnulib module rint for portability"); |
| @@ -2143,7 +2070,6 @@ _GL_CXXALIAS_SYS (rintl, long double, (long double x)); | |||
| 2143 | _GL_CXXALIASWARN (rintl); | 2070 | _GL_CXXALIASWARN (rintl); |
| 2144 | # endif | 2071 | # endif |
| 2145 | #elif defined GNULIB_POSIXCHECK | 2072 | #elif defined GNULIB_POSIXCHECK |
| 2146 | # undef rintl | ||
| 2147 | # if HAVE_RAW_DECL_RINTL | 2073 | # if HAVE_RAW_DECL_RINTL |
| 2148 | _GL_WARN_ON_USE (rintl, "rintl is unportable - " | 2074 | _GL_WARN_ON_USE (rintl, "rintl is unportable - " |
| 2149 | "use gnulib module rintl for portability"); | 2075 | "use gnulib module rintl for portability"); |
| @@ -2160,14 +2086,13 @@ _GL_WARN_ON_USE (rintl, "rintl is unportable - " | |||
| 2160 | _GL_FUNCDECL_RPL (roundf, float, (float x), ); | 2086 | _GL_FUNCDECL_RPL (roundf, float, (float x), ); |
| 2161 | _GL_CXXALIAS_RPL (roundf, float, (float x)); | 2087 | _GL_CXXALIAS_RPL (roundf, float, (float x)); |
| 2162 | # else | 2088 | # else |
| 2163 | # if !@HAVE_DECL_ROUNDF@ | 2089 | # if !@HAVE_ROUNDF@ |
| 2164 | _GL_FUNCDECL_SYS (roundf, float, (float x), ); | 2090 | _GL_FUNCDECL_SYS (roundf, float, (float x), ); |
| 2165 | # endif | 2091 | # endif |
| 2166 | _GL_CXXALIAS_SYS (roundf, float, (float x)); | 2092 | _GL_CXXALIAS_SYS (roundf, float, (float x)); |
| 2167 | # endif | 2093 | # endif |
| 2168 | _GL_CXXALIASWARN (roundf); | 2094 | _GL_CXXALIASWARN (roundf); |
| 2169 | #elif defined GNULIB_POSIXCHECK | 2095 | #elif defined GNULIB_POSIXCHECK |
| 2170 | # undef roundf | ||
| 2171 | # if HAVE_RAW_DECL_ROUNDF | 2096 | # if HAVE_RAW_DECL_ROUNDF |
| 2172 | _GL_WARN_ON_USE (roundf, "roundf is unportable - " | 2097 | _GL_WARN_ON_USE (roundf, "roundf is unportable - " |
| 2173 | "use gnulib module roundf for portability"); | 2098 | "use gnulib module roundf for portability"); |
| @@ -2183,7 +2108,7 @@ _GL_WARN_ON_USE (roundf, "roundf is unportable - " | |||
| 2183 | _GL_FUNCDECL_RPL (round, double, (double x), ); | 2108 | _GL_FUNCDECL_RPL (round, double, (double x), ); |
| 2184 | _GL_CXXALIAS_RPL (round, double, (double x)); | 2109 | _GL_CXXALIAS_RPL (round, double, (double x)); |
| 2185 | # else | 2110 | # else |
| 2186 | # if !@HAVE_DECL_ROUND@ | 2111 | # if !@HAVE_ROUND@ |
| 2187 | _GL_FUNCDECL_SYS (round, double, (double x), ); | 2112 | _GL_FUNCDECL_SYS (round, double, (double x), ); |
| 2188 | # endif | 2113 | # endif |
| 2189 | _GL_CXXALIAS_SYS (round, double, (double x)); | 2114 | _GL_CXXALIAS_SYS (round, double, (double x)); |
| @@ -2192,7 +2117,6 @@ _GL_CXXALIAS_SYS (round, double, (double x)); | |||
| 2192 | _GL_CXXALIASWARN1 (round, double, (double x)); | 2117 | _GL_CXXALIASWARN1 (round, double, (double x)); |
| 2193 | # endif | 2118 | # endif |
| 2194 | #elif defined GNULIB_POSIXCHECK | 2119 | #elif defined GNULIB_POSIXCHECK |
| 2195 | # undef round | ||
| 2196 | # if HAVE_RAW_DECL_ROUND | 2120 | # if HAVE_RAW_DECL_ROUND |
| 2197 | _GL_WARN_ON_USE (round, "round is unportable - " | 2121 | _GL_WARN_ON_USE (round, "round is unportable - " |
| 2198 | "use gnulib module round for portability"); | 2122 | "use gnulib module round for portability"); |
| @@ -2208,7 +2132,7 @@ _GL_WARN_ON_USE (round, "round is unportable - " | |||
| 2208 | _GL_FUNCDECL_RPL (roundl, long double, (long double x), ); | 2132 | _GL_FUNCDECL_RPL (roundl, long double, (long double x), ); |
| 2209 | _GL_CXXALIAS_RPL (roundl, long double, (long double x)); | 2133 | _GL_CXXALIAS_RPL (roundl, long double, (long double x)); |
| 2210 | # else | 2134 | # else |
| 2211 | # if !@HAVE_DECL_ROUNDL@ | 2135 | # if !@HAVE_ROUNDL@ |
| 2212 | # undef roundl | 2136 | # undef roundl |
| 2213 | # if !(defined __cplusplus && defined _AIX) | 2137 | # if !(defined __cplusplus && defined _AIX) |
| 2214 | _GL_FUNCDECL_SYS (roundl, long double, (long double x), ); | 2138 | _GL_FUNCDECL_SYS (roundl, long double, (long double x), ); |
| @@ -2220,7 +2144,6 @@ _GL_CXXALIAS_SYS (roundl, long double, (long double x)); | |||
| 2220 | _GL_CXXALIASWARN (roundl); | 2144 | _GL_CXXALIASWARN (roundl); |
| 2221 | # endif | 2145 | # endif |
| 2222 | #elif defined GNULIB_POSIXCHECK | 2146 | #elif defined GNULIB_POSIXCHECK |
| 2223 | # undef roundl | ||
| 2224 | # if HAVE_RAW_DECL_ROUNDL | 2147 | # if HAVE_RAW_DECL_ROUNDL |
| 2225 | _GL_WARN_ON_USE (roundl, "roundl is unportable - " | 2148 | _GL_WARN_ON_USE (roundl, "roundl is unportable - " |
| 2226 | "use gnulib module roundl for portability"); | 2149 | "use gnulib module roundl for portability"); |
| @@ -2245,7 +2168,6 @@ _GL_CXXALIAS_SYS (sinf, float, (float x)); | |||
| 2245 | # endif | 2168 | # endif |
| 2246 | _GL_CXXALIASWARN (sinf); | 2169 | _GL_CXXALIASWARN (sinf); |
| 2247 | #elif defined GNULIB_POSIXCHECK | 2170 | #elif defined GNULIB_POSIXCHECK |
| 2248 | # undef sinf | ||
| 2249 | # if HAVE_RAW_DECL_SINF | 2171 | # if HAVE_RAW_DECL_SINF |
| 2250 | _GL_WARN_ON_USE (sinf, "sinf is unportable - " | 2172 | _GL_WARN_ON_USE (sinf, "sinf is unportable - " |
| 2251 | "use gnulib module sinf for portability"); | 2173 | "use gnulib module sinf for portability"); |
| @@ -2271,7 +2193,6 @@ _GL_CXXALIAS_SYS (sinl, long double, (long double x)); | |||
| 2271 | _GL_CXXALIASWARN (sinl); | 2193 | _GL_CXXALIASWARN (sinl); |
| 2272 | # endif | 2194 | # endif |
| 2273 | #elif defined GNULIB_POSIXCHECK | 2195 | #elif defined GNULIB_POSIXCHECK |
| 2274 | # undef sinl | ||
| 2275 | # if HAVE_RAW_DECL_SINL | 2196 | # if HAVE_RAW_DECL_SINL |
| 2276 | _GL_WARN_ON_USE (sinl, "sinl is unportable - " | 2197 | _GL_WARN_ON_USE (sinl, "sinl is unportable - " |
| 2277 | "use gnulib module sinl for portability"); | 2198 | "use gnulib module sinl for portability"); |
| @@ -2296,7 +2217,6 @@ _GL_CXXALIAS_SYS (sinhf, float, (float x)); | |||
| 2296 | # endif | 2217 | # endif |
| 2297 | _GL_CXXALIASWARN (sinhf); | 2218 | _GL_CXXALIASWARN (sinhf); |
| 2298 | #elif defined GNULIB_POSIXCHECK | 2219 | #elif defined GNULIB_POSIXCHECK |
| 2299 | # undef sinhf | ||
| 2300 | # if HAVE_RAW_DECL_SINHF | 2220 | # if HAVE_RAW_DECL_SINHF |
| 2301 | _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " | 2221 | _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " |
| 2302 | "use gnulib module sinhf for portability"); | 2222 | "use gnulib module sinhf for portability"); |
| @@ -2321,7 +2241,6 @@ _GL_CXXALIAS_SYS (sqrtf, float, (float x)); | |||
| 2321 | # endif | 2241 | # endif |
| 2322 | _GL_CXXALIASWARN (sqrtf); | 2242 | _GL_CXXALIASWARN (sqrtf); |
| 2323 | #elif defined GNULIB_POSIXCHECK | 2243 | #elif defined GNULIB_POSIXCHECK |
| 2324 | # undef sqrtf | ||
| 2325 | # if HAVE_RAW_DECL_SQRTF | 2244 | # if HAVE_RAW_DECL_SQRTF |
| 2326 | _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " | 2245 | _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " |
| 2327 | "use gnulib module sqrtf for portability"); | 2246 | "use gnulib module sqrtf for portability"); |
| @@ -2347,7 +2266,6 @@ _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); | |||
| 2347 | _GL_CXXALIASWARN (sqrtl); | 2266 | _GL_CXXALIASWARN (sqrtl); |
| 2348 | # endif | 2267 | # endif |
| 2349 | #elif defined GNULIB_POSIXCHECK | 2268 | #elif defined GNULIB_POSIXCHECK |
| 2350 | # undef sqrtl | ||
| 2351 | # if HAVE_RAW_DECL_SQRTL | 2269 | # if HAVE_RAW_DECL_SQRTL |
| 2352 | _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " | 2270 | _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " |
| 2353 | "use gnulib module sqrtl for portability"); | 2271 | "use gnulib module sqrtl for portability"); |
| @@ -2372,7 +2290,6 @@ _GL_CXXALIAS_SYS (tanf, float, (float x)); | |||
| 2372 | # endif | 2290 | # endif |
| 2373 | _GL_CXXALIASWARN (tanf); | 2291 | _GL_CXXALIASWARN (tanf); |
| 2374 | #elif defined GNULIB_POSIXCHECK | 2292 | #elif defined GNULIB_POSIXCHECK |
| 2375 | # undef tanf | ||
| 2376 | # if HAVE_RAW_DECL_TANF | 2293 | # if HAVE_RAW_DECL_TANF |
| 2377 | _GL_WARN_ON_USE (tanf, "tanf is unportable - " | 2294 | _GL_WARN_ON_USE (tanf, "tanf is unportable - " |
| 2378 | "use gnulib module tanf for portability"); | 2295 | "use gnulib module tanf for portability"); |
| @@ -2389,7 +2306,6 @@ _GL_CXXALIAS_SYS (tanl, long double, (long double x)); | |||
| 2389 | _GL_CXXALIASWARN (tanl); | 2306 | _GL_CXXALIASWARN (tanl); |
| 2390 | # endif | 2307 | # endif |
| 2391 | #elif defined GNULIB_POSIXCHECK | 2308 | #elif defined GNULIB_POSIXCHECK |
| 2392 | # undef tanl | ||
| 2393 | # if HAVE_RAW_DECL_TANL | 2309 | # if HAVE_RAW_DECL_TANL |
| 2394 | _GL_WARN_ON_USE (tanl, "tanl is unportable - " | 2310 | _GL_WARN_ON_USE (tanl, "tanl is unportable - " |
| 2395 | "use gnulib module tanl for portability"); | 2311 | "use gnulib module tanl for portability"); |
| @@ -2414,7 +2330,6 @@ _GL_CXXALIAS_SYS (tanhf, float, (float x)); | |||
| 2414 | # endif | 2330 | # endif |
| 2415 | _GL_CXXALIASWARN (tanhf); | 2331 | _GL_CXXALIASWARN (tanhf); |
| 2416 | #elif defined GNULIB_POSIXCHECK | 2332 | #elif defined GNULIB_POSIXCHECK |
| 2417 | # undef tanhf | ||
| 2418 | # if HAVE_RAW_DECL_TANHF | 2333 | # if HAVE_RAW_DECL_TANHF |
| 2419 | _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " | 2334 | _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " |
| 2420 | "use gnulib module tanhf for portability"); | 2335 | "use gnulib module tanhf for portability"); |
| @@ -2438,7 +2353,6 @@ _GL_CXXALIAS_SYS (truncf, float, (float x)); | |||
| 2438 | # endif | 2353 | # endif |
| 2439 | _GL_CXXALIASWARN (truncf); | 2354 | _GL_CXXALIASWARN (truncf); |
| 2440 | #elif defined GNULIB_POSIXCHECK | 2355 | #elif defined GNULIB_POSIXCHECK |
| 2441 | # undef truncf | ||
| 2442 | # if HAVE_RAW_DECL_TRUNCF | 2356 | # if HAVE_RAW_DECL_TRUNCF |
| 2443 | _GL_WARN_ON_USE (truncf, "truncf is unportable - " | 2357 | _GL_WARN_ON_USE (truncf, "truncf is unportable - " |
| 2444 | "use gnulib module truncf for portability"); | 2358 | "use gnulib module truncf for portability"); |
| @@ -2463,7 +2377,6 @@ _GL_CXXALIAS_SYS (trunc, double, (double x)); | |||
| 2463 | _GL_CXXALIASWARN1 (trunc, double, (double x)); | 2377 | _GL_CXXALIASWARN1 (trunc, double, (double x)); |
| 2464 | # endif | 2378 | # endif |
| 2465 | #elif defined GNULIB_POSIXCHECK | 2379 | #elif defined GNULIB_POSIXCHECK |
| 2466 | # undef trunc | ||
| 2467 | # if HAVE_RAW_DECL_TRUNC | 2380 | # if HAVE_RAW_DECL_TRUNC |
| 2468 | _GL_WARN_ON_USE (trunc, "trunc is unportable - " | 2381 | _GL_WARN_ON_USE (trunc, "trunc is unportable - " |
| 2469 | "use gnulib module trunc for portability"); | 2382 | "use gnulib module trunc for portability"); |
| @@ -2488,7 +2401,6 @@ _GL_CXXALIAS_SYS (truncl, long double, (long double x)); | |||
| 2488 | _GL_CXXALIASWARN (truncl); | 2401 | _GL_CXXALIASWARN (truncl); |
| 2489 | # endif | 2402 | # endif |
| 2490 | #elif defined GNULIB_POSIXCHECK | 2403 | #elif defined GNULIB_POSIXCHECK |
| 2491 | # undef truncl | ||
| 2492 | # if HAVE_RAW_DECL_TRUNCL | 2404 | # if HAVE_RAW_DECL_TRUNCL |
| 2493 | _GL_WARN_ON_USE (truncl, "truncl is unportable - " | 2405 | _GL_WARN_ON_USE (truncl, "truncl is unportable - " |
| 2494 | "use gnulib module truncl for portability"); | 2406 | "use gnulib module truncl for portability"); |
| @@ -2549,18 +2461,25 @@ _GL_CXXALIASWARN (yn); | |||
| 2549 | declarations. */ | 2461 | declarations. */ |
| 2550 | 2462 | ||
| 2551 | 2463 | ||
| 2552 | #if @GNULIB_ISFINITE@ | 2464 | #if @GNULIB_ISFINITE@ || @GNULIB_ISFINITE_NO_CXX@ |
| 2553 | # if @REPLACE_ISFINITE@ | 2465 | # if @REPLACE_ISFINITE@ |
| 2554 | _GL_EXTERN_C int gl_isfinitef (float x); | 2466 | _GL_EXTERN_C int gl_isfinitef (float x); |
| 2555 | _GL_EXTERN_C int gl_isfinited (double x); | 2467 | _GL_EXTERN_C int gl_isfinited (double x); |
| 2556 | _GL_EXTERN_C int gl_isfinitel (long double x); | 2468 | _GL_EXTERN_C int gl_isfinitel (long double x); |
| 2557 | # undef isfinite | 2469 | # ifdef __cplusplus |
| 2558 | # define isfinite(x) \ | 2470 | template <typename T> int isfinite (T); |
| 2559 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | 2471 | template <> inline int isfinite<float> (float x) { return gl_isfinitef (x); } |
| 2560 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | 2472 | template <> inline int isfinite<double> (double x) { return gl_isfinited (x); } |
| 2561 | gl_isfinitef (x)) | 2473 | template <> inline int isfinite<long double> (long double x) { return gl_isfinitel (x); } |
| 2474 | # else | ||
| 2475 | # undef isfinite | ||
| 2476 | # define isfinite(x) \ | ||
| 2477 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | ||
| 2478 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | ||
| 2479 | gl_isfinitef (x)) | ||
| 2480 | # endif | ||
| 2562 | # endif | 2481 | # endif |
| 2563 | # ifdef __cplusplus | 2482 | # if @GNULIB_ISFINITE@ && defined __cplusplus |
| 2564 | # if defined isfinite || defined GNULIB_NAMESPACE | 2483 | # if defined isfinite || defined GNULIB_NAMESPACE |
| 2565 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) | 2484 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
| 2566 | # undef isfinite | 2485 | # undef isfinite |
| @@ -2584,18 +2503,25 @@ _GL_WARN_REAL_FLOATING_DECL (isfinite); | |||
| 2584 | #endif | 2503 | #endif |
| 2585 | 2504 | ||
| 2586 | 2505 | ||
| 2587 | #if @GNULIB_ISINF@ | 2506 | #if @GNULIB_ISINF@ || @GNULIB_ISINF_NO_CXX@ |
| 2588 | # if @REPLACE_ISINF@ | 2507 | # if @REPLACE_ISINF@ |
| 2589 | _GL_EXTERN_C int gl_isinff (float x); | 2508 | _GL_EXTERN_C int gl_isinff (float x); |
| 2590 | _GL_EXTERN_C int gl_isinfd (double x); | 2509 | _GL_EXTERN_C int gl_isinfd (double x); |
| 2591 | _GL_EXTERN_C int gl_isinfl (long double x); | 2510 | _GL_EXTERN_C int gl_isinfl (long double x); |
| 2592 | # undef isinf | 2511 | # ifdef __cplusplus |
| 2593 | # define isinf(x) \ | 2512 | template <typename T> int isinf (T); |
| 2594 | (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ | 2513 | template <> inline int isinf<float> (float x) { return gl_isinff (x); } |
| 2595 | sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ | 2514 | template <> inline int isinf<double> (double x) { return gl_isinfd (x); } |
| 2596 | gl_isinff (x)) | 2515 | template <> inline int isinf<long double> (long double x) { return gl_isinfl (x); } |
| 2516 | # else | ||
| 2517 | # undef isinf | ||
| 2518 | # define isinf(x) \ | ||
| 2519 | (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ | ||
| 2520 | sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ | ||
| 2521 | gl_isinff (x)) | ||
| 2522 | # endif | ||
| 2597 | # endif | 2523 | # endif |
| 2598 | # ifdef __cplusplus | 2524 | # if @GNULIB_ISINF@ && defined __cplusplus |
| 2599 | # if defined isinf || defined GNULIB_NAMESPACE | 2525 | # if defined isinf || defined GNULIB_NAMESPACE |
| 2600 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) | 2526 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
| 2601 | # undef isinf | 2527 | # undef isinf |
| @@ -2622,9 +2548,9 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); | |||
| 2622 | #if @GNULIB_ISNANF@ | 2548 | #if @GNULIB_ISNANF@ |
| 2623 | /* Test for NaN for 'float' numbers. */ | 2549 | /* Test for NaN for 'float' numbers. */ |
| 2624 | # if @HAVE_ISNANF@ | 2550 | # if @HAVE_ISNANF@ |
| 2625 | # if defined __sun || defined __sgi | 2551 | # if defined __sun |
| 2626 | /* Solaris and IRIX have isnanf() and declare it in <ieeefp.h>. We cannot | 2552 | /* Solaris has isnanf() and declares it in <ieeefp.h>. We cannot define isnanf |
| 2627 | define isnanf as a macro, because that would conflict with <ieeefp.h>. */ | 2553 | as a macro, because that would conflict with <ieeefp.h>. */ |
| 2628 | _GL_EXTERN_C int isnanf (float x); | 2554 | _GL_EXTERN_C int isnanf (float x); |
| 2629 | # else | 2555 | # else |
| 2630 | /* The original <math.h> included above provides a declaration of isnan macro | 2556 | /* The original <math.h> included above provides a declaration of isnan macro |
| @@ -2652,9 +2578,9 @@ _GL_EXTERN_C int isnanf (float x); | |||
| 2652 | This function is a gnulib extension, unlike isnan() which applied only | 2578 | This function is a gnulib extension, unlike isnan() which applied only |
| 2653 | to 'double' numbers earlier but now is a type-generic macro. */ | 2579 | to 'double' numbers earlier but now is a type-generic macro. */ |
| 2654 | # if @HAVE_ISNAND@ | 2580 | # if @HAVE_ISNAND@ |
| 2655 | # if defined __sun || defined __sgi | 2581 | # if defined __sun |
| 2656 | /* Solaris and IRIX have isnand() and declare it in <ieeefp.h>. We cannot | 2582 | /* Solaris has isnand() and declares it in <ieeefp.h>. We cannot define isnand |
| 2657 | define isnand as a macro, because that would conflict with <ieeefp.h>. */ | 2583 | as a macro, because that would conflict with <ieeefp.h>. */ |
| 2658 | _GL_EXTERN_C int isnand (double x); | 2584 | _GL_EXTERN_C int isnand (double x); |
| 2659 | # else | 2585 | # else |
| 2660 | /* The original <math.h> included above provides a declaration of isnan | 2586 | /* The original <math.h> included above provides a declaration of isnan |
| @@ -2699,7 +2625,7 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; | |||
| 2699 | #endif | 2625 | #endif |
| 2700 | 2626 | ||
| 2701 | /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ | 2627 | /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ |
| 2702 | #if @GNULIB_ISNAN@ | 2628 | #if @GNULIB_ISNAN@ || @GNULIB_ISNAN_NO_CXX@ |
| 2703 | # if @REPLACE_ISNAN@ | 2629 | # if @REPLACE_ISNAN@ |
| 2704 | /* We can't just use the isnanf macro (e.g.) as exposed by | 2630 | /* We can't just use the isnanf macro (e.g.) as exposed by |
| 2705 | isnanf.h (e.g.) here, because those may end up being macros | 2631 | isnanf.h (e.g.) here, because those may end up being macros |
| @@ -2723,19 +2649,35 @@ _GL_EXTERN_C int rpl_isnand (double x); | |||
| 2723 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | 2649 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; |
| 2724 | # define gl_isnan_l(x) rpl_isnanl (x) | 2650 | # define gl_isnan_l(x) rpl_isnanl (x) |
| 2725 | # endif | 2651 | # endif |
| 2726 | # undef isnan | 2652 | # ifdef __cplusplus |
| 2727 | # define isnan(x) \ | 2653 | # undef isnan |
| 2728 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | 2654 | template <typename T> int isnan (T); |
| 2729 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | 2655 | template <> inline int isnan<float> (float x) { return gl_isnan_f (x); } |
| 2730 | gl_isnan_f (x)) | 2656 | template <> inline int isnan<double> (double x) { return gl_isnan_d (x); } |
| 2657 | template <> inline int isnan<long double> (long double x) { return gl_isnan_l (x); } | ||
| 2658 | # else | ||
| 2659 | # undef isnan | ||
| 2660 | # define isnan(x) \ | ||
| 2661 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | ||
| 2662 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | ||
| 2663 | gl_isnan_f (x)) | ||
| 2664 | # endif | ||
| 2731 | # elif (__GNUC__ >= 4) || (__clang_major__ >= 4) | 2665 | # elif (__GNUC__ >= 4) || (__clang_major__ >= 4) |
| 2732 | # undef isnan | 2666 | # ifdef __cplusplus |
| 2733 | # define isnan(x) \ | 2667 | # undef isnan |
| 2734 | (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ | 2668 | template <typename T> int isnan (T); |
| 2735 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ | 2669 | template <> inline int isnan<float> (float x) { return __builtin_isnan (x); } |
| 2736 | __builtin_isnan ((float)(x))) | 2670 | template <> inline int isnan<double> (double x) { return __builtin_isnan (x); } |
| 2671 | template <> inline int isnan<long double> (long double x) { return __builtin_isnan (x); } | ||
| 2672 | # else | ||
| 2673 | # undef isnan | ||
| 2674 | # define isnan(x) \ | ||
| 2675 | (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ | ||
| 2676 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ | ||
| 2677 | __builtin_isnan ((float)(x))) | ||
| 2678 | # endif | ||
| 2737 | # endif | 2679 | # endif |
| 2738 | # ifdef __cplusplus | 2680 | # if @GNULIB_ISNAN@ && defined __cplusplus |
| 2739 | # if defined isnan || defined GNULIB_NAMESPACE | 2681 | # if defined isnan || defined GNULIB_NAMESPACE |
| 2740 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) | 2682 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
| 2741 | # undef isnan | 2683 | # undef isnan |
| @@ -2769,15 +2711,22 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); | |||
| 2769 | #endif | 2711 | #endif |
| 2770 | 2712 | ||
| 2771 | 2713 | ||
| 2772 | #if @GNULIB_SIGNBIT@ | 2714 | #if @GNULIB_SIGNBIT@ || @GNULIB_SIGNBIT_NO_CXX@ |
| 2773 | # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ | 2715 | # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ |
| 2774 | && (!defined __cplusplus || __cplusplus < 201103)) | 2716 | && (!defined __cplusplus || __cplusplus < 201103)) |
| 2775 | # undef signbit | 2717 | # undef signbit |
| 2776 | /* GCC >= 4.0 and clang provide three built-ins for signbit. */ | 2718 | /* GCC >= 4.0 and clang provide three built-ins for signbit. */ |
| 2777 | # define signbit(x) \ | 2719 | # if defined __cplusplus && !defined __clang__ |
| 2778 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | 2720 | template <typename T> int signbit (T); |
| 2779 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | 2721 | template <> inline int signbit<float> (float x) { return __builtin_signbitf (x); } |
| 2780 | __builtin_signbitf (x)) | 2722 | template <> inline int signbit<double> (double x) { return __builtin_signbit (x); } |
| 2723 | template <> inline int signbit<long double> (long double x) { return __builtin_signbitl (x); } | ||
| 2724 | # else | ||
| 2725 | # define signbit(x) \ | ||
| 2726 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | ||
| 2727 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | ||
| 2728 | __builtin_signbitf (x)) | ||
| 2729 | # endif | ||
| 2781 | # endif | 2730 | # endif |
| 2782 | # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit | 2731 | # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit |
| 2783 | # undef signbit | 2732 | # undef signbit |
| @@ -2821,13 +2770,20 @@ _GL_EXTERN_C int gl_signbitl (long double arg); | |||
| 2821 | }) | 2770 | }) |
| 2822 | # endif | 2771 | # endif |
| 2823 | # endif | 2772 | # endif |
| 2824 | # define signbit(x) \ | 2773 | # if defined __cplusplus && !defined __clang__ |
| 2825 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | 2774 | template <typename T> int signbit (T); |
| 2826 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | 2775 | template <> inline int signbit<float> (float x) { return gl_signbitf (x); } |
| 2827 | gl_signbitf (x)) | 2776 | template <> inline int signbit<double> (double x) { return gl_signbitd (x); } |
| 2777 | template <> inline int signbit<long double> (long double x) { return gl_signbitl (x); } | ||
| 2778 | # else | ||
| 2779 | # define signbit(x) \ | ||
| 2780 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | ||
| 2781 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | ||
| 2782 | gl_signbitf (x)) | ||
| 2783 | # endif | ||
| 2828 | # define GNULIB_defined_signbit 1 | 2784 | # define GNULIB_defined_signbit 1 |
| 2829 | # endif | 2785 | # endif |
| 2830 | # ifdef __cplusplus | 2786 | # if @GNULIB_SIGNBIT@ && defined __cplusplus |
| 2831 | # if defined signbit || defined GNULIB_NAMESPACE | 2787 | # if defined signbit || defined GNULIB_NAMESPACE |
| 2832 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) | 2788 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
| 2833 | # undef signbit | 2789 | # undef signbit |
| @@ -2867,7 +2823,6 @@ _GL_CXXALIAS_SYS (getpayloadf, float, (const float *)); | |||
| 2867 | # endif | 2823 | # endif |
| 2868 | _GL_CXXALIASWARN (getpayloadf); | 2824 | _GL_CXXALIASWARN (getpayloadf); |
| 2869 | #elif defined GNULIB_POSIXCHECK | 2825 | #elif defined GNULIB_POSIXCHECK |
| 2870 | # undef getpayloadf | ||
| 2871 | # if HAVE_RAW_DECL_GETPAYLOADF | 2826 | # if HAVE_RAW_DECL_GETPAYLOADF |
| 2872 | _GL_WARN_ON_USE (getpayloadf, "getpayloadf is unportable - " | 2827 | _GL_WARN_ON_USE (getpayloadf, "getpayloadf is unportable - " |
| 2873 | "use gnulib module getpayloadf for portability"); | 2828 | "use gnulib module getpayloadf for portability"); |
| @@ -2890,7 +2845,6 @@ _GL_CXXALIAS_SYS (getpayload, double, (const double *)); | |||
| 2890 | # endif | 2845 | # endif |
| 2891 | _GL_CXXALIASWARN (getpayload); | 2846 | _GL_CXXALIASWARN (getpayload); |
| 2892 | #elif defined GNULIB_POSIXCHECK | 2847 | #elif defined GNULIB_POSIXCHECK |
| 2893 | # undef getpayload | ||
| 2894 | # if HAVE_RAW_DECL_GETPAYLOAD | 2848 | # if HAVE_RAW_DECL_GETPAYLOAD |
| 2895 | _GL_WARN_ON_USE (getpayload, "getpayload is unportable - " | 2849 | _GL_WARN_ON_USE (getpayload, "getpayload is unportable - " |
| 2896 | "use gnulib module getpayload for portability"); | 2850 | "use gnulib module getpayload for portability"); |
| @@ -2913,7 +2867,6 @@ _GL_CXXALIAS_SYS (getpayloadl, long double, (const long double *)); | |||
| 2913 | # endif | 2867 | # endif |
| 2914 | _GL_CXXALIASWARN (getpayloadl); | 2868 | _GL_CXXALIASWARN (getpayloadl); |
| 2915 | #elif defined GNULIB_POSIXCHECK | 2869 | #elif defined GNULIB_POSIXCHECK |
| 2916 | # undef getpayloadl | ||
| 2917 | # if HAVE_RAW_DECL_GETPAYLOADL | 2870 | # if HAVE_RAW_DECL_GETPAYLOADL |
| 2918 | _GL_WARN_ON_USE (getpayloadl, "getpayloadl is unportable - " | 2871 | _GL_WARN_ON_USE (getpayloadl, "getpayloadl is unportable - " |
| 2919 | "use gnulib module getpayloadl for portability"); | 2872 | "use gnulib module getpayloadl for portability"); |
| @@ -2928,7 +2881,6 @@ _GL_FUNCDECL_SYS (setpayloadf, int, (float *, float), ); | |||
| 2928 | _GL_CXXALIAS_SYS (setpayloadf, int, (float *, float)); | 2881 | _GL_CXXALIAS_SYS (setpayloadf, int, (float *, float)); |
| 2929 | _GL_CXXALIASWARN (setpayloadf); | 2882 | _GL_CXXALIASWARN (setpayloadf); |
| 2930 | #elif defined GNULIB_POSIXCHECK | 2883 | #elif defined GNULIB_POSIXCHECK |
| 2931 | # undef setpayloadf | ||
| 2932 | # if HAVE_RAW_DECL_SETPAYLOADF | 2884 | # if HAVE_RAW_DECL_SETPAYLOADF |
| 2933 | _GL_WARN_ON_USE (setpayloadf, "setpayloadf is unportable - " | 2885 | _GL_WARN_ON_USE (setpayloadf, "setpayloadf is unportable - " |
| 2934 | "use gnulib module setpayloadf for portability"); | 2886 | "use gnulib module setpayloadf for portability"); |
| @@ -2942,7 +2894,6 @@ _GL_FUNCDECL_SYS (setpayload, int, (double *, double), ); | |||
| 2942 | _GL_CXXALIAS_SYS (setpayload, int, (double *, double)); | 2894 | _GL_CXXALIAS_SYS (setpayload, int, (double *, double)); |
| 2943 | _GL_CXXALIASWARN (setpayload); | 2895 | _GL_CXXALIASWARN (setpayload); |
| 2944 | #elif defined GNULIB_POSIXCHECK | 2896 | #elif defined GNULIB_POSIXCHECK |
| 2945 | # undef setpayload | ||
| 2946 | # if HAVE_RAW_DECL_SETPAYLOAD | 2897 | # if HAVE_RAW_DECL_SETPAYLOAD |
| 2947 | _GL_WARN_ON_USE (setpayload, "setpayload is unportable - " | 2898 | _GL_WARN_ON_USE (setpayload, "setpayload is unportable - " |
| 2948 | "use gnulib module setpayload for portability"); | 2899 | "use gnulib module setpayload for portability"); |
| @@ -2956,7 +2907,6 @@ _GL_FUNCDECL_SYS (setpayloadl, int, (long double *, long double), ); | |||
| 2956 | _GL_CXXALIAS_SYS (setpayloadl, int, (long double *, long double)); | 2907 | _GL_CXXALIAS_SYS (setpayloadl, int, (long double *, long double)); |
| 2957 | _GL_CXXALIASWARN (setpayloadl); | 2908 | _GL_CXXALIASWARN (setpayloadl); |
| 2958 | #elif defined GNULIB_POSIXCHECK | 2909 | #elif defined GNULIB_POSIXCHECK |
| 2959 | # undef setpayloadl | ||
| 2960 | # if HAVE_RAW_DECL_SETPAYLOADL | 2910 | # if HAVE_RAW_DECL_SETPAYLOADL |
| 2961 | _GL_WARN_ON_USE (setpayloadl, "setpayloadl is unportable - " | 2911 | _GL_WARN_ON_USE (setpayloadl, "setpayloadl is unportable - " |
| 2962 | "use gnulib module setpayloadl for portability"); | 2912 | "use gnulib module setpayloadl for portability"); |
| @@ -2971,7 +2921,6 @@ _GL_FUNCDECL_SYS (setpayloadsigf, int, (float *, float), ); | |||
| 2971 | _GL_CXXALIAS_SYS (setpayloadsigf, int, (float *, float)); | 2921 | _GL_CXXALIAS_SYS (setpayloadsigf, int, (float *, float)); |
| 2972 | _GL_CXXALIASWARN (setpayloadsigf); | 2922 | _GL_CXXALIASWARN (setpayloadsigf); |
| 2973 | #elif defined GNULIB_POSIXCHECK | 2923 | #elif defined GNULIB_POSIXCHECK |
| 2974 | # undef setpayloadsigf | ||
| 2975 | # if HAVE_RAW_DECL_SETPAYLOADSIGF | 2924 | # if HAVE_RAW_DECL_SETPAYLOADSIGF |
| 2976 | _GL_WARN_ON_USE (setpayloadsigf, "setpayloadsigf is unportable - " | 2925 | _GL_WARN_ON_USE (setpayloadsigf, "setpayloadsigf is unportable - " |
| 2977 | "use gnulib module setpayloadsigf for portability"); | 2926 | "use gnulib module setpayloadsigf for portability"); |
| @@ -2985,7 +2934,6 @@ _GL_FUNCDECL_SYS (setpayloadsig, int, (double *, double), ); | |||
| 2985 | _GL_CXXALIAS_SYS (setpayloadsig, int, (double *, double)); | 2934 | _GL_CXXALIAS_SYS (setpayloadsig, int, (double *, double)); |
| 2986 | _GL_CXXALIASWARN (setpayloadsig); | 2935 | _GL_CXXALIASWARN (setpayloadsig); |
| 2987 | #elif defined GNULIB_POSIXCHECK | 2936 | #elif defined GNULIB_POSIXCHECK |
| 2988 | # undef setpayloadsig | ||
| 2989 | # if HAVE_RAW_DECL_SETPAYLOADSIG | 2937 | # if HAVE_RAW_DECL_SETPAYLOADSIG |
| 2990 | _GL_WARN_ON_USE (setpayloadsig, "setpayloadsig is unportable - " | 2938 | _GL_WARN_ON_USE (setpayloadsig, "setpayloadsig is unportable - " |
| 2991 | "use gnulib module setpayloadsig for portability"); | 2939 | "use gnulib module setpayloadsig for portability"); |
| @@ -2999,7 +2947,6 @@ _GL_FUNCDECL_SYS (setpayloadsigl, int, (long double *, long double), ); | |||
| 2999 | _GL_CXXALIAS_SYS (setpayloadsigl, int, (long double *, long double)); | 2947 | _GL_CXXALIAS_SYS (setpayloadsigl, int, (long double *, long double)); |
| 3000 | _GL_CXXALIASWARN (setpayloadsigl); | 2948 | _GL_CXXALIASWARN (setpayloadsigl); |
| 3001 | #elif defined GNULIB_POSIXCHECK | 2949 | #elif defined GNULIB_POSIXCHECK |
| 3002 | # undef setpayloadsigl | ||
| 3003 | # if HAVE_RAW_DECL_SETPAYLOADSIGL | 2950 | # if HAVE_RAW_DECL_SETPAYLOADSIGL |
| 3004 | _GL_WARN_ON_USE (setpayloadsigl, "setpayloadsigl is unportable - " | 2951 | _GL_WARN_ON_USE (setpayloadsigl, "setpayloadsigl is unportable - " |
| 3005 | "use gnulib module setpayloadsigl for portability"); | 2952 | "use gnulib module setpayloadsigl for portability"); |
| @@ -3023,7 +2970,6 @@ _GL_CXXALIAS_SYS (totalorderf, int, (float const *, float const *)); | |||
| 3023 | # endif | 2970 | # endif |
| 3024 | _GL_CXXALIASWARN (totalorderf); | 2971 | _GL_CXXALIASWARN (totalorderf); |
| 3025 | #elif defined GNULIB_POSIXCHECK | 2972 | #elif defined GNULIB_POSIXCHECK |
| 3026 | # undef totalorderf | ||
| 3027 | # if HAVE_RAW_DECL_TOTALORDERF | 2973 | # if HAVE_RAW_DECL_TOTALORDERF |
| 3028 | _GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - " | 2974 | _GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - " |
| 3029 | "use gnulib module totalorderf for portability"); | 2975 | "use gnulib module totalorderf for portability"); |
| @@ -3048,7 +2994,6 @@ _GL_CXXALIAS_SYS (totalorder, int, (double const *, double const *)); | |||
| 3048 | _GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *)); | 2994 | _GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *)); |
| 3049 | # endif | 2995 | # endif |
| 3050 | #elif defined GNULIB_POSIXCHECK | 2996 | #elif defined GNULIB_POSIXCHECK |
| 3051 | # undef totalorder | ||
| 3052 | # if HAVE_RAW_DECL_TOTALORDER | 2997 | # if HAVE_RAW_DECL_TOTALORDER |
| 3053 | _GL_WARN_ON_USE (totalorder, "totalorder is unportable - " | 2998 | _GL_WARN_ON_USE (totalorder, "totalorder is unportable - " |
| 3054 | "use gnulib module totalorder for portability"); | 2999 | "use gnulib module totalorder for portability"); |
| @@ -3075,7 +3020,6 @@ _GL_CXXALIAS_SYS (totalorderl, int, | |||
| 3075 | # endif | 3020 | # endif |
| 3076 | _GL_CXXALIASWARN (totalorderl); | 3021 | _GL_CXXALIASWARN (totalorderl); |
| 3077 | #elif defined GNULIB_POSIXCHECK | 3022 | #elif defined GNULIB_POSIXCHECK |
| 3078 | # undef totalorderl | ||
| 3079 | # if HAVE_RAW_DECL_TOTALORDERL | 3023 | # if HAVE_RAW_DECL_TOTALORDERL |
| 3080 | _GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - " | 3024 | _GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - " |
| 3081 | "use gnulib module totalorderl for portability"); | 3025 | "use gnulib module totalorderl for portability"); |
| @@ -3101,7 +3045,6 @@ _GL_CXXALIAS_SYS (totalordermagf, int, (float const *, float const *)); | |||
| 3101 | _GL_CXXALIASWARN1 (totalordermagf, int, (float const *, float const *)); | 3045 | _GL_CXXALIASWARN1 (totalordermagf, int, (float const *, float const *)); |
| 3102 | # endif | 3046 | # endif |
| 3103 | #elif defined GNULIB_POSIXCHECK | 3047 | #elif defined GNULIB_POSIXCHECK |
| 3104 | # undef totalordermagf | ||
| 3105 | # if HAVE_RAW_DECL_TOTALORDERMAGF | 3048 | # if HAVE_RAW_DECL_TOTALORDERMAGF |
| 3106 | _GL_WARN_ON_USE (totalordermagf, "totalordermagf is unportable - " | 3049 | _GL_WARN_ON_USE (totalordermagf, "totalordermagf is unportable - " |
| 3107 | "use gnulib module totalordermagf for portability"); | 3050 | "use gnulib module totalordermagf for portability"); |
| @@ -3126,7 +3069,6 @@ _GL_CXXALIAS_SYS (totalordermag, int, (double const *, double const *)); | |||
| 3126 | _GL_CXXALIASWARN1 (totalordermag, int, (double const *, double const *)); | 3069 | _GL_CXXALIASWARN1 (totalordermag, int, (double const *, double const *)); |
| 3127 | # endif | 3070 | # endif |
| 3128 | #elif defined GNULIB_POSIXCHECK | 3071 | #elif defined GNULIB_POSIXCHECK |
| 3129 | # undef totalordermag | ||
| 3130 | # if HAVE_RAW_DECL_TOTALORDERMAG | 3072 | # if HAVE_RAW_DECL_TOTALORDERMAG |
| 3131 | _GL_WARN_ON_USE (totalordermag, "totalordermag is unportable - " | 3073 | _GL_WARN_ON_USE (totalordermag, "totalordermag is unportable - " |
| 3132 | "use gnulib module totalordermag for portability"); | 3074 | "use gnulib module totalordermag for portability"); |
| @@ -3156,7 +3098,6 @@ _GL_CXXALIASWARN1 (totalordermagl, int, | |||
| 3156 | (long double const *, long double const *)); | 3098 | (long double const *, long double const *)); |
| 3157 | # endif | 3099 | # endif |
| 3158 | #elif defined GNULIB_POSIXCHECK | 3100 | #elif defined GNULIB_POSIXCHECK |
| 3159 | # undef totalordermagl | ||
| 3160 | # if HAVE_RAW_DECL_TOTALORDERMAGL | 3101 | # if HAVE_RAW_DECL_TOTALORDERMAGL |
| 3161 | _GL_WARN_ON_USE (totalordermagl, "totalordermagl is unportable - " | 3102 | _GL_WARN_ON_USE (totalordermagl, "totalordermagl is unportable - " |
| 3162 | "use gnulib module totalordermagl for portability"); | 3103 | "use gnulib module totalordermagl for portability"); |
diff --git a/gl/mbchar.c b/gl/mbchar.c index 713c2f74..db9e2718 100644 --- a/gl/mbchar.c +++ b/gl/mbchar.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2001, 2006, 2009-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2001, 2006, 2009-2026 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is free software: you can redistribute it and/or modify | 3 | This file is free software: you can redistribute it and/or modify |
| 4 | it under the terms of the GNU Lesser General Public License as | 4 | it under the terms of the GNU Lesser General Public License as |
| @@ -14,9 +14,8 @@ | |||
| 14 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 14 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | #include <config.h> | ||
| 18 | |||
| 19 | #define MBCHAR_INLINE _GL_EXTERN_INLINE | 17 | #define MBCHAR_INLINE _GL_EXTERN_INLINE |
| 18 | #include <config.h> | ||
| 20 | 19 | ||
| 21 | #include <limits.h> | 20 | #include <limits.h> |
| 22 | 21 | ||
diff --git a/gl/mbchar.h b/gl/mbchar.h index d77168e7..20e28e5f 100644 --- a/gl/mbchar.h +++ b/gl/mbchar.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Multibyte character data type. | 1 | /* Multibyte character data type. |
| 2 | Copyright (C) 2001, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -217,12 +217,12 @@ typedef struct mbchar mbchar_t; | |||
| 217 | ((mbc1).wc_valid && (mbc2).wc_valid \ | 217 | ((mbc1).wc_valid && (mbc2).wc_valid \ |
| 218 | ? (mbc1).wc == (mbc2).wc \ | 218 | ? (mbc1).wc == (mbc2).wc \ |
| 219 | : (mbc1).bytes == (mbc2).bytes \ | 219 | : (mbc1).bytes == (mbc2).bytes \ |
| 220 | && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) | 220 | && memeq ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes)) |
| 221 | #define mb_caseequal(mbc1, mbc2) \ | 221 | #define mb_caseequal(mbc1, mbc2) \ |
| 222 | ((mbc1).wc_valid && (mbc2).wc_valid \ | 222 | ((mbc1).wc_valid && (mbc2).wc_valid \ |
| 223 | ? c32tolower ((mbc1).wc) == c32tolower ((mbc2).wc) \ | 223 | ? c32tolower ((mbc1).wc) == c32tolower ((mbc2).wc) \ |
| 224 | : (mbc1).bytes == (mbc2).bytes \ | 224 | : (mbc1).bytes == (mbc2).bytes \ |
| 225 | && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) | 225 | && memeq ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes)) |
| 226 | 226 | ||
| 227 | /* <ctype.h>, <wctype.h> classification. */ | 227 | /* <ctype.h>, <wctype.h> classification. */ |
| 228 | #define mb_isascii(mbc) \ | 228 | #define mb_isascii(mbc) \ |
| @@ -262,9 +262,14 @@ mb_width_aux (char32_t wc) | |||
| 262 | 262 | ||
| 263 | #if defined GNULIB_MBFILE | 263 | #if defined GNULIB_MBFILE |
| 264 | /* Assignment. */ | 264 | /* Assignment. */ |
| 265 | # define mb_setascii(mbc, sc) \ | 265 | MBCHAR_INLINE void |
| 266 | ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ | 266 | mb_setascii (mbchar_t *mbc, char sc) |
| 267 | (mbc)->wc = (mbc)->buf[0] = (sc)) | 267 | { |
| 268 | mbc->ptr = mbc->buf; | ||
| 269 | mbc->bytes = 1; | ||
| 270 | mbc->wc_valid = true; | ||
| 271 | mbc->wc = mbc->buf[0] = sc; | ||
| 272 | } | ||
| 268 | #endif | 273 | #endif |
| 269 | 274 | ||
| 270 | /* Copying a character. */ | 275 | /* Copying a character. */ |
diff --git a/gl/mbiterf.c b/gl/mbiterf.c index ad354c55..bb0a5cc3 100644 --- a/gl/mbiterf.c +++ b/gl/mbiterf.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Iterating through multibyte strings: macros for multi-byte encodings. | 1 | /* Iterating through multibyte strings: macros for multi-byte encodings. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define MBITERF_INLINE _GL_EXTERN_INLINE | 18 | #define MBITERF_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include "mbiterf.h" | 20 | #include "mbiterf.h" |
diff --git a/gl/mbiterf.h b/gl/mbiterf.h index 99d8d11d..50a39c0f 100644 --- a/gl/mbiterf.h +++ b/gl/mbiterf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Iterating through multibyte strings, faster: macros for multi-byte encodings. | 1 | /* Iterating through multibyte strings, faster: macros for multi-byte encodings. |
| 2 | Copyright (C) 2001, 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001, 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | mbif_next (state, iter, endptr) | 62 | mbif_next (state, iter, endptr) |
| 63 | returns the next multibyte character. | 63 | returns the next multibyte character. |
| 64 | It asssumes that the state is initialized and that iter < endptr. | 64 | It assumes that the state is initialized and that iter < endptr. |
| 65 | 65 | ||
| 66 | Here are the function prototypes of the macros. | 66 | Here are the function prototypes of the macros. |
| 67 | 67 | ||
diff --git a/gl/mbrtoc32.c b/gl/mbrtoc32.c index c4625525..4c8f5267 100644 --- a/gl/mbrtoc32.c +++ b/gl/mbrtoc32.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to 32-bit wide character. | 1 | /* Convert multibyte character to 32-bit wide character. |
| 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2020-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -30,7 +30,7 @@ | |||
| 30 | # include "lc-charset-unicode.h" | 30 | # include "lc-charset-unicode.h" |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | #if GNULIB_defined_mbstate_t /* AIX, IRIX */ | 33 | #if GNULIB_defined_mbstate_t /* AIX */ |
| 34 | /* Implement mbrtoc32() on top of mbtowc() for the non-UTF-8 locales | 34 | /* Implement mbrtoc32() on top of mbtowc() for the non-UTF-8 locales |
| 35 | and directly for the UTF-8 locales. */ | 35 | and directly for the UTF-8 locales. */ |
| 36 | 36 | ||
| @@ -165,7 +165,6 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 165 | char buf[4]; | 165 | char buf[4]; |
| 166 | const char *p; | 166 | const char *p; |
| 167 | size_t m; | 167 | size_t m; |
| 168 | int res; | ||
| 169 | 168 | ||
| 170 | switch (nstate) | 169 | switch (nstate) |
| 171 | { | 170 | { |
| @@ -198,6 +197,7 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 198 | 197 | ||
| 199 | /* Here m > 0. */ | 198 | /* Here m > 0. */ |
| 200 | 199 | ||
| 200 | int res; | ||
| 201 | { | 201 | { |
| 202 | # define FITS_IN_CHAR_TYPE(wc) 1 | 202 | # define FITS_IN_CHAR_TYPE(wc) 1 |
| 203 | # include "mbrtowc-impl-utf8.h" | 203 | # include "mbrtowc-impl-utf8.h" |
diff --git a/gl/mbrtowc-impl-utf8.h b/gl/mbrtowc-impl-utf8.h index 98858e22..ad96ca84 100644 --- a/gl/mbrtowc-impl-utf8.h +++ b/gl/mbrtowc-impl-utf8.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to wide character. | 1 | /* Convert multibyte character to wide character. |
| 2 | Copyright (C) 1999-2002, 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2002, 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/mbrtowc-impl.h b/gl/mbrtowc-impl.h index 61be6599..21a3998c 100644 --- a/gl/mbrtowc-impl.h +++ b/gl/mbrtowc-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to wide character. | 1 | /* Convert multibyte character to wide character. |
| 2 | Copyright (C) 1999-2002, 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2002, 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -41,8 +41,6 @@ | |||
| 41 | char buf[4]; | 41 | char buf[4]; |
| 42 | const char *p; | 42 | const char *p; |
| 43 | size_t m; | 43 | size_t m; |
| 44 | enc_t enc; | ||
| 45 | int res; | ||
| 46 | 44 | ||
| 47 | switch (nstate) | 45 | switch (nstate) |
| 48 | { | 46 | { |
| @@ -75,7 +73,8 @@ | |||
| 75 | 73 | ||
| 76 | /* Here m > 0. */ | 74 | /* Here m > 0. */ |
| 77 | 75 | ||
| 78 | enc = locale_encoding_classification (); | 76 | enc_t enc = locale_encoding_classification (); |
| 77 | int res; | ||
| 79 | 78 | ||
| 80 | if (enc == enc_utf8) /* UTF-8 */ | 79 | if (enc == enc_utf8) /* UTF-8 */ |
| 81 | { | 80 | { |
| @@ -89,17 +88,19 @@ | |||
| 89 | { | 88 | { |
| 90 | /* The hidden internal state of mbtowc would make this function not | 89 | /* The hidden internal state of mbtowc would make this function not |
| 91 | multi-thread safe. Achieve multi-thread safety through a lock. */ | 90 | multi-thread safe. Achieve multi-thread safety through a lock. */ |
| 92 | wchar_t wc; | 91 | { |
| 93 | res = mbtowc_with_lock (&wc, p, m); | 92 | wchar_t wc; |
| 93 | res = mbtowc_with_lock (&wc, p, m); | ||
| 94 | 94 | ||
| 95 | if (res >= 0) | 95 | if (res >= 0) |
| 96 | { | 96 | { |
| 97 | if ((wc == 0) != (res == 0)) | 97 | if ((wc == 0) != (res == 0)) |
| 98 | abort (); | 98 | abort (); |
| 99 | if (pwc != NULL) | 99 | if (pwc != NULL) |
| 100 | *pwc = wc; | 100 | *pwc = wc; |
| 101 | goto success; | 101 | goto success; |
| 102 | } | 102 | } |
| 103 | } | ||
| 103 | 104 | ||
| 104 | /* mbtowc does not distinguish between invalid and incomplete multibyte | 105 | /* mbtowc does not distinguish between invalid and incomplete multibyte |
| 105 | sequences. But mbrtowc needs to make this distinction. | 106 | sequences. But mbrtowc needs to make this distinction. |
diff --git a/gl/mbrtowc.c b/gl/mbrtowc.c index 6f0aa129..49831706 100644 --- a/gl/mbrtowc.c +++ b/gl/mbrtowc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to wide character. | 1 | /* Convert multibyte character to wide character. |
| 2 | Copyright (C) 1999-2002, 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2002, 2005-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -81,10 +81,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 81 | size_t | 81 | size_t |
| 82 | rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) | 82 | rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) |
| 83 | { | 83 | { |
| 84 | size_t ret; | 84 | # if MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG |
| 85 | wchar_t wc; | ||
| 86 | |||
| 87 | # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG | ||
| 88 | if (s == NULL) | 85 | if (s == NULL) |
| 89 | { | 86 | { |
| 90 | pwc = NULL; | 87 | pwc = NULL; |
| @@ -98,6 +95,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 98 | return (size_t) -2; | 95 | return (size_t) -2; |
| 99 | # endif | 96 | # endif |
| 100 | 97 | ||
| 98 | wchar_t wc; | ||
| 101 | if (! pwc) | 99 | if (! pwc) |
| 102 | pwc = &wc; | 100 | pwc = &wc; |
| 103 | 101 | ||
| @@ -116,7 +114,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 116 | size_t count = 0; | 114 | size_t count = 0; |
| 117 | for (; n > 0; s++, n--) | 115 | for (; n > 0; s++, n--) |
| 118 | { | 116 | { |
| 119 | ret = mbrtowc (&wc, s, 1, ps); | 117 | size_t ret = mbrtowc (&wc, s, 1, ps); |
| 120 | 118 | ||
| 121 | if (ret == (size_t)(-1)) | 119 | if (ret == (size_t)(-1)) |
| 122 | return (size_t)(-1); | 120 | return (size_t)(-1); |
| @@ -133,6 +131,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) | |||
| 133 | } | 131 | } |
| 134 | # endif | 132 | # endif |
| 135 | 133 | ||
| 134 | size_t ret; | ||
| 136 | # if MBRTOWC_STORES_INCOMPLETE_BUG | 135 | # if MBRTOWC_STORES_INCOMPLETE_BUG |
| 137 | ret = mbrtowc (&wc, s, n, ps); | 136 | ret = mbrtowc (&wc, s, n, ps); |
| 138 | if (ret < (size_t) -2 && pwc != NULL) | 137 | if (ret < (size_t) -2 && pwc != NULL) |
diff --git a/gl/mbsinit.c b/gl/mbsinit.c index 2df30b32..6252aa7a 100644 --- a/gl/mbsinit.c +++ b/gl/mbsinit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test for initial conversion state. | 1 | /* Test for initial conversion state. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/mbsnlen.c b/gl/mbsnlen.c index 9c25465a..bcca569b 100644 --- a/gl/mbsnlen.c +++ b/gl/mbsnlen.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Counting the multibyte characters in a string. | 1 | /* Counting the multibyte characters in a string. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2007. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2007. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/mbszero.c b/gl/mbszero.c index 36fc9200..b63b2c04 100644 --- a/gl/mbszero.c +++ b/gl/mbszero.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Put an mbstate_t into an initial conversion state. | 1 | /* Put an mbstate_t into an initial conversion state. |
| 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/mbtowc-impl.h b/gl/mbtowc-impl.h index 3366c9da..c6d61968 100644 --- a/gl/mbtowc-impl.h +++ b/gl/mbtowc-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to wide character. | 1 | /* Convert multibyte character to wide character. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -27,11 +27,10 @@ mbtowc (wchar_t *pwc, const char *s, size_t n) | |||
| 27 | else | 27 | else |
| 28 | { | 28 | { |
| 29 | mbstate_t state; | 29 | mbstate_t state; |
| 30 | wchar_t wc; | ||
| 31 | size_t result; | ||
| 32 | |||
| 33 | mbszero (&state); | 30 | mbszero (&state); |
| 34 | result = mbrtowc (&wc, s, n, &state); | 31 | |
| 32 | wchar_t wc; | ||
| 33 | size_t result = mbrtowc (&wc, s, n, &state); | ||
| 35 | if (result == (size_t)-1 || result == (size_t)-2) | 34 | if (result == (size_t)-1 || result == (size_t)-2) |
| 36 | { | 35 | { |
| 37 | errno = EILSEQ; | 36 | errno = EILSEQ; |
diff --git a/gl/mbtowc-lock.c b/gl/mbtowc-lock.c index e350608b..14106188 100644 --- a/gl/mbtowc-lock.c +++ b/gl/mbtowc-lock.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Return the internal lock used by mbrtowc and mbrtoc32. | 1 | /* Return the internal lock used by mbrtowc and mbrtoc32. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/mbtowc-lock.h b/gl/mbtowc-lock.h index 500f74cc..b3e4e28e 100644 --- a/gl/mbtowc-lock.h +++ b/gl/mbtowc-lock.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Use the internal lock used by mbrtowc and mbrtoc32. | 1 | /* Use the internal lock used by mbrtowc and mbrtoc32. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -23,7 +23,7 @@ mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m) | |||
| 23 | { | 23 | { |
| 24 | /* Put the hidden internal state of mbtowc into an initial state. | 24 | /* Put the hidden internal state of mbtowc into an initial state. |
| 25 | This is needed at least with glibc, uClibc, and MSVC CRT. | 25 | This is needed at least with glibc, uClibc, and MSVC CRT. |
| 26 | See <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */ | 26 | See <https://sourceware.org/PR9674>. */ |
| 27 | mbtowc (NULL, NULL, 0); | 27 | mbtowc (NULL, NULL, 0); |
| 28 | 28 | ||
| 29 | return mbtowc (pwc, p, m); | 29 | return mbtowc (pwc, p, m); |
| @@ -50,16 +50,15 @@ static int | |||
| 50 | mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) | 50 | mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) |
| 51 | { | 51 | { |
| 52 | CRITICAL_SECTION *lock = gl_get_mbtowc_lock (); | 52 | CRITICAL_SECTION *lock = gl_get_mbtowc_lock (); |
| 53 | int ret; | ||
| 54 | 53 | ||
| 55 | EnterCriticalSection (lock); | 54 | EnterCriticalSection (lock); |
| 56 | ret = mbtowc_unlocked (pwc, p, m); | 55 | int ret = mbtowc_unlocked (pwc, p, m); |
| 57 | LeaveCriticalSection (lock); | 56 | LeaveCriticalSection (lock); |
| 58 | 57 | ||
| 59 | return ret; | 58 | return ret; |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | #elif HAVE_PTHREAD_API /* AIX, IRIX, Cygwin */ | 61 | #elif HAVE_PTHREAD_API /* AIX, Cygwin */ |
| 63 | 62 | ||
| 64 | extern | 63 | extern |
| 65 | # if defined _WIN32 || defined __CYGWIN__ | 64 | # if defined _WIN32 || defined __CYGWIN__ |
| @@ -67,7 +66,7 @@ extern | |||
| 67 | # endif | 66 | # endif |
| 68 | pthread_mutex_t *gl_get_mbtowc_lock (void); | 67 | pthread_mutex_t *gl_get_mbtowc_lock (void); |
| 69 | 68 | ||
| 70 | # if HAVE_WEAK_SYMBOLS /* IRIX */ | 69 | # if HAVE_WEAK_SYMBOLS |
| 71 | 70 | ||
| 72 | /* Avoid the need to link with '-lpthread'. */ | 71 | /* Avoid the need to link with '-lpthread'. */ |
| 73 | # pragma weak pthread_mutex_lock | 72 | # pragma weak pthread_mutex_lock |
| @@ -89,11 +88,10 @@ mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) | |||
| 89 | if (pthread_in_use()) | 88 | if (pthread_in_use()) |
| 90 | { | 89 | { |
| 91 | pthread_mutex_t *lock = gl_get_mbtowc_lock (); | 90 | pthread_mutex_t *lock = gl_get_mbtowc_lock (); |
| 92 | int ret; | ||
| 93 | 91 | ||
| 94 | if (pthread_mutex_lock (lock)) | 92 | if (pthread_mutex_lock (lock)) |
| 95 | abort (); | 93 | abort (); |
| 96 | ret = mbtowc_unlocked (pwc, p, m); | 94 | int ret = mbtowc_unlocked (pwc, p, m); |
| 97 | if (pthread_mutex_unlock (lock)) | 95 | if (pthread_mutex_unlock (lock)) |
| 98 | abort (); | 96 | abort (); |
| 99 | 97 | ||
| @@ -111,11 +109,10 @@ static int | |||
| 111 | mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) | 109 | mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) |
| 112 | { | 110 | { |
| 113 | mtx_t *lock = gl_get_mbtowc_lock (); | 111 | mtx_t *lock = gl_get_mbtowc_lock (); |
| 114 | int ret; | ||
| 115 | 112 | ||
| 116 | if (mtx_lock (lock) != thrd_success) | 113 | if (mtx_lock (lock) != thrd_success) |
| 117 | abort (); | 114 | abort (); |
| 118 | ret = mbtowc_unlocked (pwc, p, m); | 115 | int ret = mbtowc_unlocked (pwc, p, m); |
| 119 | if (mtx_unlock (lock) != thrd_success) | 116 | if (mtx_unlock (lock) != thrd_success) |
| 120 | abort (); | 117 | abort (); |
| 121 | 118 | ||
diff --git a/gl/mbtowc.c b/gl/mbtowc.c index 27ff35c6..2f30b9fb 100644 --- a/gl/mbtowc.c +++ b/gl/mbtowc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert multibyte character to wide character. | 1 | /* Convert multibyte character to wide character. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/memchr.c b/gl/memchr.c index ef0d15f7..6adac7e1 100644 --- a/gl/memchr.c +++ b/gl/memchr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2025 | 1 | /* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2026 |
| 2 | Free Software Foundation, Inc. | 2 | Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), | 4 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), |
| @@ -65,105 +65,103 @@ __memchr (void const *s, int c_in, size_t n) | |||
| 65 | performance. */ | 65 | performance. */ |
| 66 | typedef unsigned long int longword; | 66 | typedef unsigned long int longword; |
| 67 | 67 | ||
| 68 | const unsigned char *char_ptr; | 68 | unsigned reg_char c = (unsigned char) c_in; |
| 69 | const longword *longword_ptr; | ||
| 70 | longword repeated_one; | ||
| 71 | longword repeated_c; | ||
| 72 | unsigned reg_char c; | ||
| 73 | 69 | ||
| 74 | c = (unsigned char) c_in; | 70 | const longword *longword_ptr; |
| 75 | 71 | ||
| 76 | /* Handle the first few bytes by reading one byte at a time. | 72 | /* Handle the first few bytes by reading one byte at a time. |
| 77 | Do this until CHAR_PTR is aligned on a longword boundary. */ | 73 | Do this until CHAR_PTR is aligned on a longword boundary. */ |
| 78 | for (char_ptr = (const unsigned char *) s; | 74 | { |
| 79 | n > 0 && (size_t) char_ptr % sizeof (longword) != 0; | 75 | const unsigned char *char_ptr; |
| 80 | --n, ++char_ptr) | 76 | for (char_ptr = (const unsigned char *) s; |
| 81 | if (*char_ptr == c) | 77 | n > 0 && (size_t) char_ptr % sizeof (longword) != 0; |
| 82 | return (void *) char_ptr; | 78 | --n, ++char_ptr) |
| 79 | if (*char_ptr == c) | ||
| 80 | return (void *) char_ptr; | ||
| 83 | 81 | ||
| 84 | longword_ptr = (const longword *) char_ptr; | 82 | longword_ptr = (const longword *) char_ptr; |
| 83 | } | ||
| 85 | 84 | ||
| 86 | /* All these elucidatory comments refer to 4-byte longwords, | 85 | /* All these elucidatory comments refer to 4-byte longwords, |
| 87 | but the theory applies equally well to any size longwords. */ | 86 | but the theory applies equally well to any size longwords. */ |
| 88 | 87 | { | |
| 89 | /* Compute auxiliary longword values: | 88 | /* Compute auxiliary longword values: |
| 90 | repeated_one is a value which has a 1 in every byte. | 89 | repeated_one is a value which has a 1 in every byte. |
| 91 | repeated_c has c in every byte. */ | 90 | repeated_c has c in every byte. */ |
| 92 | repeated_one = 0x01010101; | 91 | longword repeated_one = 0x01010101; |
| 93 | repeated_c = c | (c << 8); | 92 | longword repeated_c = c | (c << 8); |
| 94 | repeated_c |= repeated_c << 16; | 93 | repeated_c |= repeated_c << 16; |
| 95 | if (0xffffffffU < (longword) -1) | 94 | if (0xffffffffU < (longword) -1) |
| 96 | { | 95 | { |
| 97 | repeated_one |= repeated_one << 31 << 1; | 96 | repeated_one |= repeated_one << 31 << 1; |
| 98 | repeated_c |= repeated_c << 31 << 1; | 97 | repeated_c |= repeated_c << 31 << 1; |
| 99 | if (8 < sizeof (longword)) | 98 | if (8 < sizeof (longword)) |
| 100 | { | 99 | for (size_t i = 64; i < sizeof (longword) * 8; i *= 2) |
| 101 | size_t i; | ||
| 102 | |||
| 103 | for (i = 64; i < sizeof (longword) * 8; i *= 2) | ||
| 104 | { | 100 | { |
| 105 | repeated_one |= repeated_one << i; | 101 | repeated_one |= repeated_one << i; |
| 106 | repeated_c |= repeated_c << i; | 102 | repeated_c |= repeated_c << i; |
| 107 | } | 103 | } |
| 108 | } | 104 | } |
| 109 | } | 105 | |
| 110 | 106 | /* Instead of the traditional loop which tests each byte, we will test a | |
| 111 | /* Instead of the traditional loop which tests each byte, we will test a | 107 | longword at a time. The tricky part is testing if *any of the four* |
| 112 | longword at a time. The tricky part is testing if *any of the four* | 108 | bytes in the longword in question are equal to c. We first use an xor |
| 113 | bytes in the longword in question are equal to c. We first use an xor | 109 | with repeated_c. This reduces the task to testing whether *any of the |
| 114 | with repeated_c. This reduces the task to testing whether *any of the | 110 | four* bytes in longword1 is zero. |
| 115 | four* bytes in longword1 is zero. | 111 | |
| 116 | 112 | We compute tmp = | |
| 117 | We compute tmp = | 113 | ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). |
| 118 | ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). | 114 | That is, we perform the following operations: |
| 119 | That is, we perform the following operations: | 115 | 1. Subtract repeated_one. |
| 120 | 1. Subtract repeated_one. | 116 | 2. & ~longword1. |
| 121 | 2. & ~longword1. | 117 | 3. & a mask consisting of 0x80 in every byte. |
| 122 | 3. & a mask consisting of 0x80 in every byte. | 118 | Consider what happens in each byte: |
| 123 | Consider what happens in each byte: | 119 | - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, |
| 124 | - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, | 120 | and step 3 transforms it into 0x80. A carry can also be propagated |
| 125 | and step 3 transforms it into 0x80. A carry can also be propagated | 121 | to more significant bytes. |
| 126 | to more significant bytes. | 122 | - If a byte of longword1 is nonzero, let its lowest 1 bit be at |
| 127 | - If a byte of longword1 is nonzero, let its lowest 1 bit be at | 123 | position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, |
| 128 | position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, | 124 | the byte ends in a single bit of value 0 and k bits of value 1. |
| 129 | the byte ends in a single bit of value 0 and k bits of value 1. | 125 | After step 2, the result is just k bits of value 1: 2^k - 1. After |
| 130 | After step 2, the result is just k bits of value 1: 2^k - 1. After | 126 | step 3, the result is 0. And no carry is produced. |
| 131 | step 3, the result is 0. And no carry is produced. | 127 | So, if longword1 has only non-zero bytes, tmp is zero. |
| 132 | So, if longword1 has only non-zero bytes, tmp is zero. | 128 | Whereas if longword1 has a zero byte, call j the position of the least |
| 133 | Whereas if longword1 has a zero byte, call j the position of the least | 129 | significant zero byte. Then the result has a zero at positions 0, ..., |
| 134 | significant zero byte. Then the result has a zero at positions 0, ..., | 130 | j-1 and a 0x80 at position j. We cannot predict the result at the more |
| 135 | j-1 and a 0x80 at position j. We cannot predict the result at the more | 131 | significant bytes (positions j+1..3), but it does not matter since we |
| 136 | significant bytes (positions j+1..3), but it does not matter since we | 132 | already have a non-zero bit at position 8*j+7. |
| 137 | already have a non-zero bit at position 8*j+7. | 133 | |
| 138 | 134 | So, the test whether any byte in longword1 is zero is equivalent to | |
| 139 | So, the test whether any byte in longword1 is zero is equivalent to | 135 | testing whether tmp is nonzero. */ |
| 140 | testing whether tmp is nonzero. */ | 136 | |
| 141 | 137 | while (n >= sizeof (longword)) | |
| 142 | while (n >= sizeof (longword)) | 138 | { |
| 143 | { | 139 | longword longword1 = *longword_ptr ^ repeated_c; |
| 144 | longword longword1 = *longword_ptr ^ repeated_c; | 140 | |
| 145 | 141 | if ((((longword1 - repeated_one) & ~longword1) | |
| 146 | if ((((longword1 - repeated_one) & ~longword1) | 142 | & (repeated_one << 7)) != 0) |
| 147 | & (repeated_one << 7)) != 0) | 143 | break; |
| 148 | break; | 144 | longword_ptr++; |
| 149 | longword_ptr++; | 145 | n -= sizeof (longword); |
| 150 | n -= sizeof (longword); | 146 | } |
| 151 | } | 147 | } |
| 152 | 148 | ||
| 153 | char_ptr = (const unsigned char *) longword_ptr; | 149 | { |
| 154 | 150 | const unsigned char *char_ptr = (const unsigned char *) longword_ptr; | |
| 155 | /* At this point, we know that either n < sizeof (longword), or one of the | 151 | |
| 156 | sizeof (longword) bytes starting at char_ptr is == c. On little-endian | 152 | /* At this point, we know that either n < sizeof (longword), or one of the |
| 157 | machines, we could determine the first such byte without any further | 153 | sizeof (longword) bytes starting at char_ptr is == c. On little-endian |
| 158 | memory accesses, just by looking at the tmp result from the last loop | 154 | machines, we could determine the first such byte without any further |
| 159 | iteration. But this does not work on big-endian machines. Choose code | 155 | memory accesses, just by looking at the tmp result from the last loop |
| 160 | that works in both cases. */ | 156 | iteration. But this does not work on big-endian machines. Choose code |
| 161 | 157 | that works in both cases. */ | |
| 162 | for (; n > 0; --n, ++char_ptr) | 158 | |
| 163 | { | 159 | for (; n > 0; --n, ++char_ptr) |
| 164 | if (*char_ptr == c) | 160 | { |
| 165 | return (void *) char_ptr; | 161 | if (*char_ptr == c) |
| 166 | } | 162 | return (void *) char_ptr; |
| 163 | } | ||
| 164 | } | ||
| 167 | 165 | ||
| 168 | return NULL; | 166 | return NULL; |
| 169 | } | 167 | } |
diff --git a/gl/memchr.valgrind b/gl/memchr.valgrind index 8e55c207..7ab1f6ff 100644 --- a/gl/memchr.valgrind +++ b/gl/memchr.valgrind | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Suppress a valgrind message about use of uninitialized memory in memchr(). | 1 | # Suppress a valgrind message about use of uninitialized memory in memchr(). |
| 2 | 2 | ||
| 3 | # Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | # Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | # | 4 | # |
| 5 | # This file is free software: you can redistribute it and/or modify | 5 | # This file is free software: you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU Lesser General Public License as | 6 | # it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/minmax.h b/gl/minmax.h index 355de4b1..fd731fb7 100644 --- a/gl/minmax.h +++ b/gl/minmax.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* MIN, MAX macros. | 1 | /* MIN, MAX macros. |
| 2 | Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2025 Free Software | 2 | Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -19,8 +19,8 @@ | |||
| 19 | #define _MINMAX_H | 19 | #define _MINMAX_H |
| 20 | 20 | ||
| 21 | /* Note: MIN, MAX are also defined in <sys/param.h> on some systems | 21 | /* Note: MIN, MAX are also defined in <sys/param.h> on some systems |
| 22 | (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about | 22 | (glibc, HP-UX). Therefore you might get warnings about MIN, MAX |
| 23 | MIN, MAX macro redefinitions on some systems; the workaround is to | 23 | macro redefinitions on some systems; the workaround is to |
| 24 | #include this file as the last one among the #include list. */ | 24 | #include this file as the last one among the #include list. */ |
| 25 | 25 | ||
| 26 | /* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H. */ | 26 | /* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H. */ |
diff --git a/gl/mktime-internal.h b/gl/mktime-internal.h index 215be914..6ccf651c 100644 --- a/gl/mktime-internal.h +++ b/gl/mktime-internal.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Internals of mktime and related functions | 1 | /* Internals of mktime and related functions |
| 2 | Copyright 2016-2025 Free Software Foundation, Inc. | 2 | Copyright 2016-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Paul Eggert <eggert@cs.ucla.edu>. | 4 | Contributed by Paul Eggert <eggert@cs.ucla.edu>. |
| 5 | 5 | ||
diff --git a/gl/mktime.c b/gl/mktime.c index 4218fca6..c56c6f9a 100644 --- a/gl/mktime.c +++ b/gl/mktime.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert a 'struct tm' to a time_t value. | 1 | /* Convert a 'struct tm' to a time_t value. |
| 2 | Copyright (C) 1993-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1993-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Paul Eggert <eggert@twinsun.com>. | 4 | Contributed by Paul Eggert <eggert@twinsun.com>. |
| 5 | 5 | ||
| @@ -468,11 +468,9 @@ __mktime_internal (struct tm *tp, bool local, mktime_offset_t *offset) | |||
| 468 | int year_seconds_bound = 366 * 24 * 60 * 60 + 1; | 468 | int year_seconds_bound = 366 * 24 * 60 * 60 + 1; |
| 469 | int delta_bound = year_seconds_bound + stride; | 469 | int delta_bound = year_seconds_bound + stride; |
| 470 | 470 | ||
| 471 | int delta, direction; | ||
| 472 | |||
| 473 | /* Search in both directions, closest first. */ | 471 | /* Search in both directions, closest first. */ |
| 474 | for (delta = stride; delta < delta_bound; delta += stride) | 472 | for (int delta = stride; delta < delta_bound; delta += stride) |
| 475 | for (direction = -1; direction <= 1; direction += 2) | 473 | for (int direction = -1; direction <= 1; direction += 2) |
| 476 | { | 474 | { |
| 477 | long_int ot; | 475 | long_int ot; |
| 478 | if (! ckd_add (&ot, t, delta * direction)) | 476 | if (! ckd_add (&ot, t, delta * direction)) |
diff --git a/gl/mountlist.c b/gl/mountlist.c index dcff6f83..66b3f3d5 100644 --- a/gl/mountlist.c +++ b/gl/mountlist.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* mountlist.c -- return a list of mounted file systems | 1 | /* mountlist.c -- return a list of mounted file systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1997-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1991-1992, 1997-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -41,7 +41,7 @@ | |||
| 41 | # include <sys/sysmacros.h> | 41 | # include <sys/sysmacros.h> |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if defined MOUNTED_GETFSSTAT /* OSF/1, also (obsolete) Apple Darwin 1.3 */ | 44 | #if defined MOUNTED_GETFSSTAT /* (obsolete) Apple Darwin 1.3 */ |
| 45 | # if HAVE_SYS_UCRED_H | 45 | # if HAVE_SYS_UCRED_H |
| 46 | # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS, | 46 | # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS, |
| 47 | NGROUPS is used as an array dimension in ucred.h */ | 47 | NGROUPS is used as an array dimension in ucred.h */ |
| @@ -60,7 +60,7 @@ | |||
| 60 | # endif | 60 | # endif |
| 61 | #endif /* MOUNTED_GETFSSTAT */ | 61 | #endif /* MOUNTED_GETFSSTAT */ |
| 62 | 62 | ||
| 63 | #ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, IRIX, Cygwin, Android, | 63 | #ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, Cygwin, Android, |
| 64 | also (obsolete) 4.3BSD, SunOS */ | 64 | also (obsolete) 4.3BSD, SunOS */ |
| 65 | # include <mntent.h> | 65 | # include <mntent.h> |
| 66 | # include <sys/types.h> | 66 | # include <sys/types.h> |
| @@ -171,23 +171,21 @@ | |||
| 171 | #endif | 171 | #endif |
| 172 | 172 | ||
| 173 | #define ME_DUMMY_0(Fs_name, Fs_type) \ | 173 | #define ME_DUMMY_0(Fs_name, Fs_type) \ |
| 174 | (strcmp (Fs_type, "autofs") == 0 \ | 174 | (streq (Fs_type, "autofs") \ |
| 175 | || strcmp (Fs_type, "proc") == 0 \ | 175 | || streq (Fs_type, "proc") \ |
| 176 | || strcmp (Fs_type, "subfs") == 0 \ | 176 | || streq (Fs_type, "subfs") \ |
| 177 | /* for Linux 2.6/3.x */ \ | 177 | /* for Linux 2.6/3.x */ \ |
| 178 | || strcmp (Fs_type, "debugfs") == 0 \ | 178 | || streq (Fs_type, "debugfs") \ |
| 179 | || strcmp (Fs_type, "devpts") == 0 \ | 179 | || streq (Fs_type, "devpts") \ |
| 180 | || strcmp (Fs_type, "fusectl") == 0 \ | 180 | || streq (Fs_type, "fusectl") \ |
| 181 | || strcmp (Fs_type, "fuse.portal") == 0 \ | 181 | || streq (Fs_type, "fuse.portal") \ |
| 182 | || strcmp (Fs_type, "mqueue") == 0 \ | 182 | || streq (Fs_type, "mqueue") \ |
| 183 | || strcmp (Fs_type, "rpc_pipefs") == 0 \ | 183 | || streq (Fs_type, "rpc_pipefs") \ |
| 184 | || strcmp (Fs_type, "sysfs") == 0 \ | 184 | || streq (Fs_type, "sysfs") \ |
| 185 | /* FreeBSD, Linux 2.4 */ \ | 185 | /* FreeBSD, Linux 2.4 */ \ |
| 186 | || strcmp (Fs_type, "devfs") == 0 \ | 186 | || streq (Fs_type, "devfs") \ |
| 187 | /* for NetBSD 3.0 */ \ | 187 | /* for NetBSD 3.0 */ \ |
| 188 | || strcmp (Fs_type, "kernfs") == 0 \ | 188 | || streq (Fs_type, "kernfs")) |
| 189 | /* for Irix 6.5 */ \ | ||
| 190 | || strcmp (Fs_type, "ignore") == 0) | ||
| 191 | 189 | ||
| 192 | /* Historically, we have marked as "dummy" any file system of type "none", | 190 | /* Historically, we have marked as "dummy" any file system of type "none", |
| 193 | but now that programs like du need to know about bind-mounted directories, | 191 | but now that programs like du need to know about bind-mounted directories, |
| @@ -196,10 +194,10 @@ | |||
| 196 | #ifdef MOUNTED_GETMNTENT1 | 194 | #ifdef MOUNTED_GETMNTENT1 |
| 197 | # define ME_DUMMY(Fs_name, Fs_type, Bind) \ | 195 | # define ME_DUMMY(Fs_name, Fs_type, Bind) \ |
| 198 | (ME_DUMMY_0 (Fs_name, Fs_type) \ | 196 | (ME_DUMMY_0 (Fs_name, Fs_type) \ |
| 199 | || (strcmp (Fs_type, "none") == 0 && !Bind)) | 197 | || (streq (Fs_type, "none") && !Bind)) |
| 200 | #else | 198 | #else |
| 201 | # define ME_DUMMY(Fs_name, Fs_type) \ | 199 | # define ME_DUMMY(Fs_name, Fs_type) \ |
| 202 | (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) | 200 | (ME_DUMMY_0 (Fs_name, Fs_type) || streq (Fs_type, "none")) |
| 203 | #endif | 201 | #endif |
| 204 | 202 | ||
| 205 | #ifdef __CYGWIN__ | 203 | #ifdef __CYGWIN__ |
| @@ -240,19 +238,19 @@ me_remote (char const *fs_name, _GL_UNUSED char const *fs_type) | |||
| 240 | (strchr (Fs_name, ':') != NULL \ | 238 | (strchr (Fs_name, ':') != NULL \ |
| 241 | || ((Fs_name)[0] == '/' \ | 239 | || ((Fs_name)[0] == '/' \ |
| 242 | && (Fs_name)[1] == '/' \ | 240 | && (Fs_name)[1] == '/' \ |
| 243 | && (strcmp (Fs_type, "smbfs") == 0 \ | 241 | && (streq (Fs_type, "smbfs") \ |
| 244 | || strcmp (Fs_type, "smb3") == 0 \ | 242 | || streq (Fs_type, "smb3") \ |
| 245 | || strcmp (Fs_type, "cifs") == 0)) \ | 243 | || streq (Fs_type, "cifs"))) \ |
| 246 | || strcmp (Fs_type, "acfs") == 0 \ | 244 | || streq (Fs_type, "acfs") \ |
| 247 | || strcmp (Fs_type, "afs") == 0 \ | 245 | || streq (Fs_type, "afs") \ |
| 248 | || strcmp (Fs_type, "coda") == 0 \ | 246 | || streq (Fs_type, "coda") \ |
| 249 | || strcmp (Fs_type, "auristorfs") == 0 \ | 247 | || streq (Fs_type, "auristorfs") \ |
| 250 | || strcmp (Fs_type, "fhgfs") == 0 \ | 248 | || streq (Fs_type, "fhgfs") \ |
| 251 | || strcmp (Fs_type, "gpfs") == 0 \ | 249 | || streq (Fs_type, "gpfs") \ |
| 252 | || strcmp (Fs_type, "ibrix") == 0 \ | 250 | || streq (Fs_type, "ibrix") \ |
| 253 | || strcmp (Fs_type, "ocfs2") == 0 \ | 251 | || streq (Fs_type, "ocfs2") \ |
| 254 | || strcmp (Fs_type, "vxfs") == 0 \ | 252 | || streq (Fs_type, "vxfs") \ |
| 255 | || strcmp ("-hosts", Fs_name) == 0) | 253 | || streq ("-hosts", Fs_name)) |
| 256 | #endif | 254 | #endif |
| 257 | 255 | ||
| 258 | #if MOUNTED_GETMNTINFO /* Mac OS X, FreeBSD, OpenBSD, also (obsolete) 4.4BSD */ | 256 | #if MOUNTED_GETMNTINFO /* Mac OS X, FreeBSD, OpenBSD, also (obsolete) 4.4BSD */ |
| @@ -369,9 +367,7 @@ fsp_to_string (const struct statfs *fsp) | |||
| 369 | static char * | 367 | static char * |
| 370 | fstype_to_string (int t) | 368 | fstype_to_string (int t) |
| 371 | { | 369 | { |
| 372 | struct vfs_ent *e; | 370 | struct vfs_ent *e = getvfsbytype (t); |
| 373 | |||
| 374 | e = getvfsbytype (t); | ||
| 375 | if (!e || !e->vfsent_name) | 371 | if (!e || !e->vfsent_name) |
| 376 | return "none"; | 372 | return "none"; |
| 377 | else | 373 | else |
| @@ -400,10 +396,9 @@ dev_from_mount_options (char const *mount_options) | |||
| 400 | char const *optval = devopt + sizeof dev_pattern - 1; | 396 | char const *optval = devopt + sizeof dev_pattern - 1; |
| 401 | if (c_isxdigit (*optval)) | 397 | if (c_isxdigit (*optval)) |
| 402 | { | 398 | { |
| 403 | char *optvalend; | ||
| 404 | unsigned long int dev; | ||
| 405 | errno = 0; | 399 | errno = 0; |
| 406 | dev = strtoul (optval, &optvalend, 16); | 400 | char *optvalend; |
| 401 | unsigned long int dev = strtoul (optval, &optvalend, 16); | ||
| 407 | if (optval != optvalend | 402 | if (optval != optvalend |
| 408 | && (*optvalend == '\0' || *optvalend == ',') | 403 | && (*optvalend == '\0' || *optvalend == ',') |
| 409 | && ! (dev == ULONG_MAX && errno == ERANGE) | 404 | && ! (dev == ULONG_MAX && errno == ERANGE) |
| @@ -427,9 +422,9 @@ dev_from_mount_options (char const *mount_options) | |||
| 427 | static void | 422 | static void |
| 428 | unescape_tab (char *str) | 423 | unescape_tab (char *str) |
| 429 | { | 424 | { |
| 430 | size_t i, j = 0; | 425 | size_t j = 0; |
| 431 | size_t len = strlen (str) + 1; | 426 | size_t len = strlen (str) + 1; |
| 432 | for (i = 0; i < len; i++) | 427 | for (size_t i = 0; i < len; i++) |
| 433 | { | 428 | { |
| 434 | if (str[i] == '\\' && (i + 4 < len) | 429 | if (str[i] == '\\' && (i + 4 < len) |
| 435 | && str[i + 1] >= '0' && str[i + 1] <= '3' | 430 | && str[i + 1] >= '0' && str[i + 1] <= '3' |
| @@ -468,18 +463,16 @@ read_file_system_list (bool need_fs_type) | |||
| 468 | struct mount_entry **mtail = &mount_list; | 463 | struct mount_entry **mtail = &mount_list; |
| 469 | (void) need_fs_type; | 464 | (void) need_fs_type; |
| 470 | 465 | ||
| 471 | #ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, IRIX, Cygwin, Android, | 466 | #ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, Cygwin, Android, |
| 472 | also (obsolete) 4.3BSD, SunOS */ | 467 | also (obsolete) 4.3BSD, SunOS */ |
| 473 | { | 468 | { |
| 474 | FILE *fp; | ||
| 475 | |||
| 476 | # if defined __linux__ || defined __ANDROID__ | 469 | # if defined __linux__ || defined __ANDROID__ |
| 477 | /* Try parsing mountinfo first, as that make device IDs available. | 470 | /* Try parsing mountinfo first, as that make device IDs available. |
| 478 | Note we could use libmount routines to simplify this parsing a little | 471 | Note we could use libmount routines to simplify this parsing a little |
| 479 | (and that code is in previous versions of this function), however | 472 | (and that code is in previous versions of this function), however |
| 480 | libmount depends on libselinux which pulls in many dependencies. */ | 473 | libmount depends on libselinux which pulls in many dependencies. */ |
| 481 | char const *mountinfo = "/proc/self/mountinfo"; | 474 | char const *mountinfo = "/proc/self/mountinfo"; |
| 482 | fp = fopen (mountinfo, "re"); | 475 | FILE *fp = fopen (mountinfo, "re"); |
| 483 | if (fp != NULL) | 476 | if (fp != NULL) |
| 484 | { | 477 | { |
| 485 | char *line = NULL; | 478 | char *line = NULL; |
| @@ -497,61 +490,61 @@ read_file_system_list (bool need_fs_type) | |||
| 497 | &devmaj, &devmin, | 490 | &devmaj, &devmin, |
| 498 | &mntroot_s); | 491 | &mntroot_s); |
| 499 | 492 | ||
| 500 | if (rc != 2 && rc != 3) /* 3 if %n included in count. */ | 493 | if (rc == 2 || rc == 3) /* 3 if %n included in count. */ |
| 501 | continue; | 494 | { |
| 502 | 495 | /* find end of MNTROOT. */ | |
| 503 | /* find end of MNTROOT. */ | 496 | char *mntroot = line + mntroot_s; |
| 504 | char *mntroot = line + mntroot_s; | 497 | char *blank = terminate_at_blank (mntroot); |
| 505 | char *blank = terminate_at_blank (mntroot); | 498 | if (blank) |
| 506 | if (! blank) | 499 | { |
| 507 | continue; | 500 | /* find end of TARGET. */ |
| 508 | 501 | char *target = blank + 1; | |
| 509 | /* find end of TARGET. */ | 502 | blank = terminate_at_blank (target); |
| 510 | char *target = blank + 1; | 503 | if (blank) |
| 511 | blank = terminate_at_blank (target); | 504 | { |
| 512 | if (! blank) | 505 | /* skip optional fields, terminated by " - " */ |
| 513 | continue; | 506 | char *dash = strstr (blank + 1, " - "); |
| 514 | 507 | if (dash) | |
| 515 | /* skip optional fields, terminated by " - " */ | 508 | { |
| 516 | char *dash = strstr (blank + 1, " - "); | 509 | /* advance past the " - " separator. */ |
| 517 | if (! dash) | 510 | char *fstype = dash + 3; |
| 518 | continue; | 511 | blank = terminate_at_blank (fstype); |
| 519 | 512 | if (blank) | |
| 520 | /* advance past the " - " separator. */ | 513 | { |
| 521 | char *fstype = dash + 3; | 514 | /* find end of SOURCE. */ |
| 522 | blank = terminate_at_blank (fstype); | 515 | char *source = blank + 1; |
| 523 | if (! blank) | 516 | if (terminate_at_blank (source)) |
| 524 | continue; | 517 | { |
| 525 | 518 | /* manipulate the sub-strings in place. */ | |
| 526 | /* find end of SOURCE. */ | 519 | unescape_tab (source); |
| 527 | char *source = blank + 1; | 520 | unescape_tab (target); |
| 528 | if (! terminate_at_blank (source)) | 521 | unescape_tab (mntroot); |
| 529 | continue; | 522 | unescape_tab (fstype); |
| 530 | 523 | ||
| 531 | /* manipulate the sub-strings in place. */ | 524 | me = xmalloc (sizeof *me); |
| 532 | unescape_tab (source); | 525 | |
| 533 | unescape_tab (target); | 526 | me->me_devname = xstrdup (source); |
| 534 | unescape_tab (mntroot); | 527 | me->me_mountdir = xstrdup (target); |
| 535 | unescape_tab (fstype); | 528 | me->me_mntroot = xstrdup (mntroot); |
| 536 | 529 | me->me_type = xstrdup (fstype); | |
| 537 | me = xmalloc (sizeof *me); | 530 | me->me_type_malloced = 1; |
| 538 | 531 | me->me_dev = makedev (devmaj, devmin); | |
| 539 | me->me_devname = xstrdup (source); | 532 | /* we pass "false" for the "Bind" option as that's only |
| 540 | me->me_mountdir = xstrdup (target); | 533 | significant when the Fs_type is "none" which will not be |
| 541 | me->me_mntroot = xstrdup (mntroot); | 534 | the case when parsing "/proc/self/mountinfo", and only |
| 542 | me->me_type = xstrdup (fstype); | 535 | applies for static /etc/mtab files. */ |
| 543 | me->me_type_malloced = 1; | 536 | me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, false); |
| 544 | me->me_dev = makedev (devmaj, devmin); | 537 | me->me_remote = ME_REMOTE (me->me_devname, me->me_type); |
| 545 | /* we pass "false" for the "Bind" option as that's only | 538 | |
| 546 | significant when the Fs_type is "none" which will not be | 539 | /* Add to the linked list. */ |
| 547 | the case when parsing "/proc/self/mountinfo", and only | 540 | *mtail = me; |
| 548 | applies for static /etc/mtab files. */ | 541 | mtail = &me->me_next; |
| 549 | me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, false); | 542 | } |
| 550 | me->me_remote = ME_REMOTE (me->me_devname, me->me_type); | 543 | } |
| 551 | 544 | } | |
| 552 | /* Add to the linked list. */ | 545 | } |
| 553 | *mtail = me; | 546 | } |
| 554 | mtail = &me->me_next; | 547 | } |
| 555 | } | 548 | } |
| 556 | 549 | ||
| 557 | free (line); | 550 | free (line); |
| @@ -570,14 +563,14 @@ read_file_system_list (bool need_fs_type) | |||
| 570 | else /* fallback to /proc/self/mounts (/etc/mtab). */ | 563 | else /* fallback to /proc/self/mounts (/etc/mtab). */ |
| 571 | # endif /* __linux__ || __ANDROID__ */ | 564 | # endif /* __linux__ || __ANDROID__ */ |
| 572 | { | 565 | { |
| 573 | struct mntent *mnt; | ||
| 574 | char const *table = MOUNTED; | 566 | char const *table = MOUNTED; |
| 575 | 567 | ||
| 576 | fp = setmntent (table, "r"); | 568 | FILE *mfp = setmntent (table, "r"); |
| 577 | if (fp == NULL) | 569 | if (mfp == NULL) |
| 578 | return NULL; | 570 | return NULL; |
| 579 | 571 | ||
| 580 | while ((mnt = getmntent (fp))) | 572 | struct mntent *mnt; |
| 573 | while ((mnt = getmntent (mfp))) | ||
| 581 | { | 574 | { |
| 582 | bool bind = hasmntopt (mnt, "bind"); | 575 | bool bind = hasmntopt (mnt, "bind"); |
| 583 | 576 | ||
| @@ -596,7 +589,7 @@ read_file_system_list (bool need_fs_type) | |||
| 596 | mtail = &me->me_next; | 589 | mtail = &me->me_next; |
| 597 | } | 590 | } |
| 598 | 591 | ||
| 599 | if (endmntent (fp) == 0) | 592 | if (endmntent (mfp) == 0) |
| 600 | goto free_then_fail; | 593 | goto free_then_fail; |
| 601 | } | 594 | } |
| 602 | } | 595 | } |
| @@ -605,9 +598,7 @@ read_file_system_list (bool need_fs_type) | |||
| 605 | #ifdef MOUNTED_GETMNTINFO /* Mac OS X, FreeBSD, OpenBSD, also (obsolete) 4.4BSD */ | 598 | #ifdef MOUNTED_GETMNTINFO /* Mac OS X, FreeBSD, OpenBSD, also (obsolete) 4.4BSD */ |
| 606 | { | 599 | { |
| 607 | struct statfs *fsp; | 600 | struct statfs *fsp; |
| 608 | int entries; | 601 | int entries = getmntinfo (&fsp, MNT_NOWAIT); |
| 609 | |||
| 610 | entries = getmntinfo (&fsp, MNT_NOWAIT); | ||
| 611 | if (entries < 0) | 602 | if (entries < 0) |
| 612 | return NULL; | 603 | return NULL; |
| 613 | for (; entries-- > 0; fsp++) | 604 | for (; entries-- > 0; fsp++) |
| @@ -634,9 +625,7 @@ read_file_system_list (bool need_fs_type) | |||
| 634 | #ifdef MOUNTED_GETMNTINFO2 /* NetBSD, Minix */ | 625 | #ifdef MOUNTED_GETMNTINFO2 /* NetBSD, Minix */ |
| 635 | { | 626 | { |
| 636 | struct statvfs *fsp; | 627 | struct statvfs *fsp; |
| 637 | int entries; | 628 | int entries = getmntinfo (&fsp, MNT_NOWAIT); |
| 638 | |||
| 639 | entries = getmntinfo (&fsp, MNT_NOWAIT); | ||
| 640 | if (entries < 0) | 629 | if (entries < 0) |
| 641 | return NULL; | 630 | return NULL; |
| 642 | for (; entries-- > 0; fsp++) | 631 | for (; entries-- > 0; fsp++) |
| @@ -670,7 +659,6 @@ read_file_system_list (bool need_fs_type) | |||
| 670 | We therefore get the list of subdirectories of /, and the list | 659 | We therefore get the list of subdirectories of /, and the list |
| 671 | of all file systems, and match the two lists. */ | 660 | of all file systems, and match the two lists. */ |
| 672 | 661 | ||
| 673 | DIR *dirp; | ||
| 674 | struct rootdir_entry | 662 | struct rootdir_entry |
| 675 | { | 663 | { |
| 676 | char *name; | 664 | char *name; |
| @@ -678,16 +666,11 @@ read_file_system_list (bool need_fs_type) | |||
| 678 | ino_t ino; | 666 | ino_t ino; |
| 679 | struct rootdir_entry *next; | 667 | struct rootdir_entry *next; |
| 680 | }; | 668 | }; |
| 681 | struct rootdir_entry *rootdir_list; | ||
| 682 | struct rootdir_entry **rootdir_tail; | ||
| 683 | int32 pos; | ||
| 684 | dev_t dev; | ||
| 685 | fs_info fi; | ||
| 686 | 669 | ||
| 687 | /* All volumes are mounted in the rootfs, directly under /. */ | 670 | /* All volumes are mounted in the rootfs, directly under /. */ |
| 688 | rootdir_list = NULL; | 671 | struct rootdir_entry *rootdir_list = NULL; |
| 689 | rootdir_tail = &rootdir_list; | 672 | struct rootdir_entry **rootdir_tail = &rootdir_list; |
| 690 | dirp = opendir ("/"); | 673 | DIR *dirp = opendir ("/"); |
| 691 | if (dirp) | 674 | if (dirp) |
| 692 | { | 675 | { |
| 693 | struct dirent *d; | 676 | struct dirent *d; |
| @@ -697,61 +680,64 @@ read_file_system_list (bool need_fs_type) | |||
| 697 | char *name; | 680 | char *name; |
| 698 | struct stat statbuf; | 681 | struct stat statbuf; |
| 699 | 682 | ||
| 700 | if (strcmp (d->d_name, "..") == 0) | 683 | if (! streq (d->d_name, "..")) |
| 701 | continue; | ||
| 702 | |||
| 703 | if (strcmp (d->d_name, ".") == 0) | ||
| 704 | name = xstrdup ("/"); | ||
| 705 | else | ||
| 706 | { | 684 | { |
| 707 | name = xmalloc (1 + strlen (d->d_name) + 1); | 685 | if (streq (d->d_name, ".")) |
| 708 | name[0] = '/'; | 686 | name = xstrdup ("/"); |
| 709 | strcpy (name + 1, d->d_name); | 687 | else |
| 710 | } | 688 | { |
| 689 | name = xmalloc (1 + strlen (d->d_name) + 1); | ||
| 690 | name[0] = '/'; | ||
| 691 | strcpy (name + 1, d->d_name); | ||
| 692 | } | ||
| 711 | 693 | ||
| 712 | if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) | 694 | if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) |
| 713 | { | 695 | { |
| 714 | struct rootdir_entry *re = xmalloc (sizeof *re); | 696 | struct rootdir_entry *re = xmalloc (sizeof *re); |
| 715 | re->name = name; | 697 | re->name = name; |
| 716 | re->dev = statbuf.st_dev; | 698 | re->dev = statbuf.st_dev; |
| 717 | re->ino = statbuf.st_ino; | 699 | re->ino = statbuf.st_ino; |
| 718 | 700 | ||
| 719 | /* Add to the linked list. */ | 701 | /* Add to the linked list. */ |
| 720 | *rootdir_tail = re; | 702 | *rootdir_tail = re; |
| 721 | rootdir_tail = &re->next; | 703 | rootdir_tail = &re->next; |
| 704 | } | ||
| 705 | else | ||
| 706 | free (name); | ||
| 722 | } | 707 | } |
| 723 | else | ||
| 724 | free (name); | ||
| 725 | } | 708 | } |
| 726 | closedir (dirp); | 709 | closedir (dirp); |
| 727 | } | 710 | } |
| 728 | *rootdir_tail = NULL; | 711 | *rootdir_tail = NULL; |
| 729 | 712 | ||
| 730 | for (pos = 0; (dev = next_dev (&pos)) >= 0; ) | 713 | dev_t dev; |
| 731 | if (fs_stat_dev (dev, &fi) >= 0) | 714 | for (int32 pos = 0; (dev = next_dev (&pos)) >= 0; ) |
| 732 | { | 715 | { |
| 733 | /* Note: fi.dev == dev. */ | 716 | fs_info fi; |
| 734 | struct rootdir_entry *re; | 717 | if (fs_stat_dev (dev, &fi) >= 0) |
| 735 | 718 | { | |
| 736 | for (re = rootdir_list; re; re = re->next) | 719 | /* Note: fi.dev == dev. */ |
| 737 | if (re->dev == fi.dev && re->ino == fi.root) | 720 | struct rootdir_entry *re; |
| 738 | break; | 721 | for (re = rootdir_list; re; re = re->next) |
| 739 | 722 | if (re->dev == fi.dev && re->ino == fi.root) | |
| 740 | me = xmalloc (sizeof *me); | 723 | break; |
| 741 | me->me_devname = xstrdup (fi.device_name[0] != '\0' | 724 | |
| 742 | ? fi.device_name : fi.fsh_name); | 725 | me = xmalloc (sizeof *me); |
| 743 | me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); | 726 | me->me_devname = xstrdup (fi.device_name[0] != '\0' |
| 744 | me->me_mntroot = NULL; | 727 | ? fi.device_name : fi.fsh_name); |
| 745 | me->me_type = xstrdup (fi.fsh_name); | 728 | me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); |
| 746 | me->me_type_malloced = 1; | 729 | me->me_mntroot = NULL; |
| 747 | me->me_dev = fi.dev; | 730 | me->me_type = xstrdup (fi.fsh_name); |
| 748 | me->me_dummy = 0; | 731 | me->me_type_malloced = 1; |
| 749 | me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; | 732 | me->me_dev = fi.dev; |
| 750 | 733 | me->me_dummy = 0; | |
| 751 | /* Add to the linked list. */ | 734 | me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; |
| 752 | *mtail = me; | 735 | |
| 753 | mtail = &me->me_next; | 736 | /* Add to the linked list. */ |
| 754 | } | 737 | *mtail = me; |
| 738 | mtail = &me->me_next; | ||
| 739 | } | ||
| 740 | } | ||
| 755 | *mtail = NULL; | 741 | *mtail = NULL; |
| 756 | 742 | ||
| 757 | while (rootdir_list != NULL) | 743 | while (rootdir_list != NULL) |
| @@ -764,19 +750,17 @@ read_file_system_list (bool need_fs_type) | |||
| 764 | } | 750 | } |
| 765 | #endif /* MOUNTED_FS_STAT_DEV */ | 751 | #endif /* MOUNTED_FS_STAT_DEV */ |
| 766 | 752 | ||
| 767 | #if defined MOUNTED_GETFSSTAT /* OSF/1, also (obsolete) Apple Darwin 1.3 */ | 753 | #if defined MOUNTED_GETFSSTAT /* (obsolete) Apple Darwin 1.3 */ |
| 768 | { | 754 | { |
| 769 | int numsys, counter; | ||
| 770 | size_t bufsize; | ||
| 771 | struct statfs *stats; | ||
| 772 | 755 | ||
| 773 | numsys = getfsstat (NULL, 0L, MNT_NOWAIT); | 756 | int numsys = getfsstat (NULL, 0L, MNT_NOWAIT); |
| 774 | if (numsys < 0) | 757 | if (numsys < 0) |
| 775 | return NULL; | 758 | return NULL; |
| 759 | |||
| 760 | struct statfs *stats; | ||
| 776 | if (SIZE_MAX / sizeof *stats <= numsys) | 761 | if (SIZE_MAX / sizeof *stats <= numsys) |
| 777 | xalloc_die (); | 762 | xalloc_die (); |
| 778 | 763 | size_t bufsize = (1 + numsys) * sizeof *stats; | |
| 779 | bufsize = (1 + numsys) * sizeof *stats; | ||
| 780 | stats = xmalloc (bufsize); | 764 | stats = xmalloc (bufsize); |
| 781 | numsys = getfsstat (stats, bufsize, MNT_NOWAIT); | 765 | numsys = getfsstat (stats, bufsize, MNT_NOWAIT); |
| 782 | 766 | ||
| @@ -786,7 +770,7 @@ read_file_system_list (bool need_fs_type) | |||
| 786 | return NULL; | 770 | return NULL; |
| 787 | } | 771 | } |
| 788 | 772 | ||
| 789 | for (counter = 0; counter < numsys; counter++) | 773 | for (int counter = 0; counter < numsys; counter++) |
| 790 | { | 774 | { |
| 791 | me = xmalloc (sizeof *me); | 775 | me = xmalloc (sizeof *me); |
| 792 | me->me_devname = xstrdup (stats[counter].f_mntfromname); | 776 | me->me_devname = xstrdup (stats[counter].f_mntfromname); |
| @@ -809,14 +793,13 @@ read_file_system_list (bool need_fs_type) | |||
| 809 | 793 | ||
| 810 | #if defined MOUNTED_FREAD_FSTYP /* (obsolete) SVR3 */ | 794 | #if defined MOUNTED_FREAD_FSTYP /* (obsolete) SVR3 */ |
| 811 | { | 795 | { |
| 812 | struct mnttab mnt; | ||
| 813 | char *table = "/etc/mnttab"; | 796 | char *table = "/etc/mnttab"; |
| 814 | FILE *fp; | ||
| 815 | 797 | ||
| 816 | fp = fopen (table, "re"); | 798 | FILE *fp = fopen (table, "re"); |
| 817 | if (fp == NULL) | 799 | if (fp == NULL) |
| 818 | return NULL; | 800 | return NULL; |
| 819 | 801 | ||
| 802 | struct mnttab mnt; | ||
| 820 | while (fread (&mnt, sizeof mnt, 1, fp) > 0) | 803 | while (fread (&mnt, sizeof mnt, 1, fp) > 0) |
| 821 | { | 804 | { |
| 822 | me = xmalloc (sizeof *me); | 805 | me = xmalloc (sizeof *me); |
| @@ -862,20 +845,19 @@ read_file_system_list (bool need_fs_type) | |||
| 862 | 845 | ||
| 863 | #ifdef MOUNTED_GETEXTMNTENT /* Solaris >= 8 */ | 846 | #ifdef MOUNTED_GETEXTMNTENT /* Solaris >= 8 */ |
| 864 | { | 847 | { |
| 865 | struct extmnttab mnt; | ||
| 866 | const char *table = MNTTAB; | 848 | const char *table = MNTTAB; |
| 867 | FILE *fp; | ||
| 868 | int ret; | ||
| 869 | 849 | ||
| 870 | /* No locking is needed, because the contents of /etc/mnttab is generated | 850 | /* No locking is needed, because the contents of /etc/mnttab is generated |
| 871 | by the kernel. */ | 851 | by the kernel. */ |
| 872 | 852 | ||
| 873 | errno = 0; | 853 | errno = 0; |
| 874 | fp = fopen (table, "re"); | 854 | FILE *fp = fopen (table, "re"); |
| 855 | int ret; | ||
| 875 | if (fp == NULL) | 856 | if (fp == NULL) |
| 876 | ret = errno; | 857 | ret = errno; |
| 877 | else | 858 | else |
| 878 | { | 859 | { |
| 860 | struct extmnttab mnt; | ||
| 879 | while ((ret = getextmntent (fp, &mnt, 1)) == 0) | 861 | while ((ret = getextmntent (fp, &mnt, 1)) == 0) |
| 880 | { | 862 | { |
| 881 | me = xmalloc (sizeof *me); | 863 | me = xmalloc (sizeof *me); |
| @@ -909,10 +891,7 @@ read_file_system_list (bool need_fs_type) | |||
| 909 | 891 | ||
| 910 | #ifdef MOUNTED_GETMNTENT2 /* Solaris < 8, also (obsolete) SVR4 */ | 892 | #ifdef MOUNTED_GETMNTENT2 /* Solaris < 8, also (obsolete) SVR4 */ |
| 911 | { | 893 | { |
| 912 | struct mnttab mnt; | ||
| 913 | const char *table = MNTTAB; | 894 | const char *table = MNTTAB; |
| 914 | FILE *fp; | ||
| 915 | int ret; | ||
| 916 | int lockfd = -1; | 895 | int lockfd = -1; |
| 917 | 896 | ||
| 918 | # if defined F_RDLCK && defined F_SETLKW | 897 | # if defined F_RDLCK && defined F_SETLKW |
| @@ -945,11 +924,13 @@ read_file_system_list (bool need_fs_type) | |||
| 945 | # endif | 924 | # endif |
| 946 | 925 | ||
| 947 | errno = 0; | 926 | errno = 0; |
| 948 | fp = fopen (table, "re"); | 927 | FILE *fp = fopen (table, "re"); |
| 928 | int ret; | ||
| 949 | if (fp == NULL) | 929 | if (fp == NULL) |
| 950 | ret = errno; | 930 | ret = errno; |
| 951 | else | 931 | else |
| 952 | { | 932 | { |
| 933 | struct mnttab mnt; | ||
| 953 | while ((ret = getmntent (fp, &mnt)) == 0) | 934 | while ((ret = getmntent (fp, &mnt)) == 0) |
| 954 | { | 935 | { |
| 955 | me = xmalloc (sizeof *me); | 936 | me = xmalloc (sizeof *me); |
| @@ -984,34 +965,24 @@ read_file_system_list (bool need_fs_type) | |||
| 984 | 965 | ||
| 985 | #ifdef MOUNTED_VMOUNT /* AIX */ | 966 | #ifdef MOUNTED_VMOUNT /* AIX */ |
| 986 | { | 967 | { |
| 987 | int bufsize; | ||
| 988 | void *entries; | ||
| 989 | char *thisent; | ||
| 990 | struct vmount *vmp; | ||
| 991 | int n_entries; | ||
| 992 | int i; | ||
| 993 | |||
| 994 | /* Ask how many bytes to allocate for the mounted file system info. */ | 968 | /* Ask how many bytes to allocate for the mounted file system info. */ |
| 995 | entries = &bufsize; | 969 | int bufsize; |
| 996 | if (mntctl (MCTL_QUERY, sizeof bufsize, entries) != 0) | 970 | if (mntctl (MCTL_QUERY, sizeof bufsize, &bufsize) != 0) |
| 997 | return NULL; | 971 | return NULL; |
| 998 | entries = xmalloc (bufsize); | 972 | void *entries = xmalloc (bufsize); |
| 999 | 973 | ||
| 1000 | /* Get the list of mounted file systems. */ | 974 | /* Get the list of mounted file systems. */ |
| 1001 | n_entries = mntctl (MCTL_QUERY, bufsize, entries); | 975 | int n_entries = mntctl (MCTL_QUERY, bufsize, entries); |
| 1002 | if (n_entries < 0) | 976 | if (n_entries < 0) |
| 1003 | { | 977 | { |
| 1004 | free (entries); | 978 | free (entries); |
| 1005 | return NULL; | 979 | return NULL; |
| 1006 | } | 980 | } |
| 1007 | 981 | ||
| 1008 | for (i = 0, thisent = entries; | 982 | char *thisent = entries; |
| 1009 | i < n_entries; | 983 | for (int i = 0; i < n_entries; i++) |
| 1010 | i++, thisent += vmp->vmt_length) | ||
| 1011 | { | 984 | { |
| 1012 | char *options, *ignore; | 985 | struct vmount *vmp = (struct vmount *) thisent; |
| 1013 | |||
| 1014 | vmp = (struct vmount *) thisent; | ||
| 1015 | me = xmalloc (sizeof *me); | 986 | me = xmalloc (sizeof *me); |
| 1016 | if (vmp->vmt_flags & MNT_REMOTE) | 987 | if (vmp->vmt_flags & MNT_REMOTE) |
| 1017 | { | 988 | { |
| @@ -1036,8 +1007,8 @@ read_file_system_list (bool need_fs_type) | |||
| 1036 | me->me_mntroot = NULL; | 1007 | me->me_mntroot = NULL; |
| 1037 | me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); | 1008 | me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); |
| 1038 | me->me_type_malloced = 1; | 1009 | me->me_type_malloced = 1; |
| 1039 | options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; | 1010 | char *options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; |
| 1040 | ignore = strstr (options, "ignore"); | 1011 | char *ignore = strstr (options, "ignore"); |
| 1041 | me->me_dummy = (ignore | 1012 | me->me_dummy = (ignore |
| 1042 | && (ignore == options || ignore[-1] == ',') | 1013 | && (ignore == options || ignore[-1] == ',') |
| 1043 | && (ignore[sizeof "ignore" - 1] == ',' | 1014 | && (ignore[sizeof "ignore" - 1] == ',' |
| @@ -1047,6 +1018,8 @@ read_file_system_list (bool need_fs_type) | |||
| 1047 | /* Add to the linked list. */ | 1018 | /* Add to the linked list. */ |
| 1048 | *mtail = me; | 1019 | *mtail = me; |
| 1049 | mtail = &me->me_next; | 1020 | mtail = &me->me_next; |
| 1021 | |||
| 1022 | thisent += vmp->vmt_length; | ||
| 1050 | } | 1023 | } |
| 1051 | free (entries); | 1024 | free (entries); |
| 1052 | } | 1025 | } |
| @@ -1055,25 +1028,23 @@ read_file_system_list (bool need_fs_type) | |||
| 1055 | #ifdef MOUNTED_INTERIX_STATVFS /* Interix */ | 1028 | #ifdef MOUNTED_INTERIX_STATVFS /* Interix */ |
| 1056 | { | 1029 | { |
| 1057 | DIR *dirp = opendir ("/dev/fs"); | 1030 | DIR *dirp = opendir ("/dev/fs"); |
| 1058 | char node[9 + NAME_MAX]; | ||
| 1059 | |||
| 1060 | if (!dirp) | 1031 | if (!dirp) |
| 1061 | goto free_then_fail; | 1032 | goto free_then_fail; |
| 1062 | 1033 | ||
| 1063 | while (1) | 1034 | while (1) |
| 1064 | { | 1035 | { |
| 1065 | struct statvfs dev; | ||
| 1066 | struct dirent entry; | ||
| 1067 | struct dirent *result; | ||
| 1068 | |||
| 1069 | /* FIXME: readdir_r is planned to be withdrawn from POSIX and | 1036 | /* FIXME: readdir_r is planned to be withdrawn from POSIX and |
| 1070 | marked obsolescent in glibc. Use readdir instead. */ | 1037 | marked obsolescent in glibc. Use readdir instead. */ |
| 1038 | struct dirent entry; | ||
| 1039 | struct dirent *result; | ||
| 1071 | if (readdir_r (dirp, &entry, &result) || result == NULL) | 1040 | if (readdir_r (dirp, &entry, &result) || result == NULL) |
| 1072 | break; | 1041 | break; |
| 1073 | 1042 | ||
| 1043 | char node[9 + NAME_MAX]; | ||
| 1074 | strcpy (node, "/dev/fs/"); | 1044 | strcpy (node, "/dev/fs/"); |
| 1075 | strcat (node, entry.d_name); | 1045 | strcat (node, entry.d_name); |
| 1076 | 1046 | ||
| 1047 | struct statvfs dev; | ||
| 1077 | if (statvfs (node, &dev) == 0) | 1048 | if (statvfs (node, &dev) == 0) |
| 1078 | { | 1049 | { |
| 1079 | me = xmalloc (sizeof *me); | 1050 | me = xmalloc (sizeof *me); |
| @@ -1107,18 +1078,18 @@ read_file_system_list (bool need_fs_type) | |||
| 1107 | if ASCII 'A' + i is an available drive. See: | 1078 | if ASCII 'A' + i is an available drive. See: |
| 1108 | <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getlogicaldrives>. */ | 1079 | <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getlogicaldrives>. */ |
| 1109 | DWORD value = GetLogicalDrives (); | 1080 | DWORD value = GetLogicalDrives (); |
| 1110 | unsigned int i; | ||
| 1111 | 1081 | ||
| 1112 | for (i = 0; i < 26; ++i) | 1082 | for (unsigned int i = 0; i < 26; ++i) |
| 1113 | { | 1083 | { |
| 1114 | if (value & (1U << i)) | 1084 | if (value & (1U << i)) |
| 1115 | { | 1085 | { |
| 1116 | char mountdir[4]; | 1086 | char mountdir[4]; |
| 1117 | char fs_name[MAX_PATH + 1]; | ||
| 1118 | mountdir[0] = 'A' + i; | 1087 | mountdir[0] = 'A' + i; |
| 1119 | mountdir[1] = ':'; | 1088 | mountdir[1] = ':'; |
| 1120 | mountdir[2] = '\\'; | 1089 | mountdir[2] = '\\'; |
| 1121 | mountdir[3] = '\0'; | 1090 | mountdir[3] = '\0'; |
| 1091 | |||
| 1092 | char fs_name[MAX_PATH + 1]; | ||
| 1122 | /* Test whether the drive actually exists, and | 1093 | /* Test whether the drive actually exists, and |
| 1123 | get the name of the file system. See: | 1094 | get the name of the file system. See: |
| 1124 | <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationa>. */ | 1095 | <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationa>. */ |
| @@ -1141,10 +1112,10 @@ read_file_system_list (bool need_fs_type) | |||
| 1141 | For testing of SUBST: <https://ss64.com/nt/subst.html> | 1112 | For testing of SUBST: <https://ss64.com/nt/subst.html> |
| 1142 | For testing of NET USE: <https://ss64.com/nt/net-use.html> */ | 1113 | For testing of NET USE: <https://ss64.com/nt/net-use.html> */ |
| 1143 | wchar_t drive[3]; | 1114 | wchar_t drive[3]; |
| 1144 | wchar_t mapping[MAX_PATH + 1]; | ||
| 1145 | drive[0] = L'A' + i; | 1115 | drive[0] = L'A' + i; |
| 1146 | drive[1] = L':'; | 1116 | drive[1] = L':'; |
| 1147 | drive[2] = L'\0'; | 1117 | drive[2] = L'\0'; |
| 1118 | wchar_t mapping[MAX_PATH + 1]; | ||
| 1148 | DWORD mapping_len = QueryDosDeviceW (drive, mapping, sizeof (mapping) / sizeof (mapping[0])); | 1119 | DWORD mapping_len = QueryDosDeviceW (drive, mapping, sizeof (mapping) / sizeof (mapping[0])); |
| 1149 | if (mapping_len > 4 && wcsncmp (mapping, L"\\??\\", 4) == 0) | 1120 | if (mapping_len > 4 && wcsncmp (mapping, L"\\??\\", 4) == 0) |
| 1150 | { | 1121 | { |
diff --git a/gl/mountlist.h b/gl/mountlist.h index e8ba1d96..de1ff712 100644 --- a/gl/mountlist.h +++ b/gl/mountlist.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* mountlist.h -- declarations for list of mounted file systems | 1 | /* mountlist.h -- declarations for list of mounted file systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2025 Free Software | 3 | Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c index 1b51b1b0..774447b6 100644 --- a/gl/msvc-inval.c +++ b/gl/msvc-inval.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Invalid parameter handler for MSVC runtime libraries. | 1 | /* Invalid parameter handler for MSVC runtime libraries. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h index 9bb8a156..25bb6a3a 100644 --- a/gl/msvc-inval.h +++ b/gl/msvc-inval.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Invalid parameter handler for MSVC runtime libraries. | 1 | /* Invalid parameter handler for MSVC runtime libraries. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -179,9 +179,9 @@ extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); | |||
| 179 | # define TRY_MSVC_INVAL \ | 179 | # define TRY_MSVC_INVAL \ |
| 180 | do \ | 180 | do \ |
| 181 | { \ | 181 | { \ |
| 182 | struct gl_msvc_inval_per_thread *msvc_inval_current; \ | ||
| 183 | gl_msvc_inval_ensure_handler (); \ | 182 | gl_msvc_inval_ensure_handler (); \ |
| 184 | msvc_inval_current = gl_msvc_inval_current (); \ | 183 | struct gl_msvc_inval_per_thread *msvc_inval_current = \ |
| 184 | gl_msvc_inval_current (); \ | ||
| 185 | /* First, initialize gl_msvc_inval_restart. */ \ | 185 | /* First, initialize gl_msvc_inval_restart. */ \ |
| 186 | if (setjmp (msvc_inval_current->restart) == 0) \ | 186 | if (setjmp (msvc_inval_current->restart) == 0) \ |
| 187 | { \ | 187 | { \ |
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c index 7cf7517e..dea273d5 100644 --- a/gl/msvc-nothrow.c +++ b/gl/msvc-nothrow.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Wrappers that don't throw invalid parameter notifications | 1 | /* Wrappers that don't throw invalid parameter notifications |
| 2 | with MSVC runtime libraries. | 2 | with MSVC runtime libraries. |
| 3 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h index b02f36c4..f059d2d9 100644 --- a/gl/msvc-nothrow.h +++ b/gl/msvc-nothrow.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Wrappers that don't throw invalid parameter notifications | 1 | /* Wrappers that don't throw invalid parameter notifications |
| 2 | with MSVC runtime libraries. | 2 | with MSVC runtime libraries. |
| 3 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/netdb.in.h b/gl/netdb.in.h index 22059ea0..92f1220c 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Provide a netdb.h header file for systems lacking it (read: MinGW). | 1 | /* Provide a netdb.h header file for systems lacking it (read: MinGW). |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Simon Josefsson. | 3 | Written by Simon Josefsson. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -41,8 +41,8 @@ | |||
| 41 | #error "Please include config.h first." | 41 | #error "Please include config.h first." |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | /* Get <netdb.h> definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and | 44 | /* Get <netdb.h> definitions such as 'socklen_t' and 'struct hostent' |
| 45 | 'struct hostent' on MinGW. */ | 45 | on MinGW. */ |
| 46 | #include <sys/socket.h> | 46 | #include <sys/socket.h> |
| 47 | 47 | ||
| 48 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 48 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| @@ -277,25 +277,21 @@ _GL_CXXALIASWARN (getnameinfo); | |||
| 277 | 277 | ||
| 278 | #elif defined GNULIB_POSIXCHECK | 278 | #elif defined GNULIB_POSIXCHECK |
| 279 | 279 | ||
| 280 | # undef getaddrinfo | ||
| 281 | # if HAVE_RAW_DECL_GETADDRINFO | 280 | # if HAVE_RAW_DECL_GETADDRINFO |
| 282 | _GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " | 281 | _GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " |
| 283 | "use gnulib module getaddrinfo for portability"); | 282 | "use gnulib module getaddrinfo for portability"); |
| 284 | # endif | 283 | # endif |
| 285 | 284 | ||
| 286 | # undef freeaddrinfo | ||
| 287 | # if HAVE_RAW_DECL_FREEADDRINFO | 285 | # if HAVE_RAW_DECL_FREEADDRINFO |
| 288 | _GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " | 286 | _GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " |
| 289 | "use gnulib module getaddrinfo for portability"); | 287 | "use gnulib module getaddrinfo for portability"); |
| 290 | # endif | 288 | # endif |
| 291 | 289 | ||
| 292 | # undef gai_strerror | ||
| 293 | # if HAVE_RAW_DECL_GAI_STRERROR | 290 | # if HAVE_RAW_DECL_GAI_STRERROR |
| 294 | _GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " | 291 | _GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " |
| 295 | "use gnulib module getaddrinfo for portability"); | 292 | "use gnulib module getaddrinfo for portability"); |
| 296 | # endif | 293 | # endif |
| 297 | 294 | ||
| 298 | # undef getnameinfo | ||
| 299 | # if HAVE_RAW_DECL_GETNAMEINFO | 295 | # if HAVE_RAW_DECL_GETNAMEINFO |
| 300 | _GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " | 296 | _GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " |
| 301 | "use gnulib module getaddrinfo for portability"); | 297 | "use gnulib module getaddrinfo for portability"); |
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h index 402d01a9..933f5823 100644 --- a/gl/netinet_in.in.h +++ b/gl/netinet_in.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for <netinet/in.h>. | 1 | /* Substitute for <netinet/in.h>. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/nl_langinfo-lock.c b/gl/nl_langinfo-lock.c index 1ac25515..810a510d 100644 --- a/gl/nl_langinfo-lock.c +++ b/gl/nl_langinfo-lock.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Return the internal lock used by nl_langinfo. | 1 | /* Return the internal lock used by nl_langinfo. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/nl_langinfo.c b/gl/nl_langinfo.c index 0180c26a..ff8fd89e 100644 --- a/gl/nl_langinfo.c +++ b/gl/nl_langinfo.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* nl_langinfo() replacement: query locale dependent information. | 1 | /* nl_langinfo() replacement: query locale dependent information. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -79,15 +79,13 @@ ctype_codeset (void) | |||
| 79 | /* This function is only used on platforms which don't have uselocale(). | 79 | /* This function is only used on platforms which don't have uselocale(). |
| 80 | Therefore we don't need to look at the per-thread locale first, here. */ | 80 | Therefore we don't need to look at the per-thread locale first, here. */ |
| 81 | static char result[2 + 10 + 1]; | 81 | static char result[2 + 10 + 1]; |
| 82 | char buf[2 + 10 + 1]; | ||
| 83 | char locale[SETLOCALE_NULL_MAX]; | ||
| 84 | char *codeset; | ||
| 85 | size_t codesetlen; | ||
| 86 | 82 | ||
| 83 | char locale[SETLOCALE_NULL_MAX]; | ||
| 87 | if (setlocale_null_r (LC_CTYPE, locale, sizeof (locale))) | 84 | if (setlocale_null_r (LC_CTYPE, locale, sizeof (locale))) |
| 88 | locale[0] = '\0'; | 85 | locale[0] = '\0'; |
| 89 | 86 | ||
| 90 | codeset = buf; | 87 | char buf[2 + 10 + 1]; |
| 88 | char *codeset = buf; | ||
| 91 | codeset[0] = '\0'; | 89 | codeset[0] = '\0'; |
| 92 | 90 | ||
| 93 | if (locale[0]) | 91 | if (locale[0]) |
| @@ -105,7 +103,7 @@ ctype_codeset (void) | |||
| 105 | codeset = codeset_start; | 103 | codeset = codeset_start; |
| 106 | else | 104 | else |
| 107 | { | 105 | { |
| 108 | codesetlen = modifier - codeset_start; | 106 | size_t codesetlen = modifier - codeset_start; |
| 109 | if (codesetlen < sizeof buf) | 107 | if (codesetlen < sizeof buf) |
| 110 | { | 108 | { |
| 111 | codeset = memcpy (buf, codeset_start, codesetlen); | 109 | codeset = memcpy (buf, codeset_start, codesetlen); |
| @@ -121,14 +119,14 @@ ctype_codeset (void) | |||
| 121 | GetACP, which returns the locale's codepage as a number (although | 119 | GetACP, which returns the locale's codepage as a number (although |
| 122 | this doesn't change according to what the 'setlocale' call specified). | 120 | this doesn't change according to what the 'setlocale' call specified). |
| 123 | Either way, prepend "CP" to make it a valid codeset name. */ | 121 | Either way, prepend "CP" to make it a valid codeset name. */ |
| 124 | codesetlen = strlen (codeset); | 122 | size_t codesetlen = strlen (codeset); |
| 125 | if (0 < codesetlen && codesetlen < sizeof buf - 2) | 123 | if (0 < codesetlen && codesetlen < sizeof buf - 2) |
| 126 | memmove (buf + 2, codeset, codesetlen + 1); | 124 | memmove (buf + 2, codeset, codesetlen + 1); |
| 127 | else | 125 | else |
| 128 | sprintf (buf + 2, "%u", GetACP ()); | 126 | sprintf (buf + 2, "%u", GetACP ()); |
| 129 | /* For a locale name such as "French_France.65001", in Windows 10, | 127 | /* For a locale name such as "French_France.65001", in Windows 10, |
| 130 | setlocale now returns "French_France.utf8" instead. */ | 128 | setlocale now returns "French_France.utf8" instead. */ |
| 131 | if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0) | 129 | if (streq (buf + 2, "65001") || streq (buf + 2, "utf8")) |
| 132 | return (char *) "UTF-8"; | 130 | return (char *) "UTF-8"; |
| 133 | else | 131 | else |
| 134 | { | 132 | { |
| @@ -209,10 +207,9 @@ static char * | |||
| 209 | nl_langinfo_with_lock (nl_item item) | 207 | nl_langinfo_with_lock (nl_item item) |
| 210 | { | 208 | { |
| 211 | CRITICAL_SECTION *lock = gl_get_nl_langinfo_lock (); | 209 | CRITICAL_SECTION *lock = gl_get_nl_langinfo_lock (); |
| 212 | char *ret; | ||
| 213 | 210 | ||
| 214 | EnterCriticalSection (lock); | 211 | EnterCriticalSection (lock); |
| 215 | ret = nl_langinfo_unlocked (item); | 212 | char *ret = nl_langinfo_unlocked (item); |
| 216 | LeaveCriticalSection (lock); | 213 | LeaveCriticalSection (lock); |
| 217 | 214 | ||
| 218 | return ret; | 215 | return ret; |
| @@ -248,11 +245,10 @@ nl_langinfo_with_lock (nl_item item) | |||
| 248 | if (pthread_in_use()) | 245 | if (pthread_in_use()) |
| 249 | { | 246 | { |
| 250 | pthread_mutex_t *lock = gl_get_nl_langinfo_lock (); | 247 | pthread_mutex_t *lock = gl_get_nl_langinfo_lock (); |
| 251 | char *ret; | ||
| 252 | 248 | ||
| 253 | if (pthread_mutex_lock (lock)) | 249 | if (pthread_mutex_lock (lock)) |
| 254 | abort (); | 250 | abort (); |
| 255 | ret = nl_langinfo_unlocked (item); | 251 | char *ret = nl_langinfo_unlocked (item); |
| 256 | if (pthread_mutex_unlock (lock)) | 252 | if (pthread_mutex_unlock (lock)) |
| 257 | abort (); | 253 | abort (); |
| 258 | 254 | ||
| @@ -270,11 +266,10 @@ static char * | |||
| 270 | nl_langinfo_with_lock (nl_item item) | 266 | nl_langinfo_with_lock (nl_item item) |
| 271 | { | 267 | { |
| 272 | mtx_t *lock = gl_get_nl_langinfo_lock (); | 268 | mtx_t *lock = gl_get_nl_langinfo_lock (); |
| 273 | char *ret; | ||
| 274 | 269 | ||
| 275 | if (mtx_lock (lock) != thrd_success) | 270 | if (mtx_lock (lock) != thrd_success) |
| 276 | abort (); | 271 | abort (); |
| 277 | ret = nl_langinfo_unlocked (item); | 272 | char *ret = nl_langinfo_unlocked (item); |
| 278 | if (mtx_unlock (lock) != thrd_success) | 273 | if (mtx_unlock (lock) != thrd_success) |
| 279 | abort (); | 274 | abort (); |
| 280 | 275 | ||
| @@ -299,10 +294,6 @@ rpl_nl_langinfo (nl_item item) | |||
| 299 | case CODESET: | 294 | case CODESET: |
| 300 | return ctype_codeset (); | 295 | return ctype_codeset (); |
| 301 | # endif | 296 | # endif |
| 302 | # if GNULIB_defined_T_FMT_AMPM | ||
| 303 | case T_FMT_AMPM: | ||
| 304 | return (char *) "%I:%M:%S %p"; | ||
| 305 | # endif | ||
| 306 | # if GNULIB_defined_ALTMON | 297 | # if GNULIB_defined_ALTMON |
| 307 | case ALTMON_1: | 298 | case ALTMON_1: |
| 308 | case ALTMON_2: | 299 | case ALTMON_2: |
| @@ -365,12 +356,6 @@ rpl_nl_langinfo (nl_item item) | |||
| 365 | strings, appended in memory. */ | 356 | strings, appended in memory. */ |
| 366 | return (char *) "\0\0\0\0\0\0\0\0\0\0"; | 357 | return (char *) "\0\0\0\0\0\0\0\0\0\0"; |
| 367 | # endif | 358 | # endif |
| 368 | # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS | ||
| 369 | case YESEXPR: | ||
| 370 | return (char *) "^[yY]"; | ||
| 371 | case NOEXPR: | ||
| 372 | return (char *) "^[nN]"; | ||
| 373 | # endif | ||
| 374 | default: | 359 | default: |
| 375 | break; | 360 | break; |
| 376 | } | 361 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Open a descriptor to a file. | 1 | /* Open a descriptor to a file. |
| 2 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -38,13 +38,7 @@ orig_open (const char *filename, int flags, mode_t mode) | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | /* Specification. */ | 40 | /* Specification. */ |
| 41 | #ifdef __osf__ | 41 | #include <fcntl.h> |
| 42 | /* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates | ||
| 43 | this include because of the preliminary #include <fcntl.h> above. */ | ||
| 44 | # include "fcntl.h" | ||
| 45 | #else | ||
| 46 | # include <fcntl.h> | ||
| 47 | #endif | ||
| 48 | 42 | ||
| 49 | #include "cloexec.h" | 43 | #include "cloexec.h" |
| 50 | 44 | ||
| @@ -100,7 +94,7 @@ open (const char *filename, int flags, ...) | |||
| 100 | #endif | 94 | #endif |
| 101 | 95 | ||
| 102 | #if defined _WIN32 && ! defined __CYGWIN__ | 96 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 103 | if (strcmp (filename, "/dev/null") == 0) | 97 | if (streq (filename, "/dev/null")) |
| 104 | filename = "NUL"; | 98 | filename = "NUL"; |
| 105 | #endif | 99 | #endif |
| 106 | 100 | ||
diff --git a/gl/pathmax.h b/gl/pathmax.h index 5f535517..11c13592 100644 --- a/gl/pathmax.h +++ b/gl/pathmax.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Define PATH_MAX somehow. Requires sys/types.h. | 1 | /* Define PATH_MAX somehow. Requires sys/types.h. |
| 2 | Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2025 Free Software | 2 | Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/printf-args.c b/gl/printf-args.c index b83ec1e8..2f7bf3da 100644 --- a/gl/printf-args.c +++ b/gl/printf-args.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Decomposed printf argument list. | 1 | /* Decomposed printf argument list. |
| 2 | Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2025 Free Software | 2 | Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/printf-args.h b/gl/printf-args.h index 6edc570c..e72863ef 100644 --- a/gl/printf-args.h +++ b/gl/printf-args.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Decomposed printf argument list. | 1 | /* Decomposed printf argument list. |
| 2 | Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2025 Free Software | 2 | Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/printf-parse.c b/gl/printf-parse.c index 79b35034..34d241a6 100644 --- a/gl/printf-parse.c +++ b/gl/printf-parse.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 1999-2000, 2002-2003, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999-2000, 2002-2003, 2006-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -323,8 +323,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) | |||
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | { | 325 | { |
| 326 | arg_type type; | ||
| 327 | |||
| 328 | /* Parse argument type/size specifiers. */ | 326 | /* Parse argument type/size specifiers. */ |
| 329 | /* Relevant for the conversion characters d, i. */ | 327 | /* Relevant for the conversion characters d, i. */ |
| 330 | arg_type signed_type = TYPE_INT; | 328 | arg_type signed_type = TYPE_INT; |
| @@ -561,6 +559,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) | |||
| 561 | (void) pointer_type; | 559 | (void) pointer_type; |
| 562 | 560 | ||
| 563 | /* Read the conversion character. */ | 561 | /* Read the conversion character. */ |
| 562 | arg_type type; | ||
| 564 | c = *cp++; | 563 | c = *cp++; |
| 565 | switch (c) | 564 | switch (c) |
| 566 | { | 565 | { |
| @@ -654,17 +653,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) | |||
| 654 | d->count++; | 653 | d->count++; |
| 655 | if (d->count >= d_allocated) | 654 | if (d->count >= d_allocated) |
| 656 | { | 655 | { |
| 657 | size_t memory_size; | ||
| 658 | DIRECTIVE *memory; | ||
| 659 | |||
| 660 | d_allocated = xtimes (d_allocated, 2); | 656 | d_allocated = xtimes (d_allocated, 2); |
| 661 | memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); | 657 | size_t memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); |
| 662 | if (size_overflow_p (memory_size)) | 658 | if (size_overflow_p (memory_size)) |
| 663 | /* Overflow, would lead to out of memory. */ | 659 | /* Overflow, would lead to out of memory. */ |
| 664 | goto out_of_memory; | 660 | goto out_of_memory; |
| 665 | memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir | 661 | DIRECTIVE *memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir |
| 666 | ? realloc (d->dir, memory_size) | 662 | ? realloc (d->dir, memory_size) |
| 667 | : malloc (memory_size)); | 663 | : malloc (memory_size)); |
| 668 | if (memory == NULL) | 664 | if (memory == NULL) |
| 669 | /* Out of memory. */ | 665 | /* Out of memory. */ |
| 670 | goto out_of_memory; | 666 | goto out_of_memory; |
diff --git a/gl/printf-parse.h b/gl/printf-parse.h index 673053b8..17164f0e 100644 --- a/gl/printf-parse.h +++ b/gl/printf-parse.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Parse printf format string. | 1 | /* Parse printf format string. |
| 2 | Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2025 Free Software | 2 | Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2026 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/pthread-once.c b/gl/pthread-once.c index b19dae50..823f0639 100644 --- a/gl/pthread-once.c +++ b/gl/pthread-once.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* POSIX once-only control. | 1 | /* POSIX once-only control. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/pthread.h b/gl/pthread.h deleted file mode 100644 index 599f1633..00000000 --- a/gl/pthread.h +++ /dev/null | |||
| @@ -1,2571 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Implement the most essential subset of POSIX pthread.h. | ||
| 3 | |||
| 4 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | This file is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU Lesser General Public License as | ||
| 8 | published by the Free Software Foundation; either version 2.1 of the | ||
| 9 | License, or (at your option) any later version. | ||
| 10 | |||
| 11 | This file is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU Lesser General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU Lesser General Public License | ||
| 17 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | /* Written by Paul Eggert, Glen Lenker, and Bruno Haible. */ | ||
| 20 | |||
| 21 | #if __GNUC__ >= 3 | ||
| 22 | #pragma GCC system_header | ||
| 23 | #endif | ||
| 24 | |||
| 25 | |||
| 26 | #if defined _GL_ALREADY_INCLUDING_PTHREAD_H | ||
| 27 | /* Special invocation convention: | ||
| 28 | On Android, we have a sequence of nested includes | ||
| 29 | <pthread.h> -> <time.h> -> <sys/time.h> -> <sys/select.h> -> | ||
| 30 | <signal.h> -> <pthread.h>. | ||
| 31 | In this situation, PTHREAD_COND_INITIALIZER is not yet defined, | ||
| 32 | therefore we should not attempt to define PTHREAD_MUTEX_NORMAL etc. */ | ||
| 33 | |||
| 34 | #include_next <pthread.h> | ||
| 35 | |||
| 36 | #else | ||
| 37 | /* Normal invocation convention. */ | ||
| 38 | |||
| 39 | #ifndef _GL_PTHREAD_H_ | ||
| 40 | |||
| 41 | #if 1 | ||
| 42 | |||
| 43 | # define _GL_ALREADY_INCLUDING_PTHREAD_H | ||
| 44 | |||
| 45 | /* The include_next requires a split double-inclusion guard. */ | ||
| 46 | # include_next <pthread.h> | ||
| 47 | |||
| 48 | # undef _GL_ALREADY_INCLUDING_PTHREAD_H | ||
| 49 | |||
| 50 | #endif | ||
| 51 | |||
| 52 | #ifndef _GL_PTHREAD_H_ | ||
| 53 | #define _GL_PTHREAD_H_ | ||
| 54 | |||
| 55 | /* This file uses _Noreturn, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, | ||
| 56 | HAVE_RAW_DECL_*. */ | ||
| 57 | #if !_GL_CONFIG_H_INCLUDED | ||
| 58 | #error "Please include config.h first." | ||
| 59 | #endif | ||
| 60 | |||
| 61 | #define __need_system_stdlib_h | ||
| 62 | #include <stdlib.h> | ||
| 63 | #undef __need_system_stdlib_h | ||
| 64 | |||
| 65 | |||
| 66 | /* The pthreads-win32 <pthread.h> defines a couple of broken macros. */ | ||
| 67 | #undef asctime_r | ||
| 68 | #undef ctime_r | ||
| 69 | #undef gmtime_r | ||
| 70 | #undef localtime_r | ||
| 71 | #undef rand_r | ||
| 72 | #undef strtok_r | ||
| 73 | |||
| 74 | #include <errno.h> | ||
| 75 | #include <sched.h> | ||
| 76 | #include <sys/types.h> | ||
| 77 | #include <time.h> | ||
| 78 | |||
| 79 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | ||
| 80 | The attribute __pure__ was added in gcc 2.96. */ | ||
| 81 | #ifndef _GL_ATTRIBUTE_PURE | ||
| 82 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ | ||
| 83 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | ||
| 84 | # else | ||
| 85 | # define _GL_ATTRIBUTE_PURE /* empty */ | ||
| 86 | # endif | ||
| 87 | #endif | ||
| 88 | |||
| 89 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
| 90 | /* C++ compatible function declaration macros. | ||
| 91 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 92 | |||
| 93 | This program is free software: you can redistribute it and/or modify it | ||
| 94 | under the terms of the GNU Lesser General Public License as published | ||
| 95 | by the Free Software Foundation; either version 2 of the License, or | ||
| 96 | (at your option) any later version. | ||
| 97 | |||
| 98 | This program is distributed in the hope that it will be useful, | ||
| 99 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 100 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 101 | Lesser General Public License for more details. | ||
| 102 | |||
| 103 | You should have received a copy of the GNU Lesser General Public License | ||
| 104 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 105 | |||
| 106 | #ifndef _GL_CXXDEFS_H | ||
| 107 | #define _GL_CXXDEFS_H | ||
| 108 | |||
| 109 | /* Begin/end the GNULIB_NAMESPACE namespace. */ | ||
| 110 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 111 | # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { | ||
| 112 | # define _GL_END_NAMESPACE } | ||
| 113 | #else | ||
| 114 | # define _GL_BEGIN_NAMESPACE | ||
| 115 | # define _GL_END_NAMESPACE | ||
| 116 | #endif | ||
| 117 | |||
| 118 | /* The three most frequent use cases of these macros are: | ||
| 119 | |||
| 120 | * For providing a substitute for a function that is missing on some | ||
| 121 | platforms, but is declared and works fine on the platforms on which | ||
| 122 | it exists: | ||
| 123 | |||
| 124 | #if @GNULIB_FOO@ | ||
| 125 | # if !@HAVE_FOO@ | ||
| 126 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 127 | # endif | ||
| 128 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 129 | _GL_CXXALIASWARN (foo); | ||
| 130 | #elif defined GNULIB_POSIXCHECK | ||
| 131 | ... | ||
| 132 | #endif | ||
| 133 | |||
| 134 | * For providing a replacement for a function that exists on all platforms, | ||
| 135 | but is broken/insufficient and needs to be replaced on some platforms: | ||
| 136 | |||
| 137 | #if @GNULIB_FOO@ | ||
| 138 | # if @REPLACE_FOO@ | ||
| 139 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 140 | # undef foo | ||
| 141 | # define foo rpl_foo | ||
| 142 | # endif | ||
| 143 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 144 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 145 | # else | ||
| 146 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 147 | # endif | ||
| 148 | _GL_CXXALIASWARN (foo); | ||
| 149 | #elif defined GNULIB_POSIXCHECK | ||
| 150 | ... | ||
| 151 | #endif | ||
| 152 | |||
| 153 | * For providing a replacement for a function that exists on some platforms | ||
| 154 | but is broken/insufficient and needs to be replaced on some of them and | ||
| 155 | is additionally either missing or undeclared on some other platforms: | ||
| 156 | |||
| 157 | #if @GNULIB_FOO@ | ||
| 158 | # if @REPLACE_FOO@ | ||
| 159 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 160 | # undef foo | ||
| 161 | # define foo rpl_foo | ||
| 162 | # endif | ||
| 163 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 164 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 165 | # else | ||
| 166 | # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ | ||
| 167 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 168 | # endif | ||
| 169 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 170 | # endif | ||
| 171 | _GL_CXXALIASWARN (foo); | ||
| 172 | #elif defined GNULIB_POSIXCHECK | ||
| 173 | ... | ||
| 174 | #endif | ||
| 175 | */ | ||
| 176 | |||
| 177 | /* _GL_EXTERN_C declaration; | ||
| 178 | performs the declaration with C linkage. */ | ||
| 179 | #if defined __cplusplus | ||
| 180 | # define _GL_EXTERN_C extern "C" | ||
| 181 | #else | ||
| 182 | # define _GL_EXTERN_C extern | ||
| 183 | #endif | ||
| 184 | |||
| 185 | /* _GL_EXTERN_C_FUNC declaration; | ||
| 186 | performs the declaration of a function with C linkage. */ | ||
| 187 | #if defined __cplusplus | ||
| 188 | # define _GL_EXTERN_C_FUNC extern "C" | ||
| 189 | #else | ||
| 190 | /* In C mode, omit the 'extern' keyword, because attributes in bracket syntax | ||
| 191 | are not allowed between 'extern' and the return type (see gnulib-common.m4). | ||
| 192 | */ | ||
| 193 | # define _GL_EXTERN_C_FUNC | ||
| 194 | #endif | ||
| 195 | |||
| 196 | /* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]); | ||
| 197 | declares a replacement function, named rpl_func, with the given prototype, | ||
| 198 | consisting of return type, parameters, and attributes. | ||
| 199 | Although attributes are optional, the comma before them is required | ||
| 200 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 201 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 202 | at the end of the declaration. | ||
| 203 | Examples: | ||
| 204 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 205 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...), | ||
| 206 | _GL_ARG_NONNULL ((1))); | ||
| 207 | |||
| 208 | Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front | ||
| 209 | of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's | ||
| 210 | because | ||
| 211 | [[...]] extern "C" <declaration>; | ||
| 212 | is invalid syntax in C++.) | ||
| 213 | */ | ||
| 214 | #define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \ | ||
| 215 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__) | ||
| 216 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | ||
| 217 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | ||
| 218 | |||
| 219 | /* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to | ||
| 220 | parenthesized func otherwise. Parenthesization is needed in C23 if | ||
| 221 | the function is like strchr and so is a qualifier-generic macro | ||
| 222 | that expands to something more complicated. */ | ||
| 223 | #ifdef __cplusplus | ||
| 224 | # define _GL_FUNCDECL_SYS_NAME(func) func | ||
| 225 | #else | ||
| 226 | # define _GL_FUNCDECL_SYS_NAME(func) (func) | ||
| 227 | #endif | ||
| 228 | |||
| 229 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); | ||
| 230 | declares the system function, named func, with the given prototype, | ||
| 231 | consisting of return type, parameters, and attributes. | ||
| 232 | Although attributes are optional, the comma before them is required | ||
| 233 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 234 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 235 | at the end of the declaration. | ||
| 236 | Examples: | ||
| 237 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 238 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | ||
| 239 | */ | ||
| 240 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | ||
| 241 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters | ||
| 242 | |||
| 243 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | ||
| 244 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 245 | that redirects to rpl_func, if GNULIB_NAMESPACE is defined. | ||
| 246 | Example: | ||
| 247 | _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); | ||
| 248 | |||
| 249 | Wrapping rpl_func in an object with an inline conversion operator | ||
| 250 | avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is | ||
| 251 | actually used in the program. */ | ||
| 252 | #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ | ||
| 253 | _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) | ||
| 254 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 255 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 256 | namespace GNULIB_NAMESPACE \ | ||
| 257 | { \ | ||
| 258 | static const struct _gl_ ## func ## _wrapper \ | ||
| 259 | { \ | ||
| 260 | typedef rettype (*type) parameters; \ | ||
| 261 | \ | ||
| 262 | inline operator type () const \ | ||
| 263 | { \ | ||
| 264 | return ::rpl_func; \ | ||
| 265 | } \ | ||
| 266 | } func = {}; \ | ||
| 267 | } \ | ||
| 268 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 269 | #else | ||
| 270 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 271 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 272 | #endif | ||
| 273 | |||
| 274 | /* _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 275 | is to be used when func is a Microsoft deprecated alias, on native Windows. | ||
| 276 | It declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 277 | that redirects to _func, if GNULIB_NAMESPACE is defined. | ||
| 278 | Example: | ||
| 279 | _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); | ||
| 280 | */ | ||
| 281 | #define _GL_CXXALIAS_MDA(func,rettype,parameters) \ | ||
| 282 | _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) | ||
| 283 | |||
| 284 | /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); | ||
| 285 | is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); | ||
| 286 | except that the C function rpl_func may have a slightly different | ||
| 287 | declaration. A cast is used to silence the "invalid conversion" error | ||
| 288 | that would otherwise occur. */ | ||
| 289 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 290 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 291 | namespace GNULIB_NAMESPACE \ | ||
| 292 | { \ | ||
| 293 | static const struct _gl_ ## func ## _wrapper \ | ||
| 294 | { \ | ||
| 295 | typedef rettype (*type) parameters; \ | ||
| 296 | \ | ||
| 297 | inline operator type () const \ | ||
| 298 | { \ | ||
| 299 | return reinterpret_cast<type>(::rpl_func); \ | ||
| 300 | } \ | ||
| 301 | } func = {}; \ | ||
| 302 | } \ | ||
| 303 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 304 | #else | ||
| 305 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 306 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 307 | #endif | ||
| 308 | |||
| 309 | /* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); | ||
| 310 | is like _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 311 | except that the C function func may have a slightly different declaration. | ||
| 312 | A cast is used to silence the "invalid conversion" error that would | ||
| 313 | otherwise occur. */ | ||
| 314 | #define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ | ||
| 315 | _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) | ||
| 316 | |||
| 317 | /* _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 318 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 319 | that redirects to the system provided function func, if GNULIB_NAMESPACE | ||
| 320 | is defined. | ||
| 321 | Example: | ||
| 322 | _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); | ||
| 323 | |||
| 324 | Wrapping func in an object with an inline conversion operator | ||
| 325 | avoids a reference to func unless GNULIB_NAMESPACE::func is | ||
| 326 | actually used in the program. */ | ||
| 327 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 328 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 329 | namespace GNULIB_NAMESPACE \ | ||
| 330 | { \ | ||
| 331 | static const struct _gl_ ## func ## _wrapper \ | ||
| 332 | { \ | ||
| 333 | typedef rettype (*type) parameters; \ | ||
| 334 | \ | ||
| 335 | inline operator type () const \ | ||
| 336 | { \ | ||
| 337 | return ::func; \ | ||
| 338 | } \ | ||
| 339 | } func = {}; \ | ||
| 340 | } \ | ||
| 341 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 342 | #else | ||
| 343 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 344 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 345 | #endif | ||
| 346 | |||
| 347 | /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); | ||
| 348 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 349 | except that the C function func may have a slightly different declaration. | ||
| 350 | A cast is used to silence the "invalid conversion" error that would | ||
| 351 | otherwise occur. */ | ||
| 352 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 353 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 354 | namespace GNULIB_NAMESPACE \ | ||
| 355 | { \ | ||
| 356 | static const struct _gl_ ## func ## _wrapper \ | ||
| 357 | { \ | ||
| 358 | typedef rettype (*type) parameters; \ | ||
| 359 | \ | ||
| 360 | inline operator type () const \ | ||
| 361 | { \ | ||
| 362 | return reinterpret_cast<type>(::func); \ | ||
| 363 | } \ | ||
| 364 | } func = {}; \ | ||
| 365 | } \ | ||
| 366 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 367 | #else | ||
| 368 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 369 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 370 | #endif | ||
| 371 | |||
| 372 | /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); | ||
| 373 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 374 | except that the C function is picked among a set of overloaded functions, | ||
| 375 | namely the one with rettype2 and parameters2. Two consecutive casts | ||
| 376 | are used to silence the "cannot find a match" and "invalid conversion" | ||
| 377 | errors that would otherwise occur. */ | ||
| 378 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 379 | /* The outer cast must be a reinterpret_cast. | ||
| 380 | The inner cast: When the function is defined as a set of overloaded | ||
| 381 | functions, it works as a static_cast<>, choosing the designated variant. | ||
| 382 | When the function is defined as a single variant, it works as a | ||
| 383 | reinterpret_cast<>. The parenthesized cast syntax works both ways. */ | ||
| 384 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 385 | namespace GNULIB_NAMESPACE \ | ||
| 386 | { \ | ||
| 387 | static const struct _gl_ ## func ## _wrapper \ | ||
| 388 | { \ | ||
| 389 | typedef rettype (*type) parameters; \ | ||
| 390 | \ | ||
| 391 | inline operator type () const \ | ||
| 392 | { \ | ||
| 393 | return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ | ||
| 394 | } \ | ||
| 395 | } func = {}; \ | ||
| 396 | } \ | ||
| 397 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 398 | #else | ||
| 399 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 400 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 401 | #endif | ||
| 402 | |||
| 403 | /* _GL_CXXALIASWARN (func); | ||
| 404 | causes a warning to be emitted when ::func is used but not when | ||
| 405 | GNULIB_NAMESPACE::func is used. func must be defined without overloaded | ||
| 406 | variants. */ | ||
| 407 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 408 | # define _GL_CXXALIASWARN(func) \ | ||
| 409 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | ||
| 410 | # define _GL_CXXALIASWARN_1(func,namespace) \ | ||
| 411 | _GL_CXXALIASWARN_2 (func, namespace) | ||
| 412 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 413 | we enable the warning only when not optimizing. */ | ||
| 414 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 415 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 416 | _GL_WARN_ON_USE (func, \ | ||
| 417 | "The symbol ::" #func " refers to the system function. " \ | ||
| 418 | "Use " #namespace "::" #func " instead.") | ||
| 419 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 420 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 421 | extern __typeof__ (func) func | ||
| 422 | # else | ||
| 423 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 424 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 425 | # endif | ||
| 426 | #else | ||
| 427 | # define _GL_CXXALIASWARN(func) \ | ||
| 428 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 429 | #endif | ||
| 430 | |||
| 431 | /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); | ||
| 432 | causes a warning to be emitted when the given overloaded variant of ::func | ||
| 433 | is used but not when GNULIB_NAMESPACE::func is used. */ | ||
| 434 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 435 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 436 | _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ | ||
| 437 | GNULIB_NAMESPACE) | ||
| 438 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | ||
| 439 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | ||
| 440 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 441 | we enable the warning only when not optimizing. */ | ||
| 442 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 443 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 444 | _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ | ||
| 445 | "The symbol ::" #func " refers to the system function. " \ | ||
| 446 | "Use " #namespace "::" #func " instead.") | ||
| 447 | # else | ||
| 448 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 449 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 450 | # endif | ||
| 451 | #else | ||
| 452 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 453 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 454 | #endif | ||
| 455 | |||
| 456 | #endif /* _GL_CXXDEFS_H */ | ||
| 457 | |||
| 458 | /* The definition of _Noreturn is copied here. */ | ||
| 459 | /* A C macro for declaring that a function does not return. | ||
| 460 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | ||
| 461 | |||
| 462 | This program is free software: you can redistribute it and/or modify it | ||
| 463 | under the terms of the GNU Lesser General Public License as published | ||
| 464 | by the Free Software Foundation; either version 2 of the License, or | ||
| 465 | (at your option) any later version. | ||
| 466 | |||
| 467 | This program is distributed in the hope that it will be useful, | ||
| 468 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 469 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 470 | Lesser General Public License for more details. | ||
| 471 | |||
| 472 | You should have received a copy of the GNU Lesser General Public License | ||
| 473 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 474 | |||
| 475 | /* The _Noreturn keyword of C11. | ||
| 476 | Do not use [[noreturn]], because with it the syntax | ||
| 477 | extern _Noreturn void func (...); | ||
| 478 | would not be valid; such a declaration would be valid only with 'extern' | ||
| 479 | and '_Noreturn' swapped, or without the 'extern' keyword. However, some | ||
| 480 | AIX system header files and several gnulib header files use precisely | ||
| 481 | this syntax with 'extern'. So even though C23 deprecates _Noreturn, | ||
| 482 | it is currently more portable to prefer it to [[noreturn]]. | ||
| 483 | |||
| 484 | Also, do not try to work around LLVM bug 59792 (clang 15 or earlier). | ||
| 485 | This rare bug can be worked around by compiling with 'clang -D_Noreturn=', | ||
| 486 | though the workaround may generate many false-alarm warnings. */ | ||
| 487 | #ifndef _Noreturn | ||
| 488 | # if ((!defined __cplusplus || defined __clang__) \ | ||
| 489 | && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0))) | ||
| 490 | /* _Noreturn works as-is. */ | ||
| 491 | # elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ | ||
| 492 | || 0x5110 <= __SUNPRO_C) | ||
| 493 | /* Prefer __attribute__ ((__noreturn__)) to plain _Noreturn even if the | ||
| 494 | latter works, as 'gcc -std=gnu99 -Wpedantic' warns about _Noreturn. */ | ||
| 495 | # define _Noreturn __attribute__ ((__noreturn__)) | ||
| 496 | # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) | ||
| 497 | # define _Noreturn __declspec (noreturn) | ||
| 498 | # else | ||
| 499 | # define _Noreturn | ||
| 500 | # endif | ||
| 501 | #endif | ||
| 502 | |||
| 503 | /* The definition of _GL_ARG_NONNULL is copied here. */ | ||
| 504 | /* A C macro for declaring that specific arguments must not be NULL. | ||
| 505 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | ||
| 506 | |||
| 507 | This program is free software: you can redistribute it and/or modify it | ||
| 508 | under the terms of the GNU Lesser General Public License as published | ||
| 509 | by the Free Software Foundation; either version 2 of the License, or | ||
| 510 | (at your option) any later version. | ||
| 511 | |||
| 512 | This program is distributed in the hope that it will be useful, | ||
| 513 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 514 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 515 | Lesser General Public License for more details. | ||
| 516 | |||
| 517 | You should have received a copy of the GNU Lesser General Public License | ||
| 518 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 519 | |||
| 520 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools | ||
| 521 | that the values passed as arguments n, ..., m must be non-NULL pointers. | ||
| 522 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ | ||
| 523 | #ifndef _GL_ARG_NONNULL | ||
| 524 | # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ | ||
| 525 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) | ||
| 526 | # else | ||
| 527 | # define _GL_ARG_NONNULL(params) | ||
| 528 | # endif | ||
| 529 | #endif | ||
| 530 | |||
| 531 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
| 532 | /* A C macro for emitting warnings if a function is used. | ||
| 533 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 534 | |||
| 535 | This program is free software: you can redistribute it and/or modify it | ||
| 536 | under the terms of the GNU Lesser General Public License as published | ||
| 537 | by the Free Software Foundation; either version 2 of the License, or | ||
| 538 | (at your option) any later version. | ||
| 539 | |||
| 540 | This program is distributed in the hope that it will be useful, | ||
| 541 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 542 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 543 | Lesser General Public License for more details. | ||
| 544 | |||
| 545 | You should have received a copy of the GNU Lesser General Public License | ||
| 546 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 547 | |||
| 548 | /* _GL_WARN_ON_USE (function, "literal string") issues a declaration | ||
| 549 | for FUNCTION which will then trigger a compiler warning containing | ||
| 550 | the text of "literal string" anywhere that function is called, if | ||
| 551 | supported by the compiler. If the compiler does not support this | ||
| 552 | feature, the macro expands to an unused extern declaration. | ||
| 553 | |||
| 554 | _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the | ||
| 555 | attribute used in _GL_WARN_ON_USE. If the compiler does not support | ||
| 556 | this feature, it expands to empty. | ||
| 557 | |||
| 558 | These macros are useful for marking a function as a potential | ||
| 559 | portability trap, with the intent that "literal string" include | ||
| 560 | instructions on the replacement function that should be used | ||
| 561 | instead. | ||
| 562 | _GL_WARN_ON_USE is for functions with 'extern' linkage. | ||
| 563 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' | ||
| 564 | linkage. | ||
| 565 | |||
| 566 | _GL_WARN_ON_USE should not be used more than once for a given function | ||
| 567 | in a given compilation unit (because this may generate a warning even | ||
| 568 | if the function is never called). | ||
| 569 | |||
| 570 | However, one of the reasons that a function is a portability trap is | ||
| 571 | if it has the wrong signature. Declaring FUNCTION with a different | ||
| 572 | signature in C is a compilation error, so this macro must use the | ||
| 573 | same type as any existing declaration so that programs that avoid | ||
| 574 | the problematic FUNCTION do not fail to compile merely because they | ||
| 575 | included a header that poisoned the function. But this implies that | ||
| 576 | _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already | ||
| 577 | have a declaration. Use of this macro implies that there must not | ||
| 578 | be any other macro hiding the declaration of FUNCTION; but | ||
| 579 | undefining FUNCTION first is part of the poisoning process anyway | ||
| 580 | (although for symbols that are provided only via a macro, the result | ||
| 581 | is a compilation error rather than a warning containing | ||
| 582 | "literal string"). Also note that in C++, it is only safe to use if | ||
| 583 | FUNCTION has no overloads. | ||
| 584 | |||
| 585 | For an example, it is possible to poison 'getline' by: | ||
| 586 | - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], | ||
| 587 | [getline]) in configure.ac, which potentially defines | ||
| 588 | HAVE_RAW_DECL_GETLINE | ||
| 589 | - adding this code to a header that wraps the system <stdio.h>: | ||
| 590 | #undef getline | ||
| 591 | #if HAVE_RAW_DECL_GETLINE | ||
| 592 | _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" | ||
| 593 | "not universally present; use the gnulib module getline"); | ||
| 594 | #endif | ||
| 595 | |||
| 596 | It is not possible to directly poison global variables. But it is | ||
| 597 | possible to write a wrapper accessor function, and poison that | ||
| 598 | (less common usage, like &environ, will cause a compilation error | ||
| 599 | rather than issue the nice warning, but the end result of informing | ||
| 600 | the developer about their portability problem is still achieved): | ||
| 601 | #if HAVE_RAW_DECL_ENVIRON | ||
| 602 | static char *** | ||
| 603 | rpl_environ (void) { return &environ; } | ||
| 604 | _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); | ||
| 605 | # undef environ | ||
| 606 | # define environ (*rpl_environ ()) | ||
| 607 | #endif | ||
| 608 | or better (avoiding contradictory use of 'static' and 'extern'): | ||
| 609 | #if HAVE_RAW_DECL_ENVIRON | ||
| 610 | static char *** | ||
| 611 | _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") | ||
| 612 | rpl_environ (void) { return &environ; } | ||
| 613 | # undef environ | ||
| 614 | # define environ (*rpl_environ ()) | ||
| 615 | #endif | ||
| 616 | */ | ||
| 617 | #ifndef _GL_WARN_ON_USE | ||
| 618 | |||
| 619 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 620 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 621 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 622 | _GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) | ||
| 623 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 624 | __attribute__ ((__warning__ (message))) | ||
| 625 | # elif __clang_major__ >= 4 | ||
| 626 | /* Another compiler attribute is available in clang. */ | ||
| 627 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 628 | _GL_WARN_EXTERN_C __typeof__ (function) function \ | ||
| 629 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 630 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 631 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 632 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 633 | /* Verify the existence of the function. */ | ||
| 634 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 635 | _GL_WARN_EXTERN_C __typeof__ (function) function | ||
| 636 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 637 | # else /* Unsupported. */ | ||
| 638 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 639 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 640 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 641 | # endif | ||
| 642 | #endif | ||
| 643 | |||
| 644 | /* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") | ||
| 645 | is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the | ||
| 646 | function is declared with the given prototype, consisting of return type, | ||
| 647 | parameters, and attributes. | ||
| 648 | This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does | ||
| 649 | not work in this case. */ | ||
| 650 | #ifndef _GL_WARN_ON_USE_CXX | ||
| 651 | # if !defined __cplusplus | ||
| 652 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 653 | _GL_WARN_ON_USE (function, msg) | ||
| 654 | # else | ||
| 655 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 656 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 657 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 658 | extern rettype_gcc function parameters_and_attributes \ | ||
| 659 | __attribute__ ((__warning__ (msg))) | ||
| 660 | # elif __clang_major__ >= 4 | ||
| 661 | /* Another compiler attribute is available in clang. */ | ||
| 662 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 663 | extern rettype_clang function parameters_and_attributes \ | ||
| 664 | __attribute__ ((__diagnose_if__ (1, msg, "warning"))) | ||
| 665 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 666 | /* Verify the existence of the function. */ | ||
| 667 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 668 | extern rettype_gcc function parameters_and_attributes | ||
| 669 | # else /* Unsupported. */ | ||
| 670 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 671 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 672 | # endif | ||
| 673 | # endif | ||
| 674 | #endif | ||
| 675 | |||
| 676 | /* _GL_WARN_EXTERN_C declaration; | ||
| 677 | performs the declaration with C linkage. */ | ||
| 678 | #ifndef _GL_WARN_EXTERN_C | ||
| 679 | # if defined __cplusplus | ||
| 680 | # define _GL_WARN_EXTERN_C extern "C" | ||
| 681 | # else | ||
| 682 | # define _GL_WARN_EXTERN_C extern | ||
| 683 | # endif | ||
| 684 | #endif | ||
| 685 | |||
| 686 | /* =========== Thread types and macros =========== */ | ||
| 687 | |||
| 688 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 689 | # if 0 | ||
| 690 | # include "windows-thread.h" | ||
| 691 | # if 1 | ||
| 692 | # define pthread_t rpl_pthread_t | ||
| 693 | # define pthread_attr_t rpl_pthread_attr_t | ||
| 694 | # endif | ||
| 695 | # if !GNULIB_defined_pthread_thread_types | ||
| 696 | typedef glwthread_thread_t pthread_t; | ||
| 697 | typedef unsigned int pthread_attr_t; | ||
| 698 | # define GNULIB_defined_pthread_thread_types 1 | ||
| 699 | # endif | ||
| 700 | # else | ||
| 701 | # if 1 | ||
| 702 | # define pthread_t rpl_pthread_t | ||
| 703 | # define pthread_attr_t rpl_pthread_attr_t | ||
| 704 | # endif | ||
| 705 | # if !GNULIB_defined_pthread_thread_types | ||
| 706 | typedef int pthread_t; | ||
| 707 | typedef unsigned int pthread_attr_t; | ||
| 708 | # define GNULIB_defined_pthread_thread_types 1 | ||
| 709 | # endif | ||
| 710 | # endif | ||
| 711 | # undef PTHREAD_CREATE_JOINABLE | ||
| 712 | # undef PTHREAD_CREATE_DETACHED | ||
| 713 | # define PTHREAD_CREATE_JOINABLE 0 | ||
| 714 | # define PTHREAD_CREATE_DETACHED 1 | ||
| 715 | #else | ||
| 716 | # if !1 | ||
| 717 | # if !GNULIB_defined_pthread_thread_types | ||
| 718 | typedef int pthread_t; | ||
| 719 | typedef unsigned int pthread_attr_t; | ||
| 720 | # define GNULIB_defined_pthread_thread_types 1 | ||
| 721 | # endif | ||
| 722 | # endif | ||
| 723 | # if !1 | ||
| 724 | # define PTHREAD_CREATE_JOINABLE 0 | ||
| 725 | # define PTHREAD_CREATE_DETACHED 1 | ||
| 726 | # endif | ||
| 727 | #endif | ||
| 728 | |||
| 729 | /* =========== Once-only control (initialization) types and macros ========== */ | ||
| 730 | |||
| 731 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 732 | # if 1 | ||
| 733 | # include "windows-once.h" | ||
| 734 | # if 1 | ||
| 735 | # define pthread_once_t rpl_pthread_once_t | ||
| 736 | # endif | ||
| 737 | # if !GNULIB_defined_pthread_once_types | ||
| 738 | typedef glwthread_once_t pthread_once_t; | ||
| 739 | # define GNULIB_defined_pthread_once_types 1 | ||
| 740 | # endif | ||
| 741 | # undef PTHREAD_ONCE_INIT | ||
| 742 | # define PTHREAD_ONCE_INIT GLWTHREAD_ONCE_INIT | ||
| 743 | # else | ||
| 744 | # if 1 | ||
| 745 | # define pthread_once_t rpl_pthread_once_t | ||
| 746 | # endif | ||
| 747 | # if !GNULIB_defined_pthread_once_types | ||
| 748 | typedef int pthread_once_t; | ||
| 749 | # define GNULIB_defined_pthread_once_types 1 | ||
| 750 | # endif | ||
| 751 | # undef PTHREAD_ONCE_INIT | ||
| 752 | # define PTHREAD_ONCE_INIT { 0 } | ||
| 753 | # endif | ||
| 754 | #else | ||
| 755 | # if !1 | ||
| 756 | # if !GNULIB_defined_pthread_once_types | ||
| 757 | typedef int pthread_once_t; | ||
| 758 | # define GNULIB_defined_pthread_once_types 1 | ||
| 759 | # endif | ||
| 760 | # undef PTHREAD_ONCE_INIT | ||
| 761 | # define PTHREAD_ONCE_INIT { 0 } | ||
| 762 | # endif | ||
| 763 | #endif | ||
| 764 | |||
| 765 | /* =========== Mutex types and macros =========== */ | ||
| 766 | |||
| 767 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 768 | # if 0 | ||
| 769 | # include "windows-timedmutex.h" | ||
| 770 | # include "windows-timedrecmutex.h" | ||
| 771 | # if 1 | ||
| 772 | # define pthread_mutex_t rpl_pthread_mutex_t | ||
| 773 | # define pthread_mutexattr_t rpl_pthread_mutexattr_t | ||
| 774 | # endif | ||
| 775 | # if !GNULIB_defined_pthread_mutex_types | ||
| 776 | typedef struct | ||
| 777 | { | ||
| 778 | int type; | ||
| 779 | union | ||
| 780 | { | ||
| 781 | glwthread_timedmutex_t u_timedmutex; | ||
| 782 | glwthread_timedrecmutex_t u_timedrecmutex; | ||
| 783 | } | ||
| 784 | u; | ||
| 785 | } | ||
| 786 | pthread_mutex_t; | ||
| 787 | typedef unsigned int pthread_mutexattr_t; | ||
| 788 | # define GNULIB_defined_pthread_mutex_types 1 | ||
| 789 | # endif | ||
| 790 | # undef PTHREAD_MUTEX_INITIALIZER | ||
| 791 | # define PTHREAD_MUTEX_INITIALIZER { 1, { GLWTHREAD_TIMEDMUTEX_INIT } } | ||
| 792 | # else | ||
| 793 | # if 1 | ||
| 794 | # define pthread_mutex_t rpl_pthread_mutex_t | ||
| 795 | # define pthread_mutexattr_t rpl_pthread_mutexattr_t | ||
| 796 | # endif | ||
| 797 | # if !GNULIB_defined_pthread_mutex_types | ||
| 798 | typedef int pthread_mutex_t; | ||
| 799 | typedef unsigned int pthread_mutexattr_t; | ||
| 800 | # define GNULIB_defined_pthread_mutex_types 1 | ||
| 801 | # endif | ||
| 802 | # undef PTHREAD_MUTEX_INITIALIZER | ||
| 803 | # define PTHREAD_MUTEX_INITIALIZER { 0 } | ||
| 804 | # endif | ||
| 805 | # undef PTHREAD_MUTEX_DEFAULT | ||
| 806 | # undef PTHREAD_MUTEX_NORMAL | ||
| 807 | # undef PTHREAD_MUTEX_ERRORCHECK | ||
| 808 | # undef PTHREAD_MUTEX_RECURSIVE | ||
| 809 | # define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL | ||
| 810 | # define PTHREAD_MUTEX_NORMAL 0 | ||
| 811 | # define PTHREAD_MUTEX_ERRORCHECK 1 | ||
| 812 | # define PTHREAD_MUTEX_RECURSIVE 2 | ||
| 813 | # undef PTHREAD_MUTEX_STALLED | ||
| 814 | # undef PTHREAD_MUTEX_ROBUST | ||
| 815 | # define PTHREAD_MUTEX_STALLED 0 | ||
| 816 | # define PTHREAD_MUTEX_ROBUST 1 | ||
| 817 | #else | ||
| 818 | # if !1 | ||
| 819 | # if !GNULIB_defined_pthread_mutex_types | ||
| 820 | typedef int pthread_mutex_t; | ||
| 821 | typedef unsigned int pthread_mutexattr_t; | ||
| 822 | # define GNULIB_defined_pthread_mutex_types 1 | ||
| 823 | # endif | ||
| 824 | # undef PTHREAD_MUTEX_INITIALIZER | ||
| 825 | # define PTHREAD_MUTEX_INITIALIZER { 0 } | ||
| 826 | # endif | ||
| 827 | # if !1 | ||
| 828 | # define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL | ||
| 829 | # define PTHREAD_MUTEX_NORMAL 0 | ||
| 830 | # define PTHREAD_MUTEX_ERRORCHECK 1 | ||
| 831 | # define PTHREAD_MUTEX_RECURSIVE 2 | ||
| 832 | # endif | ||
| 833 | # if !1 | ||
| 834 | # define PTHREAD_MUTEX_STALLED 0 | ||
| 835 | # define PTHREAD_MUTEX_ROBUST 1 | ||
| 836 | # endif | ||
| 837 | #endif | ||
| 838 | |||
| 839 | /* =========== Read-write lock types and macros =========== */ | ||
| 840 | |||
| 841 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 842 | # if 0 | ||
| 843 | # include "windows-timedrwlock.h" | ||
| 844 | # if 1 | ||
| 845 | # define pthread_rwlock_t rpl_pthread_rwlock_t | ||
| 846 | # define pthread_rwlockattr_t rpl_pthread_rwlockattr_t | ||
| 847 | # endif | ||
| 848 | # if !GNULIB_defined_pthread_rwlock_types | ||
| 849 | typedef glwthread_timedrwlock_t pthread_rwlock_t; | ||
| 850 | typedef unsigned int pthread_rwlockattr_t; | ||
| 851 | # define GNULIB_defined_pthread_rwlock_types 1 | ||
| 852 | # endif | ||
| 853 | # undef PTHREAD_RWLOCK_INITIALIZER | ||
| 854 | # define PTHREAD_RWLOCK_INITIALIZER GLWTHREAD_TIMEDRWLOCK_INIT | ||
| 855 | # else | ||
| 856 | # if 1 | ||
| 857 | # define pthread_rwlock_t rpl_pthread_rwlock_t | ||
| 858 | # define pthread_rwlockattr_t rpl_pthread_rwlockattr_t | ||
| 859 | # endif | ||
| 860 | # if !GNULIB_defined_pthread_rwlock_types | ||
| 861 | typedef int pthread_rwlock_t; | ||
| 862 | typedef unsigned int pthread_rwlockattr_t; | ||
| 863 | # define GNULIB_defined_pthread_rwlock_types 1 | ||
| 864 | # endif | ||
| 865 | # undef PTHREAD_RWLOCK_INITIALIZER | ||
| 866 | # define PTHREAD_RWLOCK_INITIALIZER { 0 } | ||
| 867 | # endif | ||
| 868 | #elif 0 && 0 /* i.e. PTHREAD_RWLOCK_UNIMPLEMENTED */ | ||
| 869 | # if 1 | ||
| 870 | # define pthread_rwlock_t rpl_pthread_rwlock_t | ||
| 871 | # define pthread_rwlockattr_t rpl_pthread_rwlockattr_t | ||
| 872 | # endif | ||
| 873 | # if !GNULIB_defined_pthread_rwlock_types | ||
| 874 | typedef struct | ||
| 875 | { | ||
| 876 | pthread_mutex_t lock; /* protects the remaining fields */ | ||
| 877 | pthread_cond_t waiting_readers; /* waiting readers */ | ||
| 878 | pthread_cond_t waiting_writers; /* waiting writers */ | ||
| 879 | unsigned int waiting_writers_count; /* number of waiting writers */ | ||
| 880 | int runcount; /* number of readers running, or -1 when a writer runs */ | ||
| 881 | } | ||
| 882 | pthread_rwlock_t; | ||
| 883 | typedef unsigned int pthread_rwlockattr_t; | ||
| 884 | # define GNULIB_defined_pthread_rwlock_types 1 | ||
| 885 | # endif | ||
| 886 | # undef PTHREAD_RWLOCK_INITIALIZER | ||
| 887 | # define PTHREAD_RWLOCK_INITIALIZER \ | ||
| 888 | { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } | ||
| 889 | #elif 0 && 0 /* i.e. PTHREAD_RWLOCK_BAD_WAITQUEUE */ | ||
| 890 | /* Use rwlocks of kind PREFER_WRITER or PREFER_WRITER_NONRECURSIVE instead of | ||
| 891 | the DEFAULT. */ | ||
| 892 | # undef PTHREAD_RWLOCK_INITIALIZER | ||
| 893 | # define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP | ||
| 894 | #else | ||
| 895 | # if 1 | ||
| 896 | # if !defined PTHREAD_RWLOCK_INITIALIZER && defined PTHREAD_RWLOCK_INITIALIZER_NP /* z/OS */ | ||
| 897 | # define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER_NP | ||
| 898 | # endif | ||
| 899 | # else | ||
| 900 | # if !GNULIB_defined_pthread_rwlock_types | ||
| 901 | typedef int pthread_rwlock_t; | ||
| 902 | typedef unsigned int pthread_rwlockattr_t; | ||
| 903 | # define GNULIB_defined_pthread_rwlock_types 1 | ||
| 904 | # endif | ||
| 905 | # undef PTHREAD_RWLOCK_INITIALIZER | ||
| 906 | # define PTHREAD_RWLOCK_INITIALIZER { 0 } | ||
| 907 | # endif | ||
| 908 | #endif | ||
| 909 | |||
| 910 | /* =========== Condition variable types and macros =========== */ | ||
| 911 | |||
| 912 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 913 | # if 0 | ||
| 914 | # include "windows-cond.h" | ||
| 915 | # if 1 | ||
| 916 | # define pthread_cond_t rpl_pthread_cond_t | ||
| 917 | # define pthread_condattr_t rpl_pthread_condattr_t | ||
| 918 | # endif | ||
| 919 | # if !GNULIB_defined_pthread_cond_types | ||
| 920 | typedef glwthread_cond_t pthread_cond_t; | ||
| 921 | typedef unsigned int pthread_condattr_t; | ||
| 922 | # define GNULIB_defined_pthread_cond_types 1 | ||
| 923 | # endif | ||
| 924 | # undef PTHREAD_COND_INITIALIZER | ||
| 925 | # define PTHREAD_COND_INITIALIZER GLWTHREAD_COND_INIT | ||
| 926 | # else | ||
| 927 | # if 1 | ||
| 928 | # define pthread_cond_t rpl_pthread_cond_t | ||
| 929 | # define pthread_condattr_t rpl_pthread_condattr_t | ||
| 930 | # endif | ||
| 931 | # if !GNULIB_defined_pthread_cond_types | ||
| 932 | typedef int pthread_cond_t; | ||
| 933 | typedef unsigned int pthread_condattr_t; | ||
| 934 | # define GNULIB_defined_pthread_cond_types 1 | ||
| 935 | # endif | ||
| 936 | # undef PTHREAD_COND_INITIALIZER | ||
| 937 | # define PTHREAD_COND_INITIALIZER { 0 } | ||
| 938 | # endif | ||
| 939 | #else | ||
| 940 | # if !1 | ||
| 941 | # if !GNULIB_defined_pthread_cond_types | ||
| 942 | typedef int pthread_cond_t; | ||
| 943 | typedef unsigned int pthread_condattr_t; | ||
| 944 | # define GNULIB_defined_pthread_cond_types 1 | ||
| 945 | # endif | ||
| 946 | # undef PTHREAD_COND_INITIALIZER | ||
| 947 | # define PTHREAD_COND_INITIALIZER { 0 } | ||
| 948 | # endif | ||
| 949 | #endif | ||
| 950 | |||
| 951 | /* =========== Thread-specific storage types and macros =========== */ | ||
| 952 | |||
| 953 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 954 | # if 0 | ||
| 955 | # include "windows-tls.h" | ||
| 956 | # if 1 | ||
| 957 | # define pthread_key_t rpl_pthread_key_t | ||
| 958 | # endif | ||
| 959 | # if !GNULIB_defined_pthread_tss_types | ||
| 960 | typedef glwthread_tls_key_t pthread_key_t; | ||
| 961 | # define GNULIB_defined_pthread_tss_types 1 | ||
| 962 | # endif | ||
| 963 | # undef PTHREAD_DESTRUCTOR_ITERATIONS | ||
| 964 | # define PTHREAD_DESTRUCTOR_ITERATIONS GLWTHREAD_DESTRUCTOR_ITERATIONS | ||
| 965 | # else | ||
| 966 | # if 1 | ||
| 967 | # define pthread_key_t rpl_pthread_key_t | ||
| 968 | # endif | ||
| 969 | # if !GNULIB_defined_pthread_tss_types | ||
| 970 | typedef void ** pthread_key_t; | ||
| 971 | # define GNULIB_defined_pthread_tss_types 1 | ||
| 972 | # endif | ||
| 973 | # undef PTHREAD_DESTRUCTOR_ITERATIONS | ||
| 974 | # define PTHREAD_DESTRUCTOR_ITERATIONS 0 | ||
| 975 | # endif | ||
| 976 | #else | ||
| 977 | # if !1 | ||
| 978 | # if !GNULIB_defined_pthread_tss_types | ||
| 979 | typedef void ** pthread_key_t; | ||
| 980 | # define GNULIB_defined_pthread_tss_types 1 | ||
| 981 | # endif | ||
| 982 | # undef PTHREAD_DESTRUCTOR_ITERATIONS | ||
| 983 | # define PTHREAD_DESTRUCTOR_ITERATIONS 0 | ||
| 984 | # endif | ||
| 985 | #endif | ||
| 986 | |||
| 987 | /* =========== Spinlock types and macros =========== */ | ||
| 988 | |||
| 989 | #if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS | ||
| 990 | # if 0 | ||
| 991 | # include "windows-spin.h" | ||
| 992 | # if 1 | ||
| 993 | # define pthread_spinlock_t rpl_pthread_spinlock_t | ||
| 994 | # endif | ||
| 995 | # if !GNULIB_defined_pthread_spin_types | ||
| 996 | typedef glwthread_spinlock_t pthread_spinlock_t; | ||
| 997 | # define GNULIB_defined_pthread_spin_types 1 | ||
| 998 | # endif | ||
| 999 | # else | ||
| 1000 | # if 1 | ||
| 1001 | # define pthread_spinlock_t rpl_pthread_spinlock_t | ||
| 1002 | # endif | ||
| 1003 | # if !GNULIB_defined_pthread_spin_types | ||
| 1004 | typedef pthread_mutex_t pthread_spinlock_t; | ||
| 1005 | # define GNULIB_defined_pthread_spin_types 1 | ||
| 1006 | # endif | ||
| 1007 | # endif | ||
| 1008 | # undef PTHREAD_PROCESS_PRIVATE | ||
| 1009 | # undef PTHREAD_PROCESS_SHARED | ||
| 1010 | # define PTHREAD_PROCESS_PRIVATE 0 | ||
| 1011 | # define PTHREAD_PROCESS_SHARED 1 | ||
| 1012 | #else | ||
| 1013 | # if 1 | ||
| 1014 | /* <pthread.h> exists and defines pthread_spinlock_t. */ | ||
| 1015 | # if !1 || 0 | ||
| 1016 | /* If the 'pthread-spin' module is in use, it defines all the pthread_spin* | ||
| 1017 | functions. Prepare for it by overriding pthread_spinlock_t if that might | ||
| 1018 | be needed. */ | ||
| 1019 | # if !(((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \ | ||
| 1020 | || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 1)) \ | ||
| 1021 | || (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \ | ||
| 1022 | && !defined __ANDROID__) \ | ||
| 1023 | || __clang_major__ >= 3)) \ | ||
| 1024 | && !defined __ibmxl__) | ||
| 1025 | /* We can't use GCC built-ins. Approximate spinlocks with mutexes. */ | ||
| 1026 | # if !GNULIB_defined_pthread_spin_types | ||
| 1027 | # define pthread_spinlock_t pthread_mutex_t | ||
| 1028 | # define GNULIB_defined_pthread_spin_types 1 | ||
| 1029 | # endif | ||
| 1030 | # endif | ||
| 1031 | # endif | ||
| 1032 | # else | ||
| 1033 | /* Approximate spinlocks with mutexes. */ | ||
| 1034 | # if !GNULIB_defined_pthread_spin_types | ||
| 1035 | typedef pthread_mutex_t pthread_spinlock_t; | ||
| 1036 | # define GNULIB_defined_pthread_spin_types 1 | ||
| 1037 | # endif | ||
| 1038 | # endif | ||
| 1039 | # if !1 | ||
| 1040 | # define PTHREAD_PROCESS_PRIVATE 0 | ||
| 1041 | # define PTHREAD_PROCESS_SHARED 1 | ||
| 1042 | # endif | ||
| 1043 | #endif | ||
| 1044 | |||
| 1045 | /* =========== Other types and macros =========== */ | ||
| 1046 | |||
| 1047 | #if !1 | ||
| 1048 | # if !GNULIB_defined_other_pthread_types | ||
| 1049 | typedef int pthread_barrier_t; | ||
| 1050 | typedef unsigned int pthread_barrierattr_t; | ||
| 1051 | # define GNULIB_defined_other_pthread_types 1 | ||
| 1052 | # endif | ||
| 1053 | #endif | ||
| 1054 | |||
| 1055 | #if !defined PTHREAD_CANCELED | ||
| 1056 | |||
| 1057 | # define PTHREAD_BARRIER_SERIAL_THREAD (-1) | ||
| 1058 | |||
| 1059 | # define PTHREAD_CANCEL_DEFERRED 0 | ||
| 1060 | # define PTHREAD_CANCEL_ASYNCHRONOUS 1 | ||
| 1061 | |||
| 1062 | # define PTHREAD_CANCEL_ENABLE 0 | ||
| 1063 | # define PTHREAD_CANCEL_DISABLE 1 | ||
| 1064 | |||
| 1065 | # define PTHREAD_CANCELED ((void *) -1) | ||
| 1066 | |||
| 1067 | # define PTHREAD_INHERIT_SCHED 0 | ||
| 1068 | # define PTHREAD_EXPLICIT_SCHED 1 | ||
| 1069 | |||
| 1070 | # define PTHREAD_PRIO_NONE 0 | ||
| 1071 | # define PTHREAD_PRIO_INHERIT 1 | ||
| 1072 | # define PTHREAD_PRIO_PROTECT 2 | ||
| 1073 | |||
| 1074 | # define PTHREAD_SCOPE_SYSTEM 0 | ||
| 1075 | # define PTHREAD_SCOPE_PROCESS 1 | ||
| 1076 | |||
| 1077 | #endif | ||
| 1078 | |||
| 1079 | /* =========== Thread functions =========== */ | ||
| 1080 | |||
| 1081 | #if 0 | ||
| 1082 | /* The 'restrict' qualifier on ARG is nonsense, but POSIX specifies it this way. | ||
| 1083 | Sigh. */ | ||
| 1084 | # if 0 | ||
| 1085 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1086 | # undef pthread_create | ||
| 1087 | # define pthread_create rpl_pthread_create | ||
| 1088 | # endif | ||
| 1089 | _GL_FUNCDECL_RPL (pthread_create, int, | ||
| 1090 | (pthread_t *restrict threadp, | ||
| 1091 | const pthread_attr_t *restrict attr, | ||
| 1092 | void * (*mainfunc) (void *), void *restrict arg), | ||
| 1093 | _GL_ARG_NONNULL ((1, 3))); | ||
| 1094 | _GL_CXXALIAS_RPL (pthread_create, int, | ||
| 1095 | (pthread_t *restrict threadp, | ||
| 1096 | const pthread_attr_t *restrict attr, | ||
| 1097 | void * (*mainfunc) (void *), void *restrict arg)); | ||
| 1098 | # else | ||
| 1099 | # if !1 | ||
| 1100 | _GL_FUNCDECL_SYS (pthread_create, int, | ||
| 1101 | (pthread_t *restrict threadp, | ||
| 1102 | const pthread_attr_t *restrict attr, | ||
| 1103 | void * (*mainfunc) (void *), void *restrict arg), | ||
| 1104 | _GL_ARG_NONNULL ((1, 3))); | ||
| 1105 | # endif | ||
| 1106 | _GL_CXXALIAS_SYS_CAST (pthread_create, int, | ||
| 1107 | (pthread_t *restrict threadp, | ||
| 1108 | const pthread_attr_t *restrict attr, | ||
| 1109 | void * (*mainfunc) (void *), void *restrict arg)); | ||
| 1110 | # endif | ||
| 1111 | # if __GLIBC__ >= 2 | ||
| 1112 | _GL_CXXALIASWARN (pthread_create); | ||
| 1113 | # endif | ||
| 1114 | #elif defined GNULIB_POSIXCHECK | ||
| 1115 | # if HAVE_RAW_DECL_PTHREAD_CREATE | ||
| 1116 | _GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - " | ||
| 1117 | "use gnulib module pthread-thread for portability"); | ||
| 1118 | # endif | ||
| 1119 | #endif | ||
| 1120 | |||
| 1121 | #if 0 | ||
| 1122 | # if 0 | ||
| 1123 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1124 | # undef pthread_attr_init | ||
| 1125 | # define pthread_attr_init rpl_pthread_attr_init | ||
| 1126 | # endif | ||
| 1127 | _GL_FUNCDECL_RPL (pthread_attr_init, int, (pthread_attr_t *attr), | ||
| 1128 | _GL_ARG_NONNULL ((1))); | ||
| 1129 | _GL_CXXALIAS_RPL (pthread_attr_init, int, (pthread_attr_t *attr)); | ||
| 1130 | # else | ||
| 1131 | # if !1 | ||
| 1132 | _GL_FUNCDECL_SYS (pthread_attr_init, int, (pthread_attr_t *attr), | ||
| 1133 | _GL_ARG_NONNULL ((1))); | ||
| 1134 | # endif | ||
| 1135 | _GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr)); | ||
| 1136 | # endif | ||
| 1137 | # if __GLIBC__ >= 2 | ||
| 1138 | _GL_CXXALIASWARN (pthread_attr_init); | ||
| 1139 | # endif | ||
| 1140 | #elif defined GNULIB_POSIXCHECK | ||
| 1141 | # if HAVE_RAW_DECL_PTHREAD_ATTR_INIT | ||
| 1142 | _GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - " | ||
| 1143 | "use gnulib module pthread-thread for portability"); | ||
| 1144 | # endif | ||
| 1145 | #endif | ||
| 1146 | |||
| 1147 | #if 0 | ||
| 1148 | # if 0 | ||
| 1149 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1150 | # undef pthread_attr_getdetachstate | ||
| 1151 | # define pthread_attr_getdetachstate rpl_pthread_attr_getdetachstate | ||
| 1152 | # endif | ||
| 1153 | _GL_FUNCDECL_RPL (pthread_attr_getdetachstate, int, | ||
| 1154 | (const pthread_attr_t *attr, int *detachstatep), | ||
| 1155 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1156 | _GL_CXXALIAS_RPL (pthread_attr_getdetachstate, int, | ||
| 1157 | (const pthread_attr_t *attr, int *detachstatep)); | ||
| 1158 | # else | ||
| 1159 | # if !1 | ||
| 1160 | _GL_FUNCDECL_SYS (pthread_attr_getdetachstate, int, | ||
| 1161 | (const pthread_attr_t *attr, int *detachstatep), | ||
| 1162 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1163 | # endif | ||
| 1164 | _GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int, | ||
| 1165 | (const pthread_attr_t *attr, int *detachstatep)); | ||
| 1166 | # endif | ||
| 1167 | # if __GLIBC__ >= 2 | ||
| 1168 | _GL_CXXALIASWARN (pthread_attr_getdetachstate); | ||
| 1169 | # endif | ||
| 1170 | #elif defined GNULIB_POSIXCHECK | ||
| 1171 | # if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE | ||
| 1172 | _GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - " | ||
| 1173 | "use gnulib module pthread-thread for portability"); | ||
| 1174 | # endif | ||
| 1175 | #endif | ||
| 1176 | |||
| 1177 | #if 0 | ||
| 1178 | # if 0 | ||
| 1179 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1180 | # undef pthread_attr_setdetachstate | ||
| 1181 | # define pthread_attr_setdetachstate rpl_pthread_attr_setdetachstate | ||
| 1182 | # endif | ||
| 1183 | _GL_FUNCDECL_RPL (pthread_attr_setdetachstate, int, | ||
| 1184 | (pthread_attr_t *attr, int detachstate), | ||
| 1185 | _GL_ARG_NONNULL ((1))); | ||
| 1186 | _GL_CXXALIAS_RPL (pthread_attr_setdetachstate, int, | ||
| 1187 | (pthread_attr_t *attr, int detachstate)); | ||
| 1188 | # else | ||
| 1189 | # if !1 | ||
| 1190 | _GL_FUNCDECL_SYS (pthread_attr_setdetachstate, int, | ||
| 1191 | (pthread_attr_t *attr, int detachstate), | ||
| 1192 | _GL_ARG_NONNULL ((1))); | ||
| 1193 | # endif | ||
| 1194 | _GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int, | ||
| 1195 | (pthread_attr_t *attr, int detachstate)); | ||
| 1196 | # endif | ||
| 1197 | # if __GLIBC__ >= 2 | ||
| 1198 | _GL_CXXALIASWARN (pthread_attr_setdetachstate); | ||
| 1199 | # endif | ||
| 1200 | #elif defined GNULIB_POSIXCHECK | ||
| 1201 | # if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE | ||
| 1202 | _GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - " | ||
| 1203 | "use gnulib module pthread-thread for portability"); | ||
| 1204 | # endif | ||
| 1205 | #endif | ||
| 1206 | |||
| 1207 | #if 0 | ||
| 1208 | # if 0 | ||
| 1209 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1210 | # undef pthread_attr_destroy | ||
| 1211 | # define pthread_attr_destroy rpl_pthread_attr_destroy | ||
| 1212 | # endif | ||
| 1213 | _GL_FUNCDECL_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr), | ||
| 1214 | _GL_ARG_NONNULL ((1))); | ||
| 1215 | _GL_CXXALIAS_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr)); | ||
| 1216 | # else | ||
| 1217 | # if !1 | ||
| 1218 | _GL_FUNCDECL_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr), | ||
| 1219 | _GL_ARG_NONNULL ((1))); | ||
| 1220 | # endif | ||
| 1221 | _GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr)); | ||
| 1222 | # endif | ||
| 1223 | # if __GLIBC__ >= 2 | ||
| 1224 | _GL_CXXALIASWARN (pthread_attr_destroy); | ||
| 1225 | # endif | ||
| 1226 | #elif defined GNULIB_POSIXCHECK | ||
| 1227 | # if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY | ||
| 1228 | _GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - " | ||
| 1229 | "use gnulib module pthread-thread for portability"); | ||
| 1230 | # endif | ||
| 1231 | #endif | ||
| 1232 | |||
| 1233 | #if 0 | ||
| 1234 | # if 0 | ||
| 1235 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1236 | # undef pthread_self | ||
| 1237 | # define pthread_self rpl_pthread_self | ||
| 1238 | # endif | ||
| 1239 | _GL_FUNCDECL_RPL (pthread_self, pthread_t, (void), _GL_ATTRIBUTE_PURE); | ||
| 1240 | _GL_CXXALIAS_RPL (pthread_self, pthread_t, (void)); | ||
| 1241 | # else | ||
| 1242 | # if !1 | ||
| 1243 | _GL_FUNCDECL_SYS (pthread_self, pthread_t, (void), _GL_ATTRIBUTE_PURE); | ||
| 1244 | # endif | ||
| 1245 | _GL_CXXALIAS_SYS (pthread_self, pthread_t, (void)); | ||
| 1246 | # endif | ||
| 1247 | # if __GLIBC__ >= 2 | ||
| 1248 | _GL_CXXALIASWARN (pthread_self); | ||
| 1249 | # endif | ||
| 1250 | #elif defined GNULIB_POSIXCHECK | ||
| 1251 | # if HAVE_RAW_DECL_PTHREAD_SELF | ||
| 1252 | _GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - " | ||
| 1253 | "use gnulib module pthread-thread for portability"); | ||
| 1254 | # endif | ||
| 1255 | #endif | ||
| 1256 | |||
| 1257 | #if 0 | ||
| 1258 | # if 0 | ||
| 1259 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1260 | # undef pthread_equal | ||
| 1261 | # define pthread_equal rpl_pthread_equal | ||
| 1262 | # endif | ||
| 1263 | _GL_FUNCDECL_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2), ); | ||
| 1264 | _GL_CXXALIAS_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); | ||
| 1265 | # else | ||
| 1266 | # if !1 | ||
| 1267 | _GL_FUNCDECL_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2), ); | ||
| 1268 | # endif | ||
| 1269 | _GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); | ||
| 1270 | # endif | ||
| 1271 | # if __GLIBC__ >= 2 | ||
| 1272 | _GL_CXXALIASWARN (pthread_equal); | ||
| 1273 | # endif | ||
| 1274 | #elif defined GNULIB_POSIXCHECK | ||
| 1275 | # if HAVE_RAW_DECL_PTHREAD_EQUAL | ||
| 1276 | _GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - " | ||
| 1277 | "use gnulib module pthread-thread for portability"); | ||
| 1278 | # endif | ||
| 1279 | #endif | ||
| 1280 | |||
| 1281 | #if 0 | ||
| 1282 | # if 0 | ||
| 1283 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1284 | # undef pthread_detach | ||
| 1285 | # define pthread_detach rpl_pthread_detach | ||
| 1286 | # endif | ||
| 1287 | _GL_FUNCDECL_RPL (pthread_detach, int, (pthread_t thread), ); | ||
| 1288 | _GL_CXXALIAS_RPL (pthread_detach, int, (pthread_t thread)); | ||
| 1289 | # else | ||
| 1290 | # if !1 | ||
| 1291 | _GL_FUNCDECL_SYS (pthread_detach, int, (pthread_t thread), ); | ||
| 1292 | # endif | ||
| 1293 | _GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread)); | ||
| 1294 | # endif | ||
| 1295 | # if __GLIBC__ >= 2 | ||
| 1296 | _GL_CXXALIASWARN (pthread_detach); | ||
| 1297 | # endif | ||
| 1298 | #elif defined GNULIB_POSIXCHECK | ||
| 1299 | # if HAVE_RAW_DECL_PTHREAD_DETACH | ||
| 1300 | _GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - " | ||
| 1301 | "use gnulib module pthread-thread for portability"); | ||
| 1302 | # endif | ||
| 1303 | #endif | ||
| 1304 | |||
| 1305 | #if 0 | ||
| 1306 | # if 0 | ||
| 1307 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1308 | # undef pthread_join | ||
| 1309 | # define pthread_join rpl_pthread_join | ||
| 1310 | # endif | ||
| 1311 | _GL_FUNCDECL_RPL (pthread_join, int, (pthread_t thread, void **valuep), ); | ||
| 1312 | _GL_CXXALIAS_RPL (pthread_join, int, (pthread_t thread, void **valuep)); | ||
| 1313 | # else | ||
| 1314 | # if !1 | ||
| 1315 | _GL_FUNCDECL_SYS (pthread_join, int, (pthread_t thread, void **valuep), ); | ||
| 1316 | # endif | ||
| 1317 | _GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep)); | ||
| 1318 | # endif | ||
| 1319 | # if __GLIBC__ >= 2 | ||
| 1320 | _GL_CXXALIASWARN (pthread_join); | ||
| 1321 | # endif | ||
| 1322 | #elif defined GNULIB_POSIXCHECK | ||
| 1323 | # if HAVE_RAW_DECL_PTHREAD_JOIN | ||
| 1324 | _GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - " | ||
| 1325 | "use gnulib module pthread-thread for portability"); | ||
| 1326 | # endif | ||
| 1327 | #endif | ||
| 1328 | |||
| 1329 | #if 0 | ||
| 1330 | # if 0 | ||
| 1331 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1332 | # undef pthread_exit | ||
| 1333 | # define pthread_exit rpl_pthread_exit | ||
| 1334 | # endif | ||
| 1335 | _GL_FUNCDECL_RPL (pthread_exit, _Noreturn void, (void *value), ); | ||
| 1336 | _GL_CXXALIAS_RPL (pthread_exit, void, (void *value)); | ||
| 1337 | # else | ||
| 1338 | # if !1 | ||
| 1339 | _GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value), ); | ||
| 1340 | # endif | ||
| 1341 | /* Need to cast because of AIX with xlclang++. */ | ||
| 1342 | _GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value)); | ||
| 1343 | # endif | ||
| 1344 | # if __GLIBC__ >= 2 | ||
| 1345 | _GL_CXXALIASWARN (pthread_exit); | ||
| 1346 | # endif | ||
| 1347 | #elif defined GNULIB_POSIXCHECK | ||
| 1348 | # if HAVE_RAW_DECL_PTHREAD_EXIT | ||
| 1349 | _GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - " | ||
| 1350 | "use gnulib module pthread-thread for portability"); | ||
| 1351 | # endif | ||
| 1352 | #endif | ||
| 1353 | |||
| 1354 | /* =========== Once-only control (initialization) functions =========== */ | ||
| 1355 | |||
| 1356 | #if 1 | ||
| 1357 | # if 0 | ||
| 1358 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1359 | # undef pthread_once | ||
| 1360 | # define pthread_once rpl_pthread_once | ||
| 1361 | # endif | ||
| 1362 | _GL_FUNCDECL_RPL (pthread_once, int, | ||
| 1363 | (pthread_once_t *once_control, void (*initfunction) (void)), | ||
| 1364 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1365 | _GL_CXXALIAS_RPL (pthread_once, int, | ||
| 1366 | (pthread_once_t *once_control, void (*initfunction) (void))); | ||
| 1367 | # else | ||
| 1368 | # if !1 | ||
| 1369 | _GL_FUNCDECL_SYS (pthread_once, int, | ||
| 1370 | (pthread_once_t *once_control, void (*initfunction) (void)), | ||
| 1371 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1372 | # endif | ||
| 1373 | _GL_CXXALIAS_SYS_CAST (pthread_once, int, | ||
| 1374 | (pthread_once_t *once_control, | ||
| 1375 | void (*initfunction) (void))); | ||
| 1376 | # endif | ||
| 1377 | # if __GLIBC__ >= 2 | ||
| 1378 | _GL_CXXALIASWARN (pthread_once); | ||
| 1379 | # endif | ||
| 1380 | #elif defined GNULIB_POSIXCHECK | ||
| 1381 | # if HAVE_RAW_DECL_PTHREAD_ONCE | ||
| 1382 | _GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - " | ||
| 1383 | "use gnulib module pthread-once for portability"); | ||
| 1384 | # endif | ||
| 1385 | #endif | ||
| 1386 | |||
| 1387 | /* =========== Mutex functions =========== */ | ||
| 1388 | |||
| 1389 | #if 0 | ||
| 1390 | # if 0 | ||
| 1391 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1392 | # undef pthread_mutex_init | ||
| 1393 | # define pthread_mutex_init rpl_pthread_mutex_init | ||
| 1394 | # endif | ||
| 1395 | _GL_FUNCDECL_RPL (pthread_mutex_init, int, | ||
| 1396 | (pthread_mutex_t *restrict mutex, | ||
| 1397 | const pthread_mutexattr_t *restrict attr), | ||
| 1398 | _GL_ARG_NONNULL ((1))); | ||
| 1399 | _GL_CXXALIAS_RPL (pthread_mutex_init, int, | ||
| 1400 | (pthread_mutex_t *restrict mutex, | ||
| 1401 | const pthread_mutexattr_t *restrict attr)); | ||
| 1402 | # else | ||
| 1403 | # if !1 | ||
| 1404 | _GL_FUNCDECL_SYS (pthread_mutex_init, int, | ||
| 1405 | (pthread_mutex_t *restrict mutex, | ||
| 1406 | const pthread_mutexattr_t *restrict attr), | ||
| 1407 | _GL_ARG_NONNULL ((1))); | ||
| 1408 | # endif | ||
| 1409 | _GL_CXXALIAS_SYS (pthread_mutex_init, int, | ||
| 1410 | (pthread_mutex_t *restrict mutex, | ||
| 1411 | const pthread_mutexattr_t *restrict attr)); | ||
| 1412 | # endif | ||
| 1413 | # if __GLIBC__ >= 2 | ||
| 1414 | _GL_CXXALIASWARN (pthread_mutex_init); | ||
| 1415 | # endif | ||
| 1416 | #elif defined GNULIB_POSIXCHECK | ||
| 1417 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT | ||
| 1418 | _GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - " | ||
| 1419 | "use gnulib module pthread-mutex for portability"); | ||
| 1420 | # endif | ||
| 1421 | #endif | ||
| 1422 | |||
| 1423 | #if 0 | ||
| 1424 | # if 0 | ||
| 1425 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1426 | # undef pthread_mutexattr_init | ||
| 1427 | # define pthread_mutexattr_init rpl_pthread_mutexattr_init | ||
| 1428 | # endif | ||
| 1429 | _GL_FUNCDECL_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr), | ||
| 1430 | _GL_ARG_NONNULL ((1))); | ||
| 1431 | _GL_CXXALIAS_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)); | ||
| 1432 | # else | ||
| 1433 | # if !1 | ||
| 1434 | _GL_FUNCDECL_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr), | ||
| 1435 | _GL_ARG_NONNULL ((1))); | ||
| 1436 | # endif | ||
| 1437 | _GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)); | ||
| 1438 | # endif | ||
| 1439 | # if __GLIBC__ >= 2 | ||
| 1440 | _GL_CXXALIASWARN (pthread_mutexattr_init); | ||
| 1441 | # endif | ||
| 1442 | #elif defined GNULIB_POSIXCHECK | ||
| 1443 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT | ||
| 1444 | _GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - " | ||
| 1445 | "use gnulib module pthread-mutex for portability"); | ||
| 1446 | # endif | ||
| 1447 | #endif | ||
| 1448 | |||
| 1449 | #if 0 | ||
| 1450 | # if 0 | ||
| 1451 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1452 | # undef pthread_mutexattr_gettype | ||
| 1453 | # define pthread_mutexattr_gettype rpl_pthread_mutexattr_gettype | ||
| 1454 | # endif | ||
| 1455 | _GL_FUNCDECL_RPL (pthread_mutexattr_gettype, int, | ||
| 1456 | (const pthread_mutexattr_t *restrict attr, | ||
| 1457 | int *restrict typep), | ||
| 1458 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1459 | _GL_CXXALIAS_RPL (pthread_mutexattr_gettype, int, | ||
| 1460 | (const pthread_mutexattr_t *restrict attr, | ||
| 1461 | int *restrict typep)); | ||
| 1462 | # else | ||
| 1463 | # if !1 | ||
| 1464 | _GL_FUNCDECL_SYS (pthread_mutexattr_gettype, int, | ||
| 1465 | (const pthread_mutexattr_t *restrict attr, | ||
| 1466 | int *restrict typep), | ||
| 1467 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1468 | # endif | ||
| 1469 | /* Need to cast, because on FreeBSD the first parameter is | ||
| 1470 | pthread_mutexattr_t *attr. */ | ||
| 1471 | _GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int, | ||
| 1472 | (const pthread_mutexattr_t *restrict attr, | ||
| 1473 | int *restrict typep)); | ||
| 1474 | # endif | ||
| 1475 | # if __GLIBC__ >= 2 | ||
| 1476 | _GL_CXXALIASWARN (pthread_mutexattr_gettype); | ||
| 1477 | # endif | ||
| 1478 | #elif defined GNULIB_POSIXCHECK | ||
| 1479 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE | ||
| 1480 | _GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - " | ||
| 1481 | "use gnulib module pthread-mutex for portability"); | ||
| 1482 | # endif | ||
| 1483 | #endif | ||
| 1484 | |||
| 1485 | #if 0 | ||
| 1486 | # if 0 | ||
| 1487 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1488 | # undef pthread_mutexattr_settype | ||
| 1489 | # define pthread_mutexattr_settype rpl_pthread_mutexattr_settype | ||
| 1490 | # endif | ||
| 1491 | _GL_FUNCDECL_RPL (pthread_mutexattr_settype, int, | ||
| 1492 | (pthread_mutexattr_t *attr, int type), _GL_ARG_NONNULL ((1))); | ||
| 1493 | _GL_CXXALIAS_RPL (pthread_mutexattr_settype, int, | ||
| 1494 | (pthread_mutexattr_t *attr, int type)); | ||
| 1495 | # else | ||
| 1496 | # if !1 | ||
| 1497 | _GL_FUNCDECL_SYS (pthread_mutexattr_settype, int, | ||
| 1498 | (pthread_mutexattr_t *attr, int type), _GL_ARG_NONNULL ((1))); | ||
| 1499 | # endif | ||
| 1500 | _GL_CXXALIAS_SYS (pthread_mutexattr_settype, int, | ||
| 1501 | (pthread_mutexattr_t *attr, int type)); | ||
| 1502 | # endif | ||
| 1503 | # if __GLIBC__ >= 2 | ||
| 1504 | _GL_CXXALIASWARN (pthread_mutexattr_settype); | ||
| 1505 | # endif | ||
| 1506 | #elif defined GNULIB_POSIXCHECK | ||
| 1507 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE | ||
| 1508 | _GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - " | ||
| 1509 | "use gnulib module pthread-mutex for portability"); | ||
| 1510 | # endif | ||
| 1511 | #endif | ||
| 1512 | |||
| 1513 | #if 0 | ||
| 1514 | # if 0 | ||
| 1515 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1516 | # undef pthread_mutexattr_getrobust | ||
| 1517 | # define pthread_mutexattr_getrobust rpl_pthread_mutexattr_getrobust | ||
| 1518 | # endif | ||
| 1519 | _GL_FUNCDECL_RPL (pthread_mutexattr_getrobust, int, | ||
| 1520 | (const pthread_mutexattr_t *restrict attr, | ||
| 1521 | int *restrict robustp), | ||
| 1522 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1523 | _GL_CXXALIAS_RPL (pthread_mutexattr_getrobust, int, | ||
| 1524 | (const pthread_mutexattr_t *restrict attr, | ||
| 1525 | int *restrict robustp)); | ||
| 1526 | # else | ||
| 1527 | # if !1 | ||
| 1528 | _GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int, | ||
| 1529 | (const pthread_mutexattr_t *restrict attr, | ||
| 1530 | int *restrict robustp), | ||
| 1531 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1532 | # endif | ||
| 1533 | /* Need to cast, because on FreeBSD the first parameter is | ||
| 1534 | pthread_mutexattr_t *attr. */ | ||
| 1535 | _GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int, | ||
| 1536 | (const pthread_mutexattr_t *restrict attr, | ||
| 1537 | int *restrict robustp)); | ||
| 1538 | # endif | ||
| 1539 | # if __GLIBC__ >= 2 | ||
| 1540 | _GL_CXXALIASWARN (pthread_mutexattr_getrobust); | ||
| 1541 | # endif | ||
| 1542 | #elif defined GNULIB_POSIXCHECK | ||
| 1543 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST | ||
| 1544 | _GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - " | ||
| 1545 | "use gnulib module pthread-mutex for portability"); | ||
| 1546 | # endif | ||
| 1547 | #endif | ||
| 1548 | |||
| 1549 | #if 0 | ||
| 1550 | # if 0 | ||
| 1551 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1552 | # undef pthread_mutexattr_setrobust | ||
| 1553 | # define pthread_mutexattr_setrobust rpl_pthread_mutexattr_setrobust | ||
| 1554 | # endif | ||
| 1555 | _GL_FUNCDECL_RPL (pthread_mutexattr_setrobust, int, | ||
| 1556 | (pthread_mutexattr_t *attr, int robust), | ||
| 1557 | _GL_ARG_NONNULL ((1))); | ||
| 1558 | _GL_CXXALIAS_RPL (pthread_mutexattr_setrobust, int, | ||
| 1559 | (pthread_mutexattr_t *attr, int robust)); | ||
| 1560 | # else | ||
| 1561 | # if !1 | ||
| 1562 | _GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int, | ||
| 1563 | (pthread_mutexattr_t *attr, int robust), | ||
| 1564 | _GL_ARG_NONNULL ((1))); | ||
| 1565 | # endif | ||
| 1566 | _GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int, | ||
| 1567 | (pthread_mutexattr_t *attr, int robust)); | ||
| 1568 | # endif | ||
| 1569 | # if __GLIBC__ >= 2 | ||
| 1570 | _GL_CXXALIASWARN (pthread_mutexattr_setrobust); | ||
| 1571 | # endif | ||
| 1572 | #elif defined GNULIB_POSIXCHECK | ||
| 1573 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST | ||
| 1574 | _GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - " | ||
| 1575 | "use gnulib module pthread-mutex for portability"); | ||
| 1576 | # endif | ||
| 1577 | #endif | ||
| 1578 | |||
| 1579 | #if 0 | ||
| 1580 | # if 0 | ||
| 1581 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1582 | # undef pthread_mutexattr_destroy | ||
| 1583 | # define pthread_mutexattr_destroy rpl_pthread_mutexattr_destroy | ||
| 1584 | # endif | ||
| 1585 | _GL_FUNCDECL_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr), | ||
| 1586 | _GL_ARG_NONNULL ((1))); | ||
| 1587 | _GL_CXXALIAS_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)); | ||
| 1588 | # else | ||
| 1589 | # if !1 | ||
| 1590 | _GL_FUNCDECL_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr), | ||
| 1591 | _GL_ARG_NONNULL ((1))); | ||
| 1592 | # endif | ||
| 1593 | _GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)); | ||
| 1594 | # endif | ||
| 1595 | # if __GLIBC__ >= 2 | ||
| 1596 | _GL_CXXALIASWARN (pthread_mutexattr_destroy); | ||
| 1597 | # endif | ||
| 1598 | #elif defined GNULIB_POSIXCHECK | ||
| 1599 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY | ||
| 1600 | _GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - " | ||
| 1601 | "use gnulib module pthread-mutex for portability"); | ||
| 1602 | # endif | ||
| 1603 | #endif | ||
| 1604 | |||
| 1605 | #if 0 | ||
| 1606 | # if 0 | ||
| 1607 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1608 | # undef pthread_mutex_lock | ||
| 1609 | # define pthread_mutex_lock rpl_pthread_mutex_lock | ||
| 1610 | # endif | ||
| 1611 | _GL_FUNCDECL_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex), | ||
| 1612 | _GL_ARG_NONNULL ((1))); | ||
| 1613 | _GL_CXXALIAS_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex)); | ||
| 1614 | # else | ||
| 1615 | # if !1 | ||
| 1616 | _GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex), | ||
| 1617 | _GL_ARG_NONNULL ((1))); | ||
| 1618 | # endif | ||
| 1619 | _GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)); | ||
| 1620 | # endif | ||
| 1621 | # if __GLIBC__ >= 2 | ||
| 1622 | _GL_CXXALIASWARN (pthread_mutex_lock); | ||
| 1623 | # endif | ||
| 1624 | #elif defined GNULIB_POSIXCHECK | ||
| 1625 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK | ||
| 1626 | _GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - " | ||
| 1627 | "use gnulib module pthread-mutex for portability"); | ||
| 1628 | # endif | ||
| 1629 | #endif | ||
| 1630 | |||
| 1631 | #if 0 | ||
| 1632 | # if 0 | ||
| 1633 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1634 | # undef pthread_mutex_trylock | ||
| 1635 | # define pthread_mutex_trylock rpl_pthread_mutex_trylock | ||
| 1636 | # endif | ||
| 1637 | _GL_FUNCDECL_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex), | ||
| 1638 | _GL_ARG_NONNULL ((1))); | ||
| 1639 | _GL_CXXALIAS_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)); | ||
| 1640 | # else | ||
| 1641 | # if !1 | ||
| 1642 | _GL_FUNCDECL_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex), | ||
| 1643 | _GL_ARG_NONNULL ((1))); | ||
| 1644 | # endif | ||
| 1645 | _GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)); | ||
| 1646 | # endif | ||
| 1647 | # if __GLIBC__ >= 2 | ||
| 1648 | _GL_CXXALIASWARN (pthread_mutex_trylock); | ||
| 1649 | # endif | ||
| 1650 | #elif defined GNULIB_POSIXCHECK | ||
| 1651 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK | ||
| 1652 | _GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - " | ||
| 1653 | "use gnulib module pthread-mutex for portability"); | ||
| 1654 | # endif | ||
| 1655 | #endif | ||
| 1656 | |||
| 1657 | #if 0 | ||
| 1658 | # if 0 | ||
| 1659 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1660 | # undef pthread_mutex_timedlock | ||
| 1661 | # define pthread_mutex_timedlock rpl_pthread_mutex_timedlock | ||
| 1662 | # endif | ||
| 1663 | _GL_FUNCDECL_RPL (pthread_mutex_timedlock, int, | ||
| 1664 | (pthread_mutex_t *restrict mutex, | ||
| 1665 | const struct timespec *restrict abstime), | ||
| 1666 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1667 | _GL_CXXALIAS_RPL (pthread_mutex_timedlock, int, | ||
| 1668 | (pthread_mutex_t *restrict mutex, | ||
| 1669 | const struct timespec *restrict abstime)); | ||
| 1670 | # else | ||
| 1671 | # if !1 | ||
| 1672 | _GL_FUNCDECL_SYS (pthread_mutex_timedlock, int, | ||
| 1673 | (pthread_mutex_t *restrict mutex, | ||
| 1674 | const struct timespec *restrict abstime), | ||
| 1675 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1676 | # endif | ||
| 1677 | _GL_CXXALIAS_SYS (pthread_mutex_timedlock, int, | ||
| 1678 | (pthread_mutex_t *restrict mutex, | ||
| 1679 | const struct timespec *restrict abstime)); | ||
| 1680 | # endif | ||
| 1681 | # if __GLIBC__ >= 2 | ||
| 1682 | _GL_CXXALIASWARN (pthread_mutex_timedlock); | ||
| 1683 | # endif | ||
| 1684 | #elif defined GNULIB_POSIXCHECK | ||
| 1685 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK | ||
| 1686 | _GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - " | ||
| 1687 | "use gnulib module pthread_mutex_timedlock for portability"); | ||
| 1688 | # endif | ||
| 1689 | #endif | ||
| 1690 | |||
| 1691 | #if 0 | ||
| 1692 | # if 0 | ||
| 1693 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1694 | # undef pthread_mutex_unlock | ||
| 1695 | # define pthread_mutex_unlock rpl_pthread_mutex_unlock | ||
| 1696 | # endif | ||
| 1697 | _GL_FUNCDECL_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex), | ||
| 1698 | _GL_ARG_NONNULL ((1))); | ||
| 1699 | _GL_CXXALIAS_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)); | ||
| 1700 | # else | ||
| 1701 | # if !1 | ||
| 1702 | _GL_FUNCDECL_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex), | ||
| 1703 | _GL_ARG_NONNULL ((1))); | ||
| 1704 | # endif | ||
| 1705 | _GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)); | ||
| 1706 | # endif | ||
| 1707 | # if __GLIBC__ >= 2 | ||
| 1708 | _GL_CXXALIASWARN (pthread_mutex_unlock); | ||
| 1709 | # endif | ||
| 1710 | #elif defined GNULIB_POSIXCHECK | ||
| 1711 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK | ||
| 1712 | _GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - " | ||
| 1713 | "use gnulib module pthread-mutex for portability"); | ||
| 1714 | # endif | ||
| 1715 | #endif | ||
| 1716 | |||
| 1717 | #if 0 | ||
| 1718 | # if 0 | ||
| 1719 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1720 | # undef pthread_mutex_destroy | ||
| 1721 | # define pthread_mutex_destroy rpl_pthread_mutex_destroy | ||
| 1722 | # endif | ||
| 1723 | _GL_FUNCDECL_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex), | ||
| 1724 | _GL_ARG_NONNULL ((1))); | ||
| 1725 | _GL_CXXALIAS_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)); | ||
| 1726 | # else | ||
| 1727 | # if !1 | ||
| 1728 | _GL_FUNCDECL_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex), | ||
| 1729 | _GL_ARG_NONNULL ((1))); | ||
| 1730 | # endif | ||
| 1731 | _GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)); | ||
| 1732 | # endif | ||
| 1733 | # if __GLIBC__ >= 2 | ||
| 1734 | _GL_CXXALIASWARN (pthread_mutex_destroy); | ||
| 1735 | # endif | ||
| 1736 | #elif defined GNULIB_POSIXCHECK | ||
| 1737 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY | ||
| 1738 | _GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - " | ||
| 1739 | "use gnulib module pthread-mutex for portability"); | ||
| 1740 | # endif | ||
| 1741 | #endif | ||
| 1742 | |||
| 1743 | /* =========== Read-write lock functions =========== */ | ||
| 1744 | |||
| 1745 | #if 0 | ||
| 1746 | # if 0 | ||
| 1747 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1748 | # undef pthread_rwlock_init | ||
| 1749 | # define pthread_rwlock_init rpl_pthread_rwlock_init | ||
| 1750 | # endif | ||
| 1751 | _GL_FUNCDECL_RPL (pthread_rwlock_init, int, | ||
| 1752 | (pthread_rwlock_t *restrict lock, | ||
| 1753 | const pthread_rwlockattr_t *restrict attr), | ||
| 1754 | _GL_ARG_NONNULL ((1))); | ||
| 1755 | _GL_CXXALIAS_RPL (pthread_rwlock_init, int, | ||
| 1756 | (pthread_rwlock_t *restrict lock, | ||
| 1757 | const pthread_rwlockattr_t *restrict attr)); | ||
| 1758 | # else | ||
| 1759 | # if !1 | ||
| 1760 | _GL_FUNCDECL_SYS (pthread_rwlock_init, int, | ||
| 1761 | (pthread_rwlock_t *restrict lock, | ||
| 1762 | const pthread_rwlockattr_t *restrict attr), | ||
| 1763 | _GL_ARG_NONNULL ((1))); | ||
| 1764 | # endif | ||
| 1765 | _GL_CXXALIAS_SYS (pthread_rwlock_init, int, | ||
| 1766 | (pthread_rwlock_t *restrict lock, | ||
| 1767 | const pthread_rwlockattr_t *restrict attr)); | ||
| 1768 | # endif | ||
| 1769 | # if __GLIBC__ >= 2 | ||
| 1770 | _GL_CXXALIASWARN (pthread_rwlock_init); | ||
| 1771 | # endif | ||
| 1772 | #elif defined GNULIB_POSIXCHECK | ||
| 1773 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT | ||
| 1774 | _GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - " | ||
| 1775 | "use gnulib module pthread-rwlock for portability"); | ||
| 1776 | # endif | ||
| 1777 | #endif | ||
| 1778 | |||
| 1779 | #if 0 | ||
| 1780 | # if 0 | ||
| 1781 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1782 | # undef pthread_rwlockattr_init | ||
| 1783 | # define pthread_rwlockattr_init rpl_pthread_rwlockattr_init | ||
| 1784 | # endif | ||
| 1785 | _GL_FUNCDECL_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr), | ||
| 1786 | _GL_ARG_NONNULL ((1))); | ||
| 1787 | _GL_CXXALIAS_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)); | ||
| 1788 | # else | ||
| 1789 | # if !1 | ||
| 1790 | _GL_FUNCDECL_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr), | ||
| 1791 | _GL_ARG_NONNULL ((1))); | ||
| 1792 | # endif | ||
| 1793 | _GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)); | ||
| 1794 | # endif | ||
| 1795 | # if __GLIBC__ >= 2 | ||
| 1796 | _GL_CXXALIASWARN (pthread_rwlockattr_init); | ||
| 1797 | # endif | ||
| 1798 | #elif defined GNULIB_POSIXCHECK | ||
| 1799 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT | ||
| 1800 | _GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - " | ||
| 1801 | "use gnulib module pthread-rwlock for portability"); | ||
| 1802 | # endif | ||
| 1803 | #endif | ||
| 1804 | |||
| 1805 | #if 0 | ||
| 1806 | # if 0 | ||
| 1807 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1808 | # undef pthread_rwlockattr_destroy | ||
| 1809 | # define pthread_rwlockattr_destroy rpl_pthread_rwlockattr_destroy | ||
| 1810 | # endif | ||
| 1811 | _GL_FUNCDECL_RPL (pthread_rwlockattr_destroy, int, | ||
| 1812 | (pthread_rwlockattr_t *attr), _GL_ARG_NONNULL ((1))); | ||
| 1813 | _GL_CXXALIAS_RPL (pthread_rwlockattr_destroy, int, | ||
| 1814 | (pthread_rwlockattr_t *attr)); | ||
| 1815 | # else | ||
| 1816 | # if !1 | ||
| 1817 | _GL_FUNCDECL_SYS (pthread_rwlockattr_destroy, int, | ||
| 1818 | (pthread_rwlockattr_t *attr), _GL_ARG_NONNULL ((1))); | ||
| 1819 | # endif | ||
| 1820 | _GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int, | ||
| 1821 | (pthread_rwlockattr_t *attr)); | ||
| 1822 | # endif | ||
| 1823 | # if __GLIBC__ >= 2 | ||
| 1824 | _GL_CXXALIASWARN (pthread_rwlockattr_destroy); | ||
| 1825 | # endif | ||
| 1826 | #elif defined GNULIB_POSIXCHECK | ||
| 1827 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY | ||
| 1828 | _GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - " | ||
| 1829 | "use gnulib module pthread-rwlock for portability"); | ||
| 1830 | # endif | ||
| 1831 | #endif | ||
| 1832 | |||
| 1833 | #if 0 | ||
| 1834 | # if 0 | ||
| 1835 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1836 | # undef pthread_rwlock_rdlock | ||
| 1837 | # define pthread_rwlock_rdlock rpl_pthread_rwlock_rdlock | ||
| 1838 | # endif | ||
| 1839 | _GL_FUNCDECL_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock), | ||
| 1840 | _GL_ARG_NONNULL ((1))); | ||
| 1841 | _GL_CXXALIAS_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)); | ||
| 1842 | # else | ||
| 1843 | # if !1 | ||
| 1844 | _GL_FUNCDECL_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock), | ||
| 1845 | _GL_ARG_NONNULL ((1))); | ||
| 1846 | # endif | ||
| 1847 | _GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)); | ||
| 1848 | # endif | ||
| 1849 | # if __GLIBC__ >= 2 | ||
| 1850 | _GL_CXXALIASWARN (pthread_rwlock_rdlock); | ||
| 1851 | # endif | ||
| 1852 | #elif defined GNULIB_POSIXCHECK | ||
| 1853 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK | ||
| 1854 | _GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - " | ||
| 1855 | "use gnulib module pthread-rwlock for portability"); | ||
| 1856 | # endif | ||
| 1857 | #endif | ||
| 1858 | |||
| 1859 | #if 0 | ||
| 1860 | # if 0 | ||
| 1861 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1862 | # undef pthread_rwlock_wrlock | ||
| 1863 | # define pthread_rwlock_wrlock rpl_pthread_rwlock_wrlock | ||
| 1864 | # endif | ||
| 1865 | _GL_FUNCDECL_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock), | ||
| 1866 | _GL_ARG_NONNULL ((1))); | ||
| 1867 | _GL_CXXALIAS_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)); | ||
| 1868 | # else | ||
| 1869 | # if !1 | ||
| 1870 | _GL_FUNCDECL_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock), | ||
| 1871 | _GL_ARG_NONNULL ((1))); | ||
| 1872 | # endif | ||
| 1873 | _GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)); | ||
| 1874 | # endif | ||
| 1875 | # if __GLIBC__ >= 2 | ||
| 1876 | _GL_CXXALIASWARN (pthread_rwlock_wrlock); | ||
| 1877 | # endif | ||
| 1878 | #elif defined GNULIB_POSIXCHECK | ||
| 1879 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK | ||
| 1880 | _GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - " | ||
| 1881 | "use gnulib module pthread-rwlock for portability"); | ||
| 1882 | # endif | ||
| 1883 | #endif | ||
| 1884 | |||
| 1885 | #if 0 | ||
| 1886 | # if 0 | ||
| 1887 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1888 | # undef pthread_rwlock_tryrdlock | ||
| 1889 | # define pthread_rwlock_tryrdlock rpl_pthread_rwlock_tryrdlock | ||
| 1890 | # endif | ||
| 1891 | _GL_FUNCDECL_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock), | ||
| 1892 | _GL_ARG_NONNULL ((1))); | ||
| 1893 | _GL_CXXALIAS_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)); | ||
| 1894 | # else | ||
| 1895 | # if !1 | ||
| 1896 | _GL_FUNCDECL_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock), | ||
| 1897 | _GL_ARG_NONNULL ((1))); | ||
| 1898 | # endif | ||
| 1899 | _GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)); | ||
| 1900 | # endif | ||
| 1901 | # if __GLIBC__ >= 2 | ||
| 1902 | _GL_CXXALIASWARN (pthread_rwlock_tryrdlock); | ||
| 1903 | # endif | ||
| 1904 | #elif defined GNULIB_POSIXCHECK | ||
| 1905 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK | ||
| 1906 | _GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - " | ||
| 1907 | "use gnulib module pthread-rwlock for portability"); | ||
| 1908 | # endif | ||
| 1909 | #endif | ||
| 1910 | |||
| 1911 | #if 0 | ||
| 1912 | # if 0 | ||
| 1913 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1914 | # undef pthread_rwlock_trywrlock | ||
| 1915 | # define pthread_rwlock_trywrlock rpl_pthread_rwlock_trywrlock | ||
| 1916 | # endif | ||
| 1917 | _GL_FUNCDECL_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock), | ||
| 1918 | _GL_ARG_NONNULL ((1))); | ||
| 1919 | _GL_CXXALIAS_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)); | ||
| 1920 | # else | ||
| 1921 | # if !1 | ||
| 1922 | _GL_FUNCDECL_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock), | ||
| 1923 | _GL_ARG_NONNULL ((1))); | ||
| 1924 | # endif | ||
| 1925 | _GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)); | ||
| 1926 | # endif | ||
| 1927 | # if __GLIBC__ >= 2 | ||
| 1928 | _GL_CXXALIASWARN (pthread_rwlock_trywrlock); | ||
| 1929 | # endif | ||
| 1930 | #elif defined GNULIB_POSIXCHECK | ||
| 1931 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK | ||
| 1932 | _GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - " | ||
| 1933 | "use gnulib module pthread-rwlock for portability"); | ||
| 1934 | # endif | ||
| 1935 | #endif | ||
| 1936 | |||
| 1937 | #if 0 | ||
| 1938 | # if 0 | ||
| 1939 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1940 | # undef pthread_rwlock_timedrdlock | ||
| 1941 | # define pthread_rwlock_timedrdlock rpl_pthread_rwlock_timedrdlock | ||
| 1942 | # endif | ||
| 1943 | _GL_FUNCDECL_RPL (pthread_rwlock_timedrdlock, int, | ||
| 1944 | (pthread_rwlock_t *restrict lock, | ||
| 1945 | const struct timespec *restrict abstime), | ||
| 1946 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1947 | _GL_CXXALIAS_RPL (pthread_rwlock_timedrdlock, int, | ||
| 1948 | (pthread_rwlock_t *restrict lock, | ||
| 1949 | const struct timespec *restrict abstime)); | ||
| 1950 | # else | ||
| 1951 | # if !1 | ||
| 1952 | _GL_FUNCDECL_SYS (pthread_rwlock_timedrdlock, int, | ||
| 1953 | (pthread_rwlock_t *restrict lock, | ||
| 1954 | const struct timespec *restrict abstime), | ||
| 1955 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1956 | # endif | ||
| 1957 | _GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int, | ||
| 1958 | (pthread_rwlock_t *restrict lock, | ||
| 1959 | const struct timespec *restrict abstime)); | ||
| 1960 | # endif | ||
| 1961 | # if __GLIBC__ >= 2 | ||
| 1962 | _GL_CXXALIASWARN (pthread_rwlock_timedrdlock); | ||
| 1963 | # endif | ||
| 1964 | #elif defined GNULIB_POSIXCHECK | ||
| 1965 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK | ||
| 1966 | _GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - " | ||
| 1967 | "use gnulib module pthread-rwlock for portability"); | ||
| 1968 | # endif | ||
| 1969 | #endif | ||
| 1970 | |||
| 1971 | #if 0 | ||
| 1972 | # if 0 | ||
| 1973 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1974 | # undef pthread_rwlock_timedwrlock | ||
| 1975 | # define pthread_rwlock_timedwrlock rpl_pthread_rwlock_timedwrlock | ||
| 1976 | # endif | ||
| 1977 | _GL_FUNCDECL_RPL (pthread_rwlock_timedwrlock, int, | ||
| 1978 | (pthread_rwlock_t *restrict lock, | ||
| 1979 | const struct timespec *restrict abstime), | ||
| 1980 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1981 | _GL_CXXALIAS_RPL (pthread_rwlock_timedwrlock, int, | ||
| 1982 | (pthread_rwlock_t *restrict lock, | ||
| 1983 | const struct timespec *restrict abstime)); | ||
| 1984 | # else | ||
| 1985 | # if !1 | ||
| 1986 | _GL_FUNCDECL_SYS (pthread_rwlock_timedwrlock, int, | ||
| 1987 | (pthread_rwlock_t *restrict lock, | ||
| 1988 | const struct timespec *restrict abstime), | ||
| 1989 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1990 | # endif | ||
| 1991 | _GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int, | ||
| 1992 | (pthread_rwlock_t *restrict lock, | ||
| 1993 | const struct timespec *restrict abstime)); | ||
| 1994 | # endif | ||
| 1995 | # if __GLIBC__ >= 2 | ||
| 1996 | _GL_CXXALIASWARN (pthread_rwlock_timedwrlock); | ||
| 1997 | # endif | ||
| 1998 | #elif defined GNULIB_POSIXCHECK | ||
| 1999 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK | ||
| 2000 | _GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - " | ||
| 2001 | "use gnulib module pthread-rwlock for portability"); | ||
| 2002 | # endif | ||
| 2003 | #endif | ||
| 2004 | |||
| 2005 | #if 0 | ||
| 2006 | # if 0 | ||
| 2007 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2008 | # undef pthread_rwlock_unlock | ||
| 2009 | # define pthread_rwlock_unlock rpl_pthread_rwlock_unlock | ||
| 2010 | # endif | ||
| 2011 | _GL_FUNCDECL_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock), | ||
| 2012 | _GL_ARG_NONNULL ((1))); | ||
| 2013 | _GL_CXXALIAS_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)); | ||
| 2014 | # else | ||
| 2015 | # if !1 | ||
| 2016 | _GL_FUNCDECL_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock), | ||
| 2017 | _GL_ARG_NONNULL ((1))); | ||
| 2018 | # endif | ||
| 2019 | _GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)); | ||
| 2020 | # endif | ||
| 2021 | # if __GLIBC__ >= 2 | ||
| 2022 | _GL_CXXALIASWARN (pthread_rwlock_unlock); | ||
| 2023 | # endif | ||
| 2024 | #elif defined GNULIB_POSIXCHECK | ||
| 2025 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK | ||
| 2026 | _GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - " | ||
| 2027 | "use gnulib module pthread-rwlock for portability"); | ||
| 2028 | # endif | ||
| 2029 | #endif | ||
| 2030 | |||
| 2031 | #if 0 | ||
| 2032 | # if 0 | ||
| 2033 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2034 | # undef pthread_rwlock_destroy | ||
| 2035 | # define pthread_rwlock_destroy rpl_pthread_rwlock_destroy | ||
| 2036 | # endif | ||
| 2037 | _GL_FUNCDECL_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock), | ||
| 2038 | _GL_ARG_NONNULL ((1))); | ||
| 2039 | _GL_CXXALIAS_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)); | ||
| 2040 | # else | ||
| 2041 | # if !1 | ||
| 2042 | _GL_FUNCDECL_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock), | ||
| 2043 | _GL_ARG_NONNULL ((1))); | ||
| 2044 | # endif | ||
| 2045 | _GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)); | ||
| 2046 | # endif | ||
| 2047 | # if __GLIBC__ >= 2 | ||
| 2048 | _GL_CXXALIASWARN (pthread_rwlock_destroy); | ||
| 2049 | # endif | ||
| 2050 | #elif defined GNULIB_POSIXCHECK | ||
| 2051 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY | ||
| 2052 | _GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - " | ||
| 2053 | "use gnulib module pthread-rwlock for portability"); | ||
| 2054 | # endif | ||
| 2055 | #endif | ||
| 2056 | |||
| 2057 | /* =========== Condition variable functions =========== */ | ||
| 2058 | |||
| 2059 | #if 0 | ||
| 2060 | # if 0 | ||
| 2061 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2062 | # undef pthread_cond_init | ||
| 2063 | # define pthread_cond_init rpl_pthread_cond_init | ||
| 2064 | # endif | ||
| 2065 | _GL_FUNCDECL_RPL (pthread_cond_init, int, | ||
| 2066 | (pthread_cond_t *restrict cond, | ||
| 2067 | const pthread_condattr_t *restrict attr), | ||
| 2068 | _GL_ARG_NONNULL ((1))); | ||
| 2069 | _GL_CXXALIAS_RPL (pthread_cond_init, int, | ||
| 2070 | (pthread_cond_t *restrict cond, | ||
| 2071 | const pthread_condattr_t *restrict attr)); | ||
| 2072 | # else | ||
| 2073 | # if !1 | ||
| 2074 | _GL_FUNCDECL_SYS (pthread_cond_init, int, | ||
| 2075 | (pthread_cond_t *restrict cond, | ||
| 2076 | const pthread_condattr_t *restrict attr), | ||
| 2077 | _GL_ARG_NONNULL ((1))); | ||
| 2078 | # endif | ||
| 2079 | _GL_CXXALIAS_SYS (pthread_cond_init, int, | ||
| 2080 | (pthread_cond_t *restrict cond, | ||
| 2081 | const pthread_condattr_t *restrict attr)); | ||
| 2082 | # endif | ||
| 2083 | # if __GLIBC__ >= 2 | ||
| 2084 | _GL_CXXALIASWARN (pthread_cond_init); | ||
| 2085 | # endif | ||
| 2086 | #elif defined GNULIB_POSIXCHECK | ||
| 2087 | # if HAVE_RAW_DECL_PTHREAD_COND_INIT | ||
| 2088 | _GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - " | ||
| 2089 | "use gnulib module pthread-cond for portability"); | ||
| 2090 | # endif | ||
| 2091 | #endif | ||
| 2092 | |||
| 2093 | #if 0 | ||
| 2094 | # if 0 | ||
| 2095 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2096 | # undef pthread_condattr_init | ||
| 2097 | # define pthread_condattr_init rpl_pthread_condattr_init | ||
| 2098 | # endif | ||
| 2099 | _GL_FUNCDECL_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr), | ||
| 2100 | _GL_ARG_NONNULL ((1))); | ||
| 2101 | _GL_CXXALIAS_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr)); | ||
| 2102 | # else | ||
| 2103 | # if !1 | ||
| 2104 | _GL_FUNCDECL_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr), | ||
| 2105 | _GL_ARG_NONNULL ((1))); | ||
| 2106 | # endif | ||
| 2107 | _GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr)); | ||
| 2108 | # endif | ||
| 2109 | # if __GLIBC__ >= 2 | ||
| 2110 | _GL_CXXALIASWARN (pthread_condattr_init); | ||
| 2111 | # endif | ||
| 2112 | #elif defined GNULIB_POSIXCHECK | ||
| 2113 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT | ||
| 2114 | _GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - " | ||
| 2115 | "use gnulib module pthread-cond for portability"); | ||
| 2116 | # endif | ||
| 2117 | #endif | ||
| 2118 | |||
| 2119 | #if 0 | ||
| 2120 | # if 0 | ||
| 2121 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2122 | # undef pthread_condattr_destroy | ||
| 2123 | # define pthread_condattr_destroy rpl_pthread_condattr_destroy | ||
| 2124 | # endif | ||
| 2125 | _GL_FUNCDECL_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr), | ||
| 2126 | _GL_ARG_NONNULL ((1))); | ||
| 2127 | _GL_CXXALIAS_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr)); | ||
| 2128 | # else | ||
| 2129 | # if !1 | ||
| 2130 | _GL_FUNCDECL_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr), | ||
| 2131 | _GL_ARG_NONNULL ((1))); | ||
| 2132 | # endif | ||
| 2133 | _GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr)); | ||
| 2134 | # endif | ||
| 2135 | # if __GLIBC__ >= 2 | ||
| 2136 | _GL_CXXALIASWARN (pthread_condattr_destroy); | ||
| 2137 | # endif | ||
| 2138 | #elif defined GNULIB_POSIXCHECK | ||
| 2139 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY | ||
| 2140 | _GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - " | ||
| 2141 | "use gnulib module pthread-cond for portability"); | ||
| 2142 | # endif | ||
| 2143 | #endif | ||
| 2144 | |||
| 2145 | #if 0 | ||
| 2146 | # if 0 | ||
| 2147 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2148 | # undef pthread_cond_wait | ||
| 2149 | # define pthread_cond_wait rpl_pthread_cond_wait | ||
| 2150 | # endif | ||
| 2151 | _GL_FUNCDECL_RPL (pthread_cond_wait, int, | ||
| 2152 | (pthread_cond_t *restrict cond, | ||
| 2153 | pthread_mutex_t *restrict mutex), | ||
| 2154 | _GL_ARG_NONNULL ((1, 2))); | ||
| 2155 | _GL_CXXALIAS_RPL (pthread_cond_wait, int, | ||
| 2156 | (pthread_cond_t *restrict cond, | ||
| 2157 | pthread_mutex_t *restrict mutex)); | ||
| 2158 | # else | ||
| 2159 | # if !1 | ||
| 2160 | _GL_FUNCDECL_SYS (pthread_cond_wait, int, | ||
| 2161 | (pthread_cond_t *restrict cond, | ||
| 2162 | pthread_mutex_t *restrict mutex), | ||
| 2163 | _GL_ARG_NONNULL ((1, 2))); | ||
| 2164 | # endif | ||
| 2165 | _GL_CXXALIAS_SYS (pthread_cond_wait, int, | ||
| 2166 | (pthread_cond_t *restrict cond, | ||
| 2167 | pthread_mutex_t *restrict mutex)); | ||
| 2168 | # endif | ||
| 2169 | # if __GLIBC__ >= 2 | ||
| 2170 | _GL_CXXALIASWARN (pthread_cond_wait); | ||
| 2171 | # endif | ||
| 2172 | #elif defined GNULIB_POSIXCHECK | ||
| 2173 | # if HAVE_RAW_DECL_PTHREAD_COND_WAIT | ||
| 2174 | _GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - " | ||
| 2175 | "use gnulib module pthread-cond for portability"); | ||
| 2176 | # endif | ||
| 2177 | #endif | ||
| 2178 | |||
| 2179 | #if 0 | ||
| 2180 | # if 0 | ||
| 2181 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2182 | # undef pthread_cond_timedwait | ||
| 2183 | # define pthread_cond_timedwait rpl_pthread_cond_timedwait | ||
| 2184 | # endif | ||
| 2185 | _GL_FUNCDECL_RPL (pthread_cond_timedwait, int, | ||
| 2186 | (pthread_cond_t *restrict cond, | ||
| 2187 | pthread_mutex_t *restrict mutex, | ||
| 2188 | const struct timespec *restrict abstime), | ||
| 2189 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 2190 | _GL_CXXALIAS_RPL (pthread_cond_timedwait, int, | ||
| 2191 | (pthread_cond_t *restrict cond, | ||
| 2192 | pthread_mutex_t *restrict mutex, | ||
| 2193 | const struct timespec *restrict abstime)); | ||
| 2194 | # else | ||
| 2195 | # if !1 | ||
| 2196 | _GL_FUNCDECL_SYS (pthread_cond_timedwait, int, | ||
| 2197 | (pthread_cond_t *restrict cond, | ||
| 2198 | pthread_mutex_t *restrict mutex, | ||
| 2199 | const struct timespec *restrict abstime), | ||
| 2200 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 2201 | # endif | ||
| 2202 | _GL_CXXALIAS_SYS (pthread_cond_timedwait, int, | ||
| 2203 | (pthread_cond_t *restrict cond, | ||
| 2204 | pthread_mutex_t *restrict mutex, | ||
| 2205 | const struct timespec *restrict abstime)); | ||
| 2206 | # endif | ||
| 2207 | # if __GLIBC__ >= 2 | ||
| 2208 | _GL_CXXALIASWARN (pthread_cond_timedwait); | ||
| 2209 | # endif | ||
| 2210 | #elif defined GNULIB_POSIXCHECK | ||
| 2211 | # if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT | ||
| 2212 | _GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - " | ||
| 2213 | "use gnulib module pthread-cond for portability"); | ||
| 2214 | # endif | ||
| 2215 | #endif | ||
| 2216 | |||
| 2217 | #if 0 | ||
| 2218 | # if 0 | ||
| 2219 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2220 | # undef pthread_cond_signal | ||
| 2221 | # define pthread_cond_signal rpl_pthread_cond_signal | ||
| 2222 | # endif | ||
| 2223 | _GL_FUNCDECL_RPL (pthread_cond_signal, int, (pthread_cond_t *cond), | ||
| 2224 | _GL_ARG_NONNULL ((1))); | ||
| 2225 | _GL_CXXALIAS_RPL (pthread_cond_signal, int, (pthread_cond_t *cond)); | ||
| 2226 | # else | ||
| 2227 | # if !1 | ||
| 2228 | _GL_FUNCDECL_SYS (pthread_cond_signal, int, (pthread_cond_t *cond), | ||
| 2229 | _GL_ARG_NONNULL ((1))); | ||
| 2230 | # endif | ||
| 2231 | _GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond)); | ||
| 2232 | # endif | ||
| 2233 | # if __GLIBC__ >= 2 | ||
| 2234 | _GL_CXXALIASWARN (pthread_cond_signal); | ||
| 2235 | # endif | ||
| 2236 | #elif defined GNULIB_POSIXCHECK | ||
| 2237 | # if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL | ||
| 2238 | _GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - " | ||
| 2239 | "use gnulib module pthread-cond for portability"); | ||
| 2240 | # endif | ||
| 2241 | #endif | ||
| 2242 | |||
| 2243 | #if 0 | ||
| 2244 | # if 0 | ||
| 2245 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2246 | # undef pthread_cond_broadcast | ||
| 2247 | # define pthread_cond_broadcast rpl_pthread_cond_broadcast | ||
| 2248 | # endif | ||
| 2249 | _GL_FUNCDECL_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond), | ||
| 2250 | _GL_ARG_NONNULL ((1))); | ||
| 2251 | _GL_CXXALIAS_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond)); | ||
| 2252 | # else | ||
| 2253 | # if !1 | ||
| 2254 | _GL_FUNCDECL_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond), | ||
| 2255 | _GL_ARG_NONNULL ((1))); | ||
| 2256 | # endif | ||
| 2257 | _GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond)); | ||
| 2258 | # endif | ||
| 2259 | # if __GLIBC__ >= 2 | ||
| 2260 | _GL_CXXALIASWARN (pthread_cond_broadcast); | ||
| 2261 | # endif | ||
| 2262 | #elif defined GNULIB_POSIXCHECK | ||
| 2263 | # if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST | ||
| 2264 | _GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - " | ||
| 2265 | "use gnulib module pthread-cond for portability"); | ||
| 2266 | # endif | ||
| 2267 | #endif | ||
| 2268 | |||
| 2269 | #if 0 | ||
| 2270 | # if 0 | ||
| 2271 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2272 | # undef pthread_cond_destroy | ||
| 2273 | # define pthread_cond_destroy rpl_pthread_cond_destroy | ||
| 2274 | # endif | ||
| 2275 | _GL_FUNCDECL_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond), | ||
| 2276 | _GL_ARG_NONNULL ((1))); | ||
| 2277 | _GL_CXXALIAS_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond)); | ||
| 2278 | # else | ||
| 2279 | # if !1 | ||
| 2280 | _GL_FUNCDECL_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond), | ||
| 2281 | _GL_ARG_NONNULL ((1))); | ||
| 2282 | # endif | ||
| 2283 | _GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond)); | ||
| 2284 | # endif | ||
| 2285 | # if __GLIBC__ >= 2 | ||
| 2286 | _GL_CXXALIASWARN (pthread_cond_destroy); | ||
| 2287 | # endif | ||
| 2288 | #elif defined GNULIB_POSIXCHECK | ||
| 2289 | # if HAVE_RAW_DECL_PTHREAD_COND_DESTROY | ||
| 2290 | _GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - " | ||
| 2291 | "use gnulib module pthread-cond for portability"); | ||
| 2292 | # endif | ||
| 2293 | #endif | ||
| 2294 | |||
| 2295 | /* =========== Thread-specific storage functions =========== */ | ||
| 2296 | |||
| 2297 | #if 0 | ||
| 2298 | # if 0 | ||
| 2299 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2300 | # undef pthread_key_create | ||
| 2301 | # define pthread_key_create rpl_pthread_key_create | ||
| 2302 | # endif | ||
| 2303 | _GL_FUNCDECL_RPL (pthread_key_create, int, | ||
| 2304 | (pthread_key_t *keyp, void (*destructor) (void *)), | ||
| 2305 | _GL_ARG_NONNULL ((1))); | ||
| 2306 | _GL_CXXALIAS_RPL (pthread_key_create, int, | ||
| 2307 | (pthread_key_t *keyp, void (*destructor) (void *))); | ||
| 2308 | # else | ||
| 2309 | # if !1 | ||
| 2310 | _GL_FUNCDECL_SYS (pthread_key_create, int, | ||
| 2311 | (pthread_key_t *keyp, void (*destructor) (void *)), | ||
| 2312 | _GL_ARG_NONNULL ((1))); | ||
| 2313 | # endif | ||
| 2314 | _GL_CXXALIAS_SYS_CAST (pthread_key_create, int, | ||
| 2315 | (pthread_key_t *keyp, void (*destructor) (void *))); | ||
| 2316 | # endif | ||
| 2317 | # if __GLIBC__ >= 2 | ||
| 2318 | _GL_CXXALIASWARN (pthread_key_create); | ||
| 2319 | # endif | ||
| 2320 | #elif defined GNULIB_POSIXCHECK | ||
| 2321 | # if HAVE_RAW_DECL_PTHREAD_KEY_CREATE | ||
| 2322 | _GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - " | ||
| 2323 | "use gnulib module pthread-tss for portability"); | ||
| 2324 | # endif | ||
| 2325 | #endif | ||
| 2326 | |||
| 2327 | #if 0 | ||
| 2328 | # if 0 | ||
| 2329 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2330 | # undef pthread_setspecific | ||
| 2331 | # define pthread_setspecific rpl_pthread_setspecific | ||
| 2332 | # endif | ||
| 2333 | _GL_FUNCDECL_RPL (pthread_setspecific, int, | ||
| 2334 | (pthread_key_t key, const void *value), ); | ||
| 2335 | _GL_CXXALIAS_RPL (pthread_setspecific, int, | ||
| 2336 | (pthread_key_t key, const void *value)); | ||
| 2337 | # else | ||
| 2338 | # if !1 | ||
| 2339 | _GL_FUNCDECL_SYS (pthread_setspecific, int, | ||
| 2340 | (pthread_key_t key, const void *value), ); | ||
| 2341 | # endif | ||
| 2342 | _GL_CXXALIAS_SYS (pthread_setspecific, int, | ||
| 2343 | (pthread_key_t key, const void *value)); | ||
| 2344 | # endif | ||
| 2345 | # if __GLIBC__ >= 2 | ||
| 2346 | _GL_CXXALIASWARN (pthread_setspecific); | ||
| 2347 | # endif | ||
| 2348 | #elif defined GNULIB_POSIXCHECK | ||
| 2349 | # if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC | ||
| 2350 | _GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - " | ||
| 2351 | "use gnulib module pthread-tss for portability"); | ||
| 2352 | # endif | ||
| 2353 | #endif | ||
| 2354 | |||
| 2355 | #if 0 | ||
| 2356 | # if 0 | ||
| 2357 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2358 | # undef pthread_getspecific | ||
| 2359 | # define pthread_getspecific rpl_pthread_getspecific | ||
| 2360 | # endif | ||
| 2361 | _GL_FUNCDECL_RPL (pthread_getspecific, void *, (pthread_key_t key), ); | ||
| 2362 | _GL_CXXALIAS_RPL (pthread_getspecific, void *, (pthread_key_t key)); | ||
| 2363 | # else | ||
| 2364 | # if !1 | ||
| 2365 | _GL_FUNCDECL_SYS (pthread_getspecific, void *, (pthread_key_t key), ); | ||
| 2366 | # endif | ||
| 2367 | _GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key)); | ||
| 2368 | # endif | ||
| 2369 | # if __GLIBC__ >= 2 | ||
| 2370 | _GL_CXXALIASWARN (pthread_getspecific); | ||
| 2371 | # endif | ||
| 2372 | #elif defined GNULIB_POSIXCHECK | ||
| 2373 | # if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC | ||
| 2374 | _GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - " | ||
| 2375 | "use gnulib module pthread-tss for portability"); | ||
| 2376 | # endif | ||
| 2377 | #endif | ||
| 2378 | |||
| 2379 | #if 0 | ||
| 2380 | # if 0 | ||
| 2381 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2382 | # undef pthread_key_delete | ||
| 2383 | # define pthread_key_delete rpl_pthread_key_delete | ||
| 2384 | # endif | ||
| 2385 | _GL_FUNCDECL_RPL (pthread_key_delete, int, (pthread_key_t key), ); | ||
| 2386 | _GL_CXXALIAS_RPL (pthread_key_delete, int, (pthread_key_t key)); | ||
| 2387 | # else | ||
| 2388 | # if !1 | ||
| 2389 | _GL_FUNCDECL_SYS (pthread_key_delete, int, (pthread_key_t key), ); | ||
| 2390 | # endif | ||
| 2391 | _GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key)); | ||
| 2392 | # endif | ||
| 2393 | # if __GLIBC__ >= 2 | ||
| 2394 | _GL_CXXALIASWARN (pthread_key_delete); | ||
| 2395 | # endif | ||
| 2396 | #elif defined GNULIB_POSIXCHECK | ||
| 2397 | # if HAVE_RAW_DECL_PTHREAD_KEY_DELETE | ||
| 2398 | _GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - " | ||
| 2399 | "use gnulib module pthread-tss for portability"); | ||
| 2400 | # endif | ||
| 2401 | #endif | ||
| 2402 | |||
| 2403 | /* =========== Spinlock functions =========== */ | ||
| 2404 | |||
| 2405 | #if 0 | ||
| 2406 | # if 0 | ||
| 2407 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2408 | # undef pthread_spin_init | ||
| 2409 | # define pthread_spin_init rpl_pthread_spin_init | ||
| 2410 | # endif | ||
| 2411 | _GL_FUNCDECL_RPL (pthread_spin_init, int, | ||
| 2412 | (pthread_spinlock_t *lock, int shared_across_processes), | ||
| 2413 | _GL_ARG_NONNULL ((1))); | ||
| 2414 | _GL_CXXALIAS_RPL (pthread_spin_init, int, | ||
| 2415 | (pthread_spinlock_t *lock, int shared_across_processes)); | ||
| 2416 | # else | ||
| 2417 | # if !1 | ||
| 2418 | _GL_FUNCDECL_SYS (pthread_spin_init, int, | ||
| 2419 | (pthread_spinlock_t *lock, int shared_across_processes), | ||
| 2420 | _GL_ARG_NONNULL ((1))); | ||
| 2421 | # endif | ||
| 2422 | _GL_CXXALIAS_SYS (pthread_spin_init, int, | ||
| 2423 | (pthread_spinlock_t *lock, int shared_across_processes)); | ||
| 2424 | # endif | ||
| 2425 | # if __GLIBC__ >= 2 | ||
| 2426 | _GL_CXXALIASWARN (pthread_spin_init); | ||
| 2427 | # endif | ||
| 2428 | #elif defined GNULIB_POSIXCHECK | ||
| 2429 | # if HAVE_RAW_DECL_PTHREAD_SPIN_INIT | ||
| 2430 | _GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - " | ||
| 2431 | "use gnulib module pthread-spin for portability"); | ||
| 2432 | # endif | ||
| 2433 | #endif | ||
| 2434 | |||
| 2435 | #if 0 | ||
| 2436 | # if 0 | ||
| 2437 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2438 | # undef pthread_spin_lock | ||
| 2439 | # define pthread_spin_lock rpl_pthread_spin_lock | ||
| 2440 | # endif | ||
| 2441 | _GL_FUNCDECL_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock), | ||
| 2442 | _GL_ARG_NONNULL ((1))); | ||
| 2443 | _GL_CXXALIAS_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock)); | ||
| 2444 | # else | ||
| 2445 | # if !1 | ||
| 2446 | _GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock), | ||
| 2447 | _GL_ARG_NONNULL ((1))); | ||
| 2448 | # endif | ||
| 2449 | _GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)); | ||
| 2450 | # endif | ||
| 2451 | # if __GLIBC__ >= 2 | ||
| 2452 | _GL_CXXALIASWARN (pthread_spin_lock); | ||
| 2453 | # endif | ||
| 2454 | #elif defined GNULIB_POSIXCHECK | ||
| 2455 | # if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK | ||
| 2456 | _GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - " | ||
| 2457 | "use gnulib module pthread-spin for portability"); | ||
| 2458 | # endif | ||
| 2459 | #endif | ||
| 2460 | |||
| 2461 | #if 0 | ||
| 2462 | # if 0 | ||
| 2463 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2464 | # undef pthread_spin_trylock | ||
| 2465 | # define pthread_spin_trylock rpl_pthread_spin_trylock | ||
| 2466 | # endif | ||
| 2467 | _GL_FUNCDECL_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock), | ||
| 2468 | _GL_ARG_NONNULL ((1))); | ||
| 2469 | _GL_CXXALIAS_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock)); | ||
| 2470 | # else | ||
| 2471 | # if !1 | ||
| 2472 | _GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock), | ||
| 2473 | _GL_ARG_NONNULL ((1))); | ||
| 2474 | # endif | ||
| 2475 | _GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)); | ||
| 2476 | # endif | ||
| 2477 | # if __GLIBC__ >= 2 | ||
| 2478 | _GL_CXXALIASWARN (pthread_spin_trylock); | ||
| 2479 | # endif | ||
| 2480 | #elif defined GNULIB_POSIXCHECK | ||
| 2481 | # if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK | ||
| 2482 | _GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - " | ||
| 2483 | "use gnulib module pthread-spin for portability"); | ||
| 2484 | # endif | ||
| 2485 | #endif | ||
| 2486 | |||
| 2487 | #if 0 | ||
| 2488 | # if 0 | ||
| 2489 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2490 | # undef pthread_spin_unlock | ||
| 2491 | # define pthread_spin_unlock rpl_pthread_spin_unlock | ||
| 2492 | # endif | ||
| 2493 | _GL_FUNCDECL_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock), | ||
| 2494 | _GL_ARG_NONNULL ((1))); | ||
| 2495 | _GL_CXXALIAS_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock)); | ||
| 2496 | # else | ||
| 2497 | # if !1 | ||
| 2498 | _GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock), | ||
| 2499 | _GL_ARG_NONNULL ((1))); | ||
| 2500 | # endif | ||
| 2501 | _GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)); | ||
| 2502 | # endif | ||
| 2503 | # if __GLIBC__ >= 2 | ||
| 2504 | _GL_CXXALIASWARN (pthread_spin_unlock); | ||
| 2505 | # endif | ||
| 2506 | #elif defined GNULIB_POSIXCHECK | ||
| 2507 | # if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK | ||
| 2508 | _GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - " | ||
| 2509 | "use gnulib module pthread-spin for portability"); | ||
| 2510 | # endif | ||
| 2511 | #endif | ||
| 2512 | |||
| 2513 | #if 0 | ||
| 2514 | # if 0 | ||
| 2515 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 2516 | # undef pthread_spin_destroy | ||
| 2517 | # define pthread_spin_destroy rpl_pthread_spin_destroy | ||
| 2518 | # endif | ||
| 2519 | _GL_FUNCDECL_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock), | ||
| 2520 | _GL_ARG_NONNULL ((1))); | ||
| 2521 | _GL_CXXALIAS_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock)); | ||
| 2522 | # else | ||
| 2523 | # if !1 | ||
| 2524 | _GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock), | ||
| 2525 | _GL_ARG_NONNULL ((1))); | ||
| 2526 | # endif | ||
| 2527 | _GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)); | ||
| 2528 | # endif | ||
| 2529 | # if __GLIBC__ >= 2 | ||
| 2530 | _GL_CXXALIASWARN (pthread_spin_destroy); | ||
| 2531 | # endif | ||
| 2532 | #elif defined GNULIB_POSIXCHECK | ||
| 2533 | # if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY | ||
| 2534 | _GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - " | ||
| 2535 | "use gnulib module pthread-spin for portability"); | ||
| 2536 | # endif | ||
| 2537 | #endif | ||
| 2538 | |||
| 2539 | |||
| 2540 | #if defined __cplusplus && defined GNULIB_NAMESPACE && !1 && defined __MINGW32__ | ||
| 2541 | /* Provide the symbols required by mingw's <bits/gthr-default.h>. */ | ||
| 2542 | using GNULIB_NAMESPACE::pthread_create; | ||
| 2543 | using GNULIB_NAMESPACE::pthread_self; | ||
| 2544 | using GNULIB_NAMESPACE::pthread_equal; | ||
| 2545 | using GNULIB_NAMESPACE::pthread_detach; | ||
| 2546 | using GNULIB_NAMESPACE::pthread_join; | ||
| 2547 | using GNULIB_NAMESPACE::pthread_once; | ||
| 2548 | using GNULIB_NAMESPACE::pthread_mutex_init; | ||
| 2549 | using GNULIB_NAMESPACE::pthread_mutexattr_init; | ||
| 2550 | using GNULIB_NAMESPACE::pthread_mutexattr_settype; | ||
| 2551 | using GNULIB_NAMESPACE::pthread_mutexattr_destroy; | ||
| 2552 | using GNULIB_NAMESPACE::pthread_mutex_lock; | ||
| 2553 | using GNULIB_NAMESPACE::pthread_mutex_trylock; | ||
| 2554 | using GNULIB_NAMESPACE::pthread_mutex_timedlock; | ||
| 2555 | using GNULIB_NAMESPACE::pthread_mutex_unlock; | ||
| 2556 | using GNULIB_NAMESPACE::pthread_mutex_destroy; | ||
| 2557 | using GNULIB_NAMESPACE::pthread_cond_wait; | ||
| 2558 | using GNULIB_NAMESPACE::pthread_cond_timedwait; | ||
| 2559 | using GNULIB_NAMESPACE::pthread_cond_signal; | ||
| 2560 | using GNULIB_NAMESPACE::pthread_cond_broadcast; | ||
| 2561 | using GNULIB_NAMESPACE::pthread_cond_destroy; | ||
| 2562 | using GNULIB_NAMESPACE::pthread_key_create; | ||
| 2563 | using GNULIB_NAMESPACE::pthread_setspecific; | ||
| 2564 | using GNULIB_NAMESPACE::pthread_getspecific; | ||
| 2565 | using GNULIB_NAMESPACE::pthread_key_delete; | ||
| 2566 | #endif | ||
| 2567 | |||
| 2568 | |||
| 2569 | #endif /* _GL_PTHREAD_H_ */ | ||
| 2570 | #endif /* _GL_PTHREAD_H_ */ | ||
| 2571 | #endif | ||
diff --git a/gl/pthread.in.h b/gl/pthread.in.h index 28592cfc..37deab82 100644 --- a/gl/pthread.in.h +++ b/gl/pthread.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Implement the most essential subset of POSIX pthread.h. | 1 | /* Implement the most essential subset of POSIX pthread.h. |
| 2 | 2 | ||
| 3 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -522,7 +522,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_create, int, | |||
| 522 | _GL_CXXALIASWARN (pthread_create); | 522 | _GL_CXXALIASWARN (pthread_create); |
| 523 | # endif | 523 | # endif |
| 524 | #elif defined GNULIB_POSIXCHECK | 524 | #elif defined GNULIB_POSIXCHECK |
| 525 | # undef pthread_create | ||
| 526 | # if HAVE_RAW_DECL_PTHREAD_CREATE | 525 | # if HAVE_RAW_DECL_PTHREAD_CREATE |
| 527 | _GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - " | 526 | _GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - " |
| 528 | "use gnulib module pthread-thread for portability"); | 527 | "use gnulib module pthread-thread for portability"); |
| @@ -549,7 +548,6 @@ _GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr)); | |||
| 549 | _GL_CXXALIASWARN (pthread_attr_init); | 548 | _GL_CXXALIASWARN (pthread_attr_init); |
| 550 | # endif | 549 | # endif |
| 551 | #elif defined GNULIB_POSIXCHECK | 550 | #elif defined GNULIB_POSIXCHECK |
| 552 | # undef pthread_attr_init | ||
| 553 | # if HAVE_RAW_DECL_PTHREAD_ATTR_INIT | 551 | # if HAVE_RAW_DECL_PTHREAD_ATTR_INIT |
| 554 | _GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - " | 552 | _GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - " |
| 555 | "use gnulib module pthread-thread for portability"); | 553 | "use gnulib module pthread-thread for portability"); |
| @@ -580,7 +578,6 @@ _GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int, | |||
| 580 | _GL_CXXALIASWARN (pthread_attr_getdetachstate); | 578 | _GL_CXXALIASWARN (pthread_attr_getdetachstate); |
| 581 | # endif | 579 | # endif |
| 582 | #elif defined GNULIB_POSIXCHECK | 580 | #elif defined GNULIB_POSIXCHECK |
| 583 | # undef pthread_attr_getdetachstate | ||
| 584 | # if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE | 581 | # if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE |
| 585 | _GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - " | 582 | _GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - " |
| 586 | "use gnulib module pthread-thread for portability"); | 583 | "use gnulib module pthread-thread for portability"); |
| @@ -611,7 +608,6 @@ _GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int, | |||
| 611 | _GL_CXXALIASWARN (pthread_attr_setdetachstate); | 608 | _GL_CXXALIASWARN (pthread_attr_setdetachstate); |
| 612 | # endif | 609 | # endif |
| 613 | #elif defined GNULIB_POSIXCHECK | 610 | #elif defined GNULIB_POSIXCHECK |
| 614 | # undef pthread_attr_setdetachstate | ||
| 615 | # if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE | 611 | # if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE |
| 616 | _GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - " | 612 | _GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - " |
| 617 | "use gnulib module pthread-thread for portability"); | 613 | "use gnulib module pthread-thread for portability"); |
| @@ -638,7 +634,6 @@ _GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr)); | |||
| 638 | _GL_CXXALIASWARN (pthread_attr_destroy); | 634 | _GL_CXXALIASWARN (pthread_attr_destroy); |
| 639 | # endif | 635 | # endif |
| 640 | #elif defined GNULIB_POSIXCHECK | 636 | #elif defined GNULIB_POSIXCHECK |
| 641 | # undef pthread_attr_destroy | ||
| 642 | # if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY | 637 | # if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY |
| 643 | _GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - " | 638 | _GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - " |
| 644 | "use gnulib module pthread-thread for portability"); | 639 | "use gnulib module pthread-thread for portability"); |
| @@ -663,7 +658,6 @@ _GL_CXXALIAS_SYS (pthread_self, pthread_t, (void)); | |||
| 663 | _GL_CXXALIASWARN (pthread_self); | 658 | _GL_CXXALIASWARN (pthread_self); |
| 664 | # endif | 659 | # endif |
| 665 | #elif defined GNULIB_POSIXCHECK | 660 | #elif defined GNULIB_POSIXCHECK |
| 666 | # undef pthread_self | ||
| 667 | # if HAVE_RAW_DECL_PTHREAD_SELF | 661 | # if HAVE_RAW_DECL_PTHREAD_SELF |
| 668 | _GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - " | 662 | _GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - " |
| 669 | "use gnulib module pthread-thread for portability"); | 663 | "use gnulib module pthread-thread for portability"); |
| @@ -688,7 +682,6 @@ _GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); | |||
| 688 | _GL_CXXALIASWARN (pthread_equal); | 682 | _GL_CXXALIASWARN (pthread_equal); |
| 689 | # endif | 683 | # endif |
| 690 | #elif defined GNULIB_POSIXCHECK | 684 | #elif defined GNULIB_POSIXCHECK |
| 691 | # undef pthread_equal | ||
| 692 | # if HAVE_RAW_DECL_PTHREAD_EQUAL | 685 | # if HAVE_RAW_DECL_PTHREAD_EQUAL |
| 693 | _GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - " | 686 | _GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - " |
| 694 | "use gnulib module pthread-thread for portability"); | 687 | "use gnulib module pthread-thread for portability"); |
| @@ -713,7 +706,6 @@ _GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread)); | |||
| 713 | _GL_CXXALIASWARN (pthread_detach); | 706 | _GL_CXXALIASWARN (pthread_detach); |
| 714 | # endif | 707 | # endif |
| 715 | #elif defined GNULIB_POSIXCHECK | 708 | #elif defined GNULIB_POSIXCHECK |
| 716 | # undef pthread_detach | ||
| 717 | # if HAVE_RAW_DECL_PTHREAD_DETACH | 709 | # if HAVE_RAW_DECL_PTHREAD_DETACH |
| 718 | _GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - " | 710 | _GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - " |
| 719 | "use gnulib module pthread-thread for portability"); | 711 | "use gnulib module pthread-thread for portability"); |
| @@ -738,7 +730,6 @@ _GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep)); | |||
| 738 | _GL_CXXALIASWARN (pthread_join); | 730 | _GL_CXXALIASWARN (pthread_join); |
| 739 | # endif | 731 | # endif |
| 740 | #elif defined GNULIB_POSIXCHECK | 732 | #elif defined GNULIB_POSIXCHECK |
| 741 | # undef pthread_join | ||
| 742 | # if HAVE_RAW_DECL_PTHREAD_JOIN | 733 | # if HAVE_RAW_DECL_PTHREAD_JOIN |
| 743 | _GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - " | 734 | _GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - " |
| 744 | "use gnulib module pthread-thread for portability"); | 735 | "use gnulib module pthread-thread for portability"); |
| @@ -764,7 +755,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value)); | |||
| 764 | _GL_CXXALIASWARN (pthread_exit); | 755 | _GL_CXXALIASWARN (pthread_exit); |
| 765 | # endif | 756 | # endif |
| 766 | #elif defined GNULIB_POSIXCHECK | 757 | #elif defined GNULIB_POSIXCHECK |
| 767 | # undef pthread_exit | ||
| 768 | # if HAVE_RAW_DECL_PTHREAD_EXIT | 758 | # if HAVE_RAW_DECL_PTHREAD_EXIT |
| 769 | _GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - " | 759 | _GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - " |
| 770 | "use gnulib module pthread-thread for portability"); | 760 | "use gnulib module pthread-thread for portability"); |
| @@ -798,7 +788,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_once, int, | |||
| 798 | _GL_CXXALIASWARN (pthread_once); | 788 | _GL_CXXALIASWARN (pthread_once); |
| 799 | # endif | 789 | # endif |
| 800 | #elif defined GNULIB_POSIXCHECK | 790 | #elif defined GNULIB_POSIXCHECK |
| 801 | # undef pthread_once | ||
| 802 | # if HAVE_RAW_DECL_PTHREAD_ONCE | 791 | # if HAVE_RAW_DECL_PTHREAD_ONCE |
| 803 | _GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - " | 792 | _GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - " |
| 804 | "use gnulib module pthread-once for portability"); | 793 | "use gnulib module pthread-once for portability"); |
| @@ -835,7 +824,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_init, int, | |||
| 835 | _GL_CXXALIASWARN (pthread_mutex_init); | 824 | _GL_CXXALIASWARN (pthread_mutex_init); |
| 836 | # endif | 825 | # endif |
| 837 | #elif defined GNULIB_POSIXCHECK | 826 | #elif defined GNULIB_POSIXCHECK |
| 838 | # undef pthread_mutex_init | ||
| 839 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT | 827 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT |
| 840 | _GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - " | 828 | _GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - " |
| 841 | "use gnulib module pthread-mutex for portability"); | 829 | "use gnulib module pthread-mutex for portability"); |
| @@ -862,7 +850,6 @@ _GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)); | |||
| 862 | _GL_CXXALIASWARN (pthread_mutexattr_init); | 850 | _GL_CXXALIASWARN (pthread_mutexattr_init); |
| 863 | # endif | 851 | # endif |
| 864 | #elif defined GNULIB_POSIXCHECK | 852 | #elif defined GNULIB_POSIXCHECK |
| 865 | # undef pthread_mutexattr_init | ||
| 866 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT | 853 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT |
| 867 | _GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - " | 854 | _GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - " |
| 868 | "use gnulib module pthread-mutex for portability"); | 855 | "use gnulib module pthread-mutex for portability"); |
| @@ -899,7 +886,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int, | |||
| 899 | _GL_CXXALIASWARN (pthread_mutexattr_gettype); | 886 | _GL_CXXALIASWARN (pthread_mutexattr_gettype); |
| 900 | # endif | 887 | # endif |
| 901 | #elif defined GNULIB_POSIXCHECK | 888 | #elif defined GNULIB_POSIXCHECK |
| 902 | # undef pthread_mutexattr_gettype | ||
| 903 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE | 889 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE |
| 904 | _GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - " | 890 | _GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - " |
| 905 | "use gnulib module pthread-mutex for portability"); | 891 | "use gnulib module pthread-mutex for portability"); |
| @@ -928,7 +914,6 @@ _GL_CXXALIAS_SYS (pthread_mutexattr_settype, int, | |||
| 928 | _GL_CXXALIASWARN (pthread_mutexattr_settype); | 914 | _GL_CXXALIASWARN (pthread_mutexattr_settype); |
| 929 | # endif | 915 | # endif |
| 930 | #elif defined GNULIB_POSIXCHECK | 916 | #elif defined GNULIB_POSIXCHECK |
| 931 | # undef pthread_mutexattr_settype | ||
| 932 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE | 917 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE |
| 933 | _GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - " | 918 | _GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - " |
| 934 | "use gnulib module pthread-mutex for portability"); | 919 | "use gnulib module pthread-mutex for portability"); |
| @@ -965,7 +950,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int, | |||
| 965 | _GL_CXXALIASWARN (pthread_mutexattr_getrobust); | 950 | _GL_CXXALIASWARN (pthread_mutexattr_getrobust); |
| 966 | # endif | 951 | # endif |
| 967 | #elif defined GNULIB_POSIXCHECK | 952 | #elif defined GNULIB_POSIXCHECK |
| 968 | # undef pthread_mutexattr_getrobust | ||
| 969 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST | 953 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST |
| 970 | _GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - " | 954 | _GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - " |
| 971 | "use gnulib module pthread-mutex for portability"); | 955 | "use gnulib module pthread-mutex for portability"); |
| @@ -996,7 +980,6 @@ _GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int, | |||
| 996 | _GL_CXXALIASWARN (pthread_mutexattr_setrobust); | 980 | _GL_CXXALIASWARN (pthread_mutexattr_setrobust); |
| 997 | # endif | 981 | # endif |
| 998 | #elif defined GNULIB_POSIXCHECK | 982 | #elif defined GNULIB_POSIXCHECK |
| 999 | # undef pthread_mutexattr_setrobust | ||
| 1000 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST | 983 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST |
| 1001 | _GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - " | 984 | _GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - " |
| 1002 | "use gnulib module pthread-mutex for portability"); | 985 | "use gnulib module pthread-mutex for portability"); |
| @@ -1023,7 +1006,6 @@ _GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)); | |||
| 1023 | _GL_CXXALIASWARN (pthread_mutexattr_destroy); | 1006 | _GL_CXXALIASWARN (pthread_mutexattr_destroy); |
| 1024 | # endif | 1007 | # endif |
| 1025 | #elif defined GNULIB_POSIXCHECK | 1008 | #elif defined GNULIB_POSIXCHECK |
| 1026 | # undef pthread_mutexattr_destroy | ||
| 1027 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY | 1009 | # if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY |
| 1028 | _GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - " | 1010 | _GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - " |
| 1029 | "use gnulib module pthread-mutex for portability"); | 1011 | "use gnulib module pthread-mutex for portability"); |
| @@ -1050,7 +1032,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)); | |||
| 1050 | _GL_CXXALIASWARN (pthread_mutex_lock); | 1032 | _GL_CXXALIASWARN (pthread_mutex_lock); |
| 1051 | # endif | 1033 | # endif |
| 1052 | #elif defined GNULIB_POSIXCHECK | 1034 | #elif defined GNULIB_POSIXCHECK |
| 1053 | # undef pthread_mutex_lock | ||
| 1054 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK | 1035 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK |
| 1055 | _GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - " | 1036 | _GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - " |
| 1056 | "use gnulib module pthread-mutex for portability"); | 1037 | "use gnulib module pthread-mutex for portability"); |
| @@ -1077,7 +1058,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)); | |||
| 1077 | _GL_CXXALIASWARN (pthread_mutex_trylock); | 1058 | _GL_CXXALIASWARN (pthread_mutex_trylock); |
| 1078 | # endif | 1059 | # endif |
| 1079 | #elif defined GNULIB_POSIXCHECK | 1060 | #elif defined GNULIB_POSIXCHECK |
| 1080 | # undef pthread_mutex_trylock | ||
| 1081 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK | 1061 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK |
| 1082 | _GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - " | 1062 | _GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - " |
| 1083 | "use gnulib module pthread-mutex for portability"); | 1063 | "use gnulib module pthread-mutex for portability"); |
| @@ -1112,7 +1092,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_timedlock, int, | |||
| 1112 | _GL_CXXALIASWARN (pthread_mutex_timedlock); | 1092 | _GL_CXXALIASWARN (pthread_mutex_timedlock); |
| 1113 | # endif | 1093 | # endif |
| 1114 | #elif defined GNULIB_POSIXCHECK | 1094 | #elif defined GNULIB_POSIXCHECK |
| 1115 | # undef pthread_mutex_timedlock | ||
| 1116 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK | 1095 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK |
| 1117 | _GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - " | 1096 | _GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - " |
| 1118 | "use gnulib module pthread_mutex_timedlock for portability"); | 1097 | "use gnulib module pthread_mutex_timedlock for portability"); |
| @@ -1139,7 +1118,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)); | |||
| 1139 | _GL_CXXALIASWARN (pthread_mutex_unlock); | 1118 | _GL_CXXALIASWARN (pthread_mutex_unlock); |
| 1140 | # endif | 1119 | # endif |
| 1141 | #elif defined GNULIB_POSIXCHECK | 1120 | #elif defined GNULIB_POSIXCHECK |
| 1142 | # undef pthread_mutex_unlock | ||
| 1143 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK | 1121 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK |
| 1144 | _GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - " | 1122 | _GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - " |
| 1145 | "use gnulib module pthread-mutex for portability"); | 1123 | "use gnulib module pthread-mutex for portability"); |
| @@ -1166,7 +1144,6 @@ _GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)); | |||
| 1166 | _GL_CXXALIASWARN (pthread_mutex_destroy); | 1144 | _GL_CXXALIASWARN (pthread_mutex_destroy); |
| 1167 | # endif | 1145 | # endif |
| 1168 | #elif defined GNULIB_POSIXCHECK | 1146 | #elif defined GNULIB_POSIXCHECK |
| 1169 | # undef pthread_mutex_destroy | ||
| 1170 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY | 1147 | # if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY |
| 1171 | _GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - " | 1148 | _GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - " |
| 1172 | "use gnulib module pthread-mutex for portability"); | 1149 | "use gnulib module pthread-mutex for portability"); |
| @@ -1203,7 +1180,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_init, int, | |||
| 1203 | _GL_CXXALIASWARN (pthread_rwlock_init); | 1180 | _GL_CXXALIASWARN (pthread_rwlock_init); |
| 1204 | # endif | 1181 | # endif |
| 1205 | #elif defined GNULIB_POSIXCHECK | 1182 | #elif defined GNULIB_POSIXCHECK |
| 1206 | # undef pthread_rwlock_init | ||
| 1207 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT | 1183 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT |
| 1208 | _GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - " | 1184 | _GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - " |
| 1209 | "use gnulib module pthread-rwlock for portability"); | 1185 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1230,7 +1206,6 @@ _GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)); | |||
| 1230 | _GL_CXXALIASWARN (pthread_rwlockattr_init); | 1206 | _GL_CXXALIASWARN (pthread_rwlockattr_init); |
| 1231 | # endif | 1207 | # endif |
| 1232 | #elif defined GNULIB_POSIXCHECK | 1208 | #elif defined GNULIB_POSIXCHECK |
| 1233 | # undef pthread_rwlockattr_init | ||
| 1234 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT | 1209 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT |
| 1235 | _GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - " | 1210 | _GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - " |
| 1236 | "use gnulib module pthread-rwlock for portability"); | 1211 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1259,7 +1234,6 @@ _GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int, | |||
| 1259 | _GL_CXXALIASWARN (pthread_rwlockattr_destroy); | 1234 | _GL_CXXALIASWARN (pthread_rwlockattr_destroy); |
| 1260 | # endif | 1235 | # endif |
| 1261 | #elif defined GNULIB_POSIXCHECK | 1236 | #elif defined GNULIB_POSIXCHECK |
| 1262 | # undef pthread_rwlockattr_destroy | ||
| 1263 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY | 1237 | # if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY |
| 1264 | _GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - " | 1238 | _GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - " |
| 1265 | "use gnulib module pthread-rwlock for portability"); | 1239 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1286,7 +1260,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)); | |||
| 1286 | _GL_CXXALIASWARN (pthread_rwlock_rdlock); | 1260 | _GL_CXXALIASWARN (pthread_rwlock_rdlock); |
| 1287 | # endif | 1261 | # endif |
| 1288 | #elif defined GNULIB_POSIXCHECK | 1262 | #elif defined GNULIB_POSIXCHECK |
| 1289 | # undef pthread_rwlock_rdlock | ||
| 1290 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK | 1263 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK |
| 1291 | _GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - " | 1264 | _GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - " |
| 1292 | "use gnulib module pthread-rwlock for portability"); | 1265 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1313,7 +1286,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)); | |||
| 1313 | _GL_CXXALIASWARN (pthread_rwlock_wrlock); | 1286 | _GL_CXXALIASWARN (pthread_rwlock_wrlock); |
| 1314 | # endif | 1287 | # endif |
| 1315 | #elif defined GNULIB_POSIXCHECK | 1288 | #elif defined GNULIB_POSIXCHECK |
| 1316 | # undef pthread_rwlock_wrlock | ||
| 1317 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK | 1289 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK |
| 1318 | _GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - " | 1290 | _GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - " |
| 1319 | "use gnulib module pthread-rwlock for portability"); | 1291 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1340,7 +1312,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)); | |||
| 1340 | _GL_CXXALIASWARN (pthread_rwlock_tryrdlock); | 1312 | _GL_CXXALIASWARN (pthread_rwlock_tryrdlock); |
| 1341 | # endif | 1313 | # endif |
| 1342 | #elif defined GNULIB_POSIXCHECK | 1314 | #elif defined GNULIB_POSIXCHECK |
| 1343 | # undef pthread_rwlock_tryrdlock | ||
| 1344 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK | 1315 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK |
| 1345 | _GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - " | 1316 | _GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - " |
| 1346 | "use gnulib module pthread-rwlock for portability"); | 1317 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1367,7 +1338,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)); | |||
| 1367 | _GL_CXXALIASWARN (pthread_rwlock_trywrlock); | 1338 | _GL_CXXALIASWARN (pthread_rwlock_trywrlock); |
| 1368 | # endif | 1339 | # endif |
| 1369 | #elif defined GNULIB_POSIXCHECK | 1340 | #elif defined GNULIB_POSIXCHECK |
| 1370 | # undef pthread_rwlock_trywrlock | ||
| 1371 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK | 1341 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK |
| 1372 | _GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - " | 1342 | _GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - " |
| 1373 | "use gnulib module pthread-rwlock for portability"); | 1343 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1402,7 +1372,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int, | |||
| 1402 | _GL_CXXALIASWARN (pthread_rwlock_timedrdlock); | 1372 | _GL_CXXALIASWARN (pthread_rwlock_timedrdlock); |
| 1403 | # endif | 1373 | # endif |
| 1404 | #elif defined GNULIB_POSIXCHECK | 1374 | #elif defined GNULIB_POSIXCHECK |
| 1405 | # undef pthread_rwlock_timedrdlock | ||
| 1406 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK | 1375 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK |
| 1407 | _GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - " | 1376 | _GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - " |
| 1408 | "use gnulib module pthread-rwlock for portability"); | 1377 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1437,7 +1406,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int, | |||
| 1437 | _GL_CXXALIASWARN (pthread_rwlock_timedwrlock); | 1406 | _GL_CXXALIASWARN (pthread_rwlock_timedwrlock); |
| 1438 | # endif | 1407 | # endif |
| 1439 | #elif defined GNULIB_POSIXCHECK | 1408 | #elif defined GNULIB_POSIXCHECK |
| 1440 | # undef pthread_rwlock_timedwrlock | ||
| 1441 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK | 1409 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK |
| 1442 | _GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - " | 1410 | _GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - " |
| 1443 | "use gnulib module pthread-rwlock for portability"); | 1411 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1464,7 +1432,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)); | |||
| 1464 | _GL_CXXALIASWARN (pthread_rwlock_unlock); | 1432 | _GL_CXXALIASWARN (pthread_rwlock_unlock); |
| 1465 | # endif | 1433 | # endif |
| 1466 | #elif defined GNULIB_POSIXCHECK | 1434 | #elif defined GNULIB_POSIXCHECK |
| 1467 | # undef pthread_rwlock_unlock | ||
| 1468 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK | 1435 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK |
| 1469 | _GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - " | 1436 | _GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - " |
| 1470 | "use gnulib module pthread-rwlock for portability"); | 1437 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1491,7 +1458,6 @@ _GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)); | |||
| 1491 | _GL_CXXALIASWARN (pthread_rwlock_destroy); | 1458 | _GL_CXXALIASWARN (pthread_rwlock_destroy); |
| 1492 | # endif | 1459 | # endif |
| 1493 | #elif defined GNULIB_POSIXCHECK | 1460 | #elif defined GNULIB_POSIXCHECK |
| 1494 | # undef pthread_rwlock_destroy | ||
| 1495 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY | 1461 | # if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY |
| 1496 | _GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - " | 1462 | _GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - " |
| 1497 | "use gnulib module pthread-rwlock for portability"); | 1463 | "use gnulib module pthread-rwlock for portability"); |
| @@ -1528,7 +1494,6 @@ _GL_CXXALIAS_SYS (pthread_cond_init, int, | |||
| 1528 | _GL_CXXALIASWARN (pthread_cond_init); | 1494 | _GL_CXXALIASWARN (pthread_cond_init); |
| 1529 | # endif | 1495 | # endif |
| 1530 | #elif defined GNULIB_POSIXCHECK | 1496 | #elif defined GNULIB_POSIXCHECK |
| 1531 | # undef pthread_cond_init | ||
| 1532 | # if HAVE_RAW_DECL_PTHREAD_COND_INIT | 1497 | # if HAVE_RAW_DECL_PTHREAD_COND_INIT |
| 1533 | _GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - " | 1498 | _GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - " |
| 1534 | "use gnulib module pthread-cond for portability"); | 1499 | "use gnulib module pthread-cond for portability"); |
| @@ -1555,7 +1520,6 @@ _GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr)); | |||
| 1555 | _GL_CXXALIASWARN (pthread_condattr_init); | 1520 | _GL_CXXALIASWARN (pthread_condattr_init); |
| 1556 | # endif | 1521 | # endif |
| 1557 | #elif defined GNULIB_POSIXCHECK | 1522 | #elif defined GNULIB_POSIXCHECK |
| 1558 | # undef pthread_condattr_init | ||
| 1559 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT | 1523 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT |
| 1560 | _GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - " | 1524 | _GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - " |
| 1561 | "use gnulib module pthread-cond for portability"); | 1525 | "use gnulib module pthread-cond for portability"); |
| @@ -1582,7 +1546,6 @@ _GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr)); | |||
| 1582 | _GL_CXXALIASWARN (pthread_condattr_destroy); | 1546 | _GL_CXXALIASWARN (pthread_condattr_destroy); |
| 1583 | # endif | 1547 | # endif |
| 1584 | #elif defined GNULIB_POSIXCHECK | 1548 | #elif defined GNULIB_POSIXCHECK |
| 1585 | # undef pthread_condattr_destroy | ||
| 1586 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY | 1549 | # if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY |
| 1587 | _GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - " | 1550 | _GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - " |
| 1588 | "use gnulib module pthread-cond for portability"); | 1551 | "use gnulib module pthread-cond for portability"); |
| @@ -1617,7 +1580,6 @@ _GL_CXXALIAS_SYS (pthread_cond_wait, int, | |||
| 1617 | _GL_CXXALIASWARN (pthread_cond_wait); | 1580 | _GL_CXXALIASWARN (pthread_cond_wait); |
| 1618 | # endif | 1581 | # endif |
| 1619 | #elif defined GNULIB_POSIXCHECK | 1582 | #elif defined GNULIB_POSIXCHECK |
| 1620 | # undef pthread_cond_wait | ||
| 1621 | # if HAVE_RAW_DECL_PTHREAD_COND_WAIT | 1583 | # if HAVE_RAW_DECL_PTHREAD_COND_WAIT |
| 1622 | _GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - " | 1584 | _GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - " |
| 1623 | "use gnulib module pthread-cond for portability"); | 1585 | "use gnulib module pthread-cond for portability"); |
| @@ -1656,7 +1618,6 @@ _GL_CXXALIAS_SYS (pthread_cond_timedwait, int, | |||
| 1656 | _GL_CXXALIASWARN (pthread_cond_timedwait); | 1618 | _GL_CXXALIASWARN (pthread_cond_timedwait); |
| 1657 | # endif | 1619 | # endif |
| 1658 | #elif defined GNULIB_POSIXCHECK | 1620 | #elif defined GNULIB_POSIXCHECK |
| 1659 | # undef pthread_cond_timedwait | ||
| 1660 | # if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT | 1621 | # if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT |
| 1661 | _GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - " | 1622 | _GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - " |
| 1662 | "use gnulib module pthread-cond for portability"); | 1623 | "use gnulib module pthread-cond for portability"); |
| @@ -1683,7 +1644,6 @@ _GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond)); | |||
| 1683 | _GL_CXXALIASWARN (pthread_cond_signal); | 1644 | _GL_CXXALIASWARN (pthread_cond_signal); |
| 1684 | # endif | 1645 | # endif |
| 1685 | #elif defined GNULIB_POSIXCHECK | 1646 | #elif defined GNULIB_POSIXCHECK |
| 1686 | # undef pthread_cond_signal | ||
| 1687 | # if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL | 1647 | # if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL |
| 1688 | _GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - " | 1648 | _GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - " |
| 1689 | "use gnulib module pthread-cond for portability"); | 1649 | "use gnulib module pthread-cond for portability"); |
| @@ -1710,7 +1670,6 @@ _GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond)); | |||
| 1710 | _GL_CXXALIASWARN (pthread_cond_broadcast); | 1670 | _GL_CXXALIASWARN (pthread_cond_broadcast); |
| 1711 | # endif | 1671 | # endif |
| 1712 | #elif defined GNULIB_POSIXCHECK | 1672 | #elif defined GNULIB_POSIXCHECK |
| 1713 | # undef pthread_cond_broadcast | ||
| 1714 | # if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST | 1673 | # if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST |
| 1715 | _GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - " | 1674 | _GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - " |
| 1716 | "use gnulib module pthread-cond for portability"); | 1675 | "use gnulib module pthread-cond for portability"); |
| @@ -1737,7 +1696,6 @@ _GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond)); | |||
| 1737 | _GL_CXXALIASWARN (pthread_cond_destroy); | 1696 | _GL_CXXALIASWARN (pthread_cond_destroy); |
| 1738 | # endif | 1697 | # endif |
| 1739 | #elif defined GNULIB_POSIXCHECK | 1698 | #elif defined GNULIB_POSIXCHECK |
| 1740 | # undef pthread_cond_destroy | ||
| 1741 | # if HAVE_RAW_DECL_PTHREAD_COND_DESTROY | 1699 | # if HAVE_RAW_DECL_PTHREAD_COND_DESTROY |
| 1742 | _GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - " | 1700 | _GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - " |
| 1743 | "use gnulib module pthread-cond for portability"); | 1701 | "use gnulib module pthread-cond for portability"); |
| @@ -1770,7 +1728,6 @@ _GL_CXXALIAS_SYS_CAST (pthread_key_create, int, | |||
| 1770 | _GL_CXXALIASWARN (pthread_key_create); | 1728 | _GL_CXXALIASWARN (pthread_key_create); |
| 1771 | # endif | 1729 | # endif |
| 1772 | #elif defined GNULIB_POSIXCHECK | 1730 | #elif defined GNULIB_POSIXCHECK |
| 1773 | # undef pthread_key_create | ||
| 1774 | # if HAVE_RAW_DECL_PTHREAD_KEY_CREATE | 1731 | # if HAVE_RAW_DECL_PTHREAD_KEY_CREATE |
| 1775 | _GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - " | 1732 | _GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - " |
| 1776 | "use gnulib module pthread-tss for portability"); | 1733 | "use gnulib module pthread-tss for portability"); |
| @@ -1799,7 +1756,6 @@ _GL_CXXALIAS_SYS (pthread_setspecific, int, | |||
| 1799 | _GL_CXXALIASWARN (pthread_setspecific); | 1756 | _GL_CXXALIASWARN (pthread_setspecific); |
| 1800 | # endif | 1757 | # endif |
| 1801 | #elif defined GNULIB_POSIXCHECK | 1758 | #elif defined GNULIB_POSIXCHECK |
| 1802 | # undef pthread_setspecific | ||
| 1803 | # if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC | 1759 | # if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC |
| 1804 | _GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - " | 1760 | _GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - " |
| 1805 | "use gnulib module pthread-tss for portability"); | 1761 | "use gnulib module pthread-tss for portability"); |
| @@ -1824,7 +1780,6 @@ _GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key)); | |||
| 1824 | _GL_CXXALIASWARN (pthread_getspecific); | 1780 | _GL_CXXALIASWARN (pthread_getspecific); |
| 1825 | # endif | 1781 | # endif |
| 1826 | #elif defined GNULIB_POSIXCHECK | 1782 | #elif defined GNULIB_POSIXCHECK |
| 1827 | # undef pthread_getspecific | ||
| 1828 | # if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC | 1783 | # if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC |
| 1829 | _GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - " | 1784 | _GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - " |
| 1830 | "use gnulib module pthread-tss for portability"); | 1785 | "use gnulib module pthread-tss for portability"); |
| @@ -1849,7 +1804,6 @@ _GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key)); | |||
| 1849 | _GL_CXXALIASWARN (pthread_key_delete); | 1804 | _GL_CXXALIASWARN (pthread_key_delete); |
| 1850 | # endif | 1805 | # endif |
| 1851 | #elif defined GNULIB_POSIXCHECK | 1806 | #elif defined GNULIB_POSIXCHECK |
| 1852 | # undef pthread_key_delete | ||
| 1853 | # if HAVE_RAW_DECL_PTHREAD_KEY_DELETE | 1807 | # if HAVE_RAW_DECL_PTHREAD_KEY_DELETE |
| 1854 | _GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - " | 1808 | _GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - " |
| 1855 | "use gnulib module pthread-tss for portability"); | 1809 | "use gnulib module pthread-tss for portability"); |
| @@ -1882,7 +1836,6 @@ _GL_CXXALIAS_SYS (pthread_spin_init, int, | |||
| 1882 | _GL_CXXALIASWARN (pthread_spin_init); | 1836 | _GL_CXXALIASWARN (pthread_spin_init); |
| 1883 | # endif | 1837 | # endif |
| 1884 | #elif defined GNULIB_POSIXCHECK | 1838 | #elif defined GNULIB_POSIXCHECK |
| 1885 | # undef pthread_spin_init | ||
| 1886 | # if HAVE_RAW_DECL_PTHREAD_SPIN_INIT | 1839 | # if HAVE_RAW_DECL_PTHREAD_SPIN_INIT |
| 1887 | _GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - " | 1840 | _GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - " |
| 1888 | "use gnulib module pthread-spin for portability"); | 1841 | "use gnulib module pthread-spin for portability"); |
| @@ -1909,7 +1862,6 @@ _GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)); | |||
| 1909 | _GL_CXXALIASWARN (pthread_spin_lock); | 1862 | _GL_CXXALIASWARN (pthread_spin_lock); |
| 1910 | # endif | 1863 | # endif |
| 1911 | #elif defined GNULIB_POSIXCHECK | 1864 | #elif defined GNULIB_POSIXCHECK |
| 1912 | # undef pthread_spin_lock | ||
| 1913 | # if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK | 1865 | # if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK |
| 1914 | _GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - " | 1866 | _GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - " |
| 1915 | "use gnulib module pthread-spin for portability"); | 1867 | "use gnulib module pthread-spin for portability"); |
| @@ -1936,7 +1888,6 @@ _GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)); | |||
| 1936 | _GL_CXXALIASWARN (pthread_spin_trylock); | 1888 | _GL_CXXALIASWARN (pthread_spin_trylock); |
| 1937 | # endif | 1889 | # endif |
| 1938 | #elif defined GNULIB_POSIXCHECK | 1890 | #elif defined GNULIB_POSIXCHECK |
| 1939 | # undef pthread_spin_trylock | ||
| 1940 | # if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK | 1891 | # if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK |
| 1941 | _GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - " | 1892 | _GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - " |
| 1942 | "use gnulib module pthread-spin for portability"); | 1893 | "use gnulib module pthread-spin for portability"); |
| @@ -1963,7 +1914,6 @@ _GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)); | |||
| 1963 | _GL_CXXALIASWARN (pthread_spin_unlock); | 1914 | _GL_CXXALIASWARN (pthread_spin_unlock); |
| 1964 | # endif | 1915 | # endif |
| 1965 | #elif defined GNULIB_POSIXCHECK | 1916 | #elif defined GNULIB_POSIXCHECK |
| 1966 | # undef pthread_spin_unlock | ||
| 1967 | # if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK | 1917 | # if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK |
| 1968 | _GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - " | 1918 | _GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - " |
| 1969 | "use gnulib module pthread-spin for portability"); | 1919 | "use gnulib module pthread-spin for portability"); |
| @@ -1990,7 +1940,6 @@ _GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)); | |||
| 1990 | _GL_CXXALIASWARN (pthread_spin_destroy); | 1940 | _GL_CXXALIASWARN (pthread_spin_destroy); |
| 1991 | # endif | 1941 | # endif |
| 1992 | #elif defined GNULIB_POSIXCHECK | 1942 | #elif defined GNULIB_POSIXCHECK |
| 1993 | # undef pthread_spin_destroy | ||
| 1994 | # if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY | 1943 | # if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY |
| 1995 | _GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - " | 1944 | _GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - " |
| 1996 | "use gnulib module pthread-spin for portability"); | 1945 | "use gnulib module pthread-spin for portability"); |
diff --git a/gl/realloc.c b/gl/realloc.c index 04a28561..9b35c235 100644 --- a/gl/realloc.c +++ b/gl/realloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* realloc() function that is glibc compatible. | 1 | /* realloc() function that is glibc compatible. |
| 2 | 2 | ||
| 3 | Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2025 Free Software | 3 | Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -20,9 +20,9 @@ | |||
| 20 | 20 | ||
| 21 | /* Ensure that we call the system's realloc() below. */ | 21 | /* Ensure that we call the system's realloc() below. */ |
| 22 | #define _GL_USE_STDLIB_ALLOC 1 | 22 | #define _GL_USE_STDLIB_ALLOC 1 |
| 23 | #include <config.h> | ||
| 24 | 23 | ||
| 25 | #define _GL_REALLOC_INLINE _GL_EXTERN_INLINE | 24 | #define _GL_REALLOC_INLINE _GL_EXTERN_INLINE |
| 25 | #include <config.h> | ||
| 26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
| 27 | 27 | ||
| 28 | #include <errno.h> | 28 | #include <errno.h> |
| @@ -50,7 +50,7 @@ rpl_realloc (void *p, size_t n) | |||
| 50 | undefined behavior even though C17 and earlier partially defined | 50 | undefined behavior even though C17 and earlier partially defined |
| 51 | the behavior. Let the programmer know. | 51 | the behavior. Let the programmer know. |
| 52 | When the undefined-behaviour sanitizers report this case, i.e. when | 52 | When the undefined-behaviour sanitizers report this case, i.e. when |
| 53 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117233> and | 53 | <https://gcc.gnu.org/PR117233> and |
| 54 | <https://github.com/llvm/llvm-project/issues/113065> | 54 | <https://github.com/llvm/llvm-project/issues/113065> |
| 55 | have been closed and new releases of GCC and clang have been made, | 55 | have been closed and new releases of GCC and clang have been made, |
| 56 | we can revisit this code. */ | 56 | we can revisit this code. */ |
diff --git a/gl/reallocarray.c b/gl/reallocarray.c index 77e8d84c..60573fef 100644 --- a/gl/reallocarray.c +++ b/gl/reallocarray.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* reallocarray function that is glibc compatible. | 1 | /* reallocarray function that is glibc compatible. |
| 2 | 2 | ||
| 3 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/regcomp.c b/gl/regcomp.c index 878b65ba..aa2f6800 100644 --- a/gl/regcomp.c +++ b/gl/regcomp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | # if __GNUC_PREREQ (4, 6) | 25 | # if __GNUC_PREREQ (4, 6) |
| 26 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" | 26 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" |
| 27 | # pragma GCC diagnostic ignored "-Wswitch-enum" | ||
| 27 | # pragma GCC diagnostic ignored "-Wvla" | 28 | # pragma GCC diagnostic ignored "-Wvla" |
| 28 | # endif | 29 | # endif |
| 29 | #endif | 30 | #endif |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Definitions for data structures and routines for the regular | 1 | /* Definitions for data structures and routines for the regular |
| 2 | expression library. | 2 | expression library. |
| 3 | Copyright (C) 1985, 1989-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1985, 1989-2026 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/regex_internal.c b/gl/regex_internal.c index 9b89cc93..4b9b80f6 100644 --- a/gl/regex_internal.c +++ b/gl/regex_internal.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
diff --git a/gl/regex_internal.h b/gl/regex_internal.h index 1f297299..11b745ef 100644 --- a/gl/regex_internal.h +++ b/gl/regex_internal.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -98,24 +98,14 @@ | |||
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | /* This is for other GNU distributions with internationalized messages. */ | 100 | /* This is for other GNU distributions with internationalized messages. */ |
| 101 | #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC | 101 | #ifdef _LIBC |
| 102 | # include <libintl.h> | 102 | # include <libintl.h> |
| 103 | # undef gettext | 103 | # undef gettext |
| 104 | # ifdef _LIBC | 104 | # define gettext(msgid) \ |
| 105 | # define gettext(msgid) \ | ||
| 106 | __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) | 105 | __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) |
| 107 | # else | ||
| 108 | # define gettext(msgid) dgettext ("gnulib", msgid) | ||
| 109 | # endif | ||
| 110 | #else | ||
| 111 | # undef gettext | ||
| 112 | # define gettext(msgid) (msgid) | ||
| 113 | #endif | ||
| 114 | |||
| 115 | #ifndef gettext_noop | ||
| 116 | /* This define is so xgettext can find the internationalizable | ||
| 117 | strings. */ | ||
| 118 | # define gettext_noop(String) String | 106 | # define gettext_noop(String) String |
| 107 | #else | ||
| 108 | # include "gettext.h" | ||
| 119 | #endif | 109 | #endif |
| 120 | 110 | ||
| 121 | /* Number of ASCII characters. */ | 111 | /* Number of ASCII characters. */ |
diff --git a/gl/regexec.c b/gl/regexec.c index 0d14ac35..c84ce1ef 100644 --- a/gl/regexec.c +++ b/gl/regexec.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
diff --git a/gl/sched.h b/gl/sched.h deleted file mode 100644 index 4d9d546d..00000000 --- a/gl/sched.h +++ /dev/null | |||
| @@ -1,631 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* A GNU-like <sched.h>. | ||
| 3 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #ifndef _GL_SCHED_H | ||
| 19 | |||
| 20 | #if __GNUC__ >= 3 | ||
| 21 | #pragma GCC system_header | ||
| 22 | #endif | ||
| 23 | |||
| 24 | |||
| 25 | /* This file uses #include_next of a system file that defines time_t. | ||
| 26 | For the 'year2038' module to work right, <config.h> needs to have been | ||
| 27 | included before. */ | ||
| 28 | #if !_GL_CONFIG_H_INCLUDED | ||
| 29 | #error "Please include config.h first." | ||
| 30 | #endif | ||
| 31 | |||
| 32 | /* The include_next requires a split double-inclusion guard. */ | ||
| 33 | #if 1 | ||
| 34 | # if 1 | ||
| 35 | # include <sys/cdefs.h> | ||
| 36 | # endif | ||
| 37 | # include_next <sched.h> | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #ifndef _GL_SCHED_H | ||
| 41 | #define _GL_SCHED_H | ||
| 42 | |||
| 43 | /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | ||
| 44 | #if !_GL_CONFIG_H_INCLUDED | ||
| 45 | #error "Please include config.h first." | ||
| 46 | #endif | ||
| 47 | |||
| 48 | /* Get pid_t. | ||
| 49 | This is needed on glibc 2.11 (see | ||
| 50 | glibc bug <https://sourceware.org/PR13198>) | ||
| 51 | and Mac OS X 10.5. */ | ||
| 52 | #include <sys/types.h> | ||
| 53 | |||
| 54 | #ifdef __KLIBC__ | ||
| 55 | /* On OS/2 kLIBC, struct sched_param is in spawn.h. */ | ||
| 56 | # include <spawn.h> | ||
| 57 | #endif | ||
| 58 | |||
| 59 | #ifdef __VMS | ||
| 60 | /* On OpenVMS, struct sched_param is in <pthread.h>. */ | ||
| 61 | # include <pthread.h> | ||
| 62 | #endif | ||
| 63 | |||
| 64 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
| 65 | /* C++ compatible function declaration macros. | ||
| 66 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 67 | |||
| 68 | This program is free software: you can redistribute it and/or modify it | ||
| 69 | under the terms of the GNU Lesser General Public License as published | ||
| 70 | by the Free Software Foundation; either version 2 of the License, or | ||
| 71 | (at your option) any later version. | ||
| 72 | |||
| 73 | This program is distributed in the hope that it will be useful, | ||
| 74 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 75 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 76 | Lesser General Public License for more details. | ||
| 77 | |||
| 78 | You should have received a copy of the GNU Lesser General Public License | ||
| 79 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 80 | |||
| 81 | #ifndef _GL_CXXDEFS_H | ||
| 82 | #define _GL_CXXDEFS_H | ||
| 83 | |||
| 84 | /* Begin/end the GNULIB_NAMESPACE namespace. */ | ||
| 85 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 86 | # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { | ||
| 87 | # define _GL_END_NAMESPACE } | ||
| 88 | #else | ||
| 89 | # define _GL_BEGIN_NAMESPACE | ||
| 90 | # define _GL_END_NAMESPACE | ||
| 91 | #endif | ||
| 92 | |||
| 93 | /* The three most frequent use cases of these macros are: | ||
| 94 | |||
| 95 | * For providing a substitute for a function that is missing on some | ||
| 96 | platforms, but is declared and works fine on the platforms on which | ||
| 97 | it exists: | ||
| 98 | |||
| 99 | #if @GNULIB_FOO@ | ||
| 100 | # if !@HAVE_FOO@ | ||
| 101 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 102 | # endif | ||
| 103 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 104 | _GL_CXXALIASWARN (foo); | ||
| 105 | #elif defined GNULIB_POSIXCHECK | ||
| 106 | ... | ||
| 107 | #endif | ||
| 108 | |||
| 109 | * For providing a replacement for a function that exists on all platforms, | ||
| 110 | but is broken/insufficient and needs to be replaced on some platforms: | ||
| 111 | |||
| 112 | #if @GNULIB_FOO@ | ||
| 113 | # if @REPLACE_FOO@ | ||
| 114 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 115 | # undef foo | ||
| 116 | # define foo rpl_foo | ||
| 117 | # endif | ||
| 118 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 119 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 120 | # else | ||
| 121 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 122 | # endif | ||
| 123 | _GL_CXXALIASWARN (foo); | ||
| 124 | #elif defined GNULIB_POSIXCHECK | ||
| 125 | ... | ||
| 126 | #endif | ||
| 127 | |||
| 128 | * For providing a replacement for a function that exists on some platforms | ||
| 129 | but is broken/insufficient and needs to be replaced on some of them and | ||
| 130 | is additionally either missing or undeclared on some other platforms: | ||
| 131 | |||
| 132 | #if @GNULIB_FOO@ | ||
| 133 | # if @REPLACE_FOO@ | ||
| 134 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 135 | # undef foo | ||
| 136 | # define foo rpl_foo | ||
| 137 | # endif | ||
| 138 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 139 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 140 | # else | ||
| 141 | # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ | ||
| 142 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 143 | # endif | ||
| 144 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 145 | # endif | ||
| 146 | _GL_CXXALIASWARN (foo); | ||
| 147 | #elif defined GNULIB_POSIXCHECK | ||
| 148 | ... | ||
| 149 | #endif | ||
| 150 | */ | ||
| 151 | |||
| 152 | /* _GL_EXTERN_C declaration; | ||
| 153 | performs the declaration with C linkage. */ | ||
| 154 | #if defined __cplusplus | ||
| 155 | # define _GL_EXTERN_C extern "C" | ||
| 156 | #else | ||
| 157 | # define _GL_EXTERN_C extern | ||
| 158 | #endif | ||
| 159 | |||
| 160 | /* _GL_EXTERN_C_FUNC declaration; | ||
| 161 | performs the declaration of a function with C linkage. */ | ||
| 162 | #if defined __cplusplus | ||
| 163 | # define _GL_EXTERN_C_FUNC extern "C" | ||
| 164 | #else | ||
| 165 | /* In C mode, omit the 'extern' keyword, because attributes in bracket syntax | ||
| 166 | are not allowed between 'extern' and the return type (see gnulib-common.m4). | ||
| 167 | */ | ||
| 168 | # define _GL_EXTERN_C_FUNC | ||
| 169 | #endif | ||
| 170 | |||
| 171 | /* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]); | ||
| 172 | declares a replacement function, named rpl_func, with the given prototype, | ||
| 173 | consisting of return type, parameters, and attributes. | ||
| 174 | Although attributes are optional, the comma before them is required | ||
| 175 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 176 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 177 | at the end of the declaration. | ||
| 178 | Examples: | ||
| 179 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 180 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...), | ||
| 181 | _GL_ARG_NONNULL ((1))); | ||
| 182 | |||
| 183 | Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front | ||
| 184 | of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's | ||
| 185 | because | ||
| 186 | [[...]] extern "C" <declaration>; | ||
| 187 | is invalid syntax in C++.) | ||
| 188 | */ | ||
| 189 | #define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \ | ||
| 190 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__) | ||
| 191 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | ||
| 192 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | ||
| 193 | |||
| 194 | /* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to | ||
| 195 | parenthesized func otherwise. Parenthesization is needed in C23 if | ||
| 196 | the function is like strchr and so is a qualifier-generic macro | ||
| 197 | that expands to something more complicated. */ | ||
| 198 | #ifdef __cplusplus | ||
| 199 | # define _GL_FUNCDECL_SYS_NAME(func) func | ||
| 200 | #else | ||
| 201 | # define _GL_FUNCDECL_SYS_NAME(func) (func) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); | ||
| 205 | declares the system function, named func, with the given prototype, | ||
| 206 | consisting of return type, parameters, and attributes. | ||
| 207 | Although attributes are optional, the comma before them is required | ||
| 208 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 209 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 210 | at the end of the declaration. | ||
| 211 | Examples: | ||
| 212 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 213 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | ||
| 214 | */ | ||
| 215 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | ||
| 216 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters | ||
| 217 | |||
| 218 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | ||
| 219 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 220 | that redirects to rpl_func, if GNULIB_NAMESPACE is defined. | ||
| 221 | Example: | ||
| 222 | _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); | ||
| 223 | |||
| 224 | Wrapping rpl_func in an object with an inline conversion operator | ||
| 225 | avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is | ||
| 226 | actually used in the program. */ | ||
| 227 | #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ | ||
| 228 | _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) | ||
| 229 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 230 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 231 | namespace GNULIB_NAMESPACE \ | ||
| 232 | { \ | ||
| 233 | static const struct _gl_ ## func ## _wrapper \ | ||
| 234 | { \ | ||
| 235 | typedef rettype (*type) parameters; \ | ||
| 236 | \ | ||
| 237 | inline operator type () const \ | ||
| 238 | { \ | ||
| 239 | return ::rpl_func; \ | ||
| 240 | } \ | ||
| 241 | } func = {}; \ | ||
| 242 | } \ | ||
| 243 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 244 | #else | ||
| 245 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 246 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 247 | #endif | ||
| 248 | |||
| 249 | /* _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 250 | is to be used when func is a Microsoft deprecated alias, on native Windows. | ||
| 251 | It declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 252 | that redirects to _func, if GNULIB_NAMESPACE is defined. | ||
| 253 | Example: | ||
| 254 | _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); | ||
| 255 | */ | ||
| 256 | #define _GL_CXXALIAS_MDA(func,rettype,parameters) \ | ||
| 257 | _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) | ||
| 258 | |||
| 259 | /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); | ||
| 260 | is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); | ||
| 261 | except that the C function rpl_func may have a slightly different | ||
| 262 | declaration. A cast is used to silence the "invalid conversion" error | ||
| 263 | that would otherwise occur. */ | ||
| 264 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 265 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 266 | namespace GNULIB_NAMESPACE \ | ||
| 267 | { \ | ||
| 268 | static const struct _gl_ ## func ## _wrapper \ | ||
| 269 | { \ | ||
| 270 | typedef rettype (*type) parameters; \ | ||
| 271 | \ | ||
| 272 | inline operator type () const \ | ||
| 273 | { \ | ||
| 274 | return reinterpret_cast<type>(::rpl_func); \ | ||
| 275 | } \ | ||
| 276 | } func = {}; \ | ||
| 277 | } \ | ||
| 278 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 279 | #else | ||
| 280 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 281 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 282 | #endif | ||
| 283 | |||
| 284 | /* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); | ||
| 285 | is like _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 286 | except that the C function func may have a slightly different declaration. | ||
| 287 | A cast is used to silence the "invalid conversion" error that would | ||
| 288 | otherwise occur. */ | ||
| 289 | #define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ | ||
| 290 | _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) | ||
| 291 | |||
| 292 | /* _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 293 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 294 | that redirects to the system provided function func, if GNULIB_NAMESPACE | ||
| 295 | is defined. | ||
| 296 | Example: | ||
| 297 | _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); | ||
| 298 | |||
| 299 | Wrapping func in an object with an inline conversion operator | ||
| 300 | avoids a reference to func unless GNULIB_NAMESPACE::func is | ||
| 301 | actually used in the program. */ | ||
| 302 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 303 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 304 | namespace GNULIB_NAMESPACE \ | ||
| 305 | { \ | ||
| 306 | static const struct _gl_ ## func ## _wrapper \ | ||
| 307 | { \ | ||
| 308 | typedef rettype (*type) parameters; \ | ||
| 309 | \ | ||
| 310 | inline operator type () const \ | ||
| 311 | { \ | ||
| 312 | return ::func; \ | ||
| 313 | } \ | ||
| 314 | } func = {}; \ | ||
| 315 | } \ | ||
| 316 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 317 | #else | ||
| 318 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 319 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 320 | #endif | ||
| 321 | |||
| 322 | /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); | ||
| 323 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 324 | except that the C function func may have a slightly different declaration. | ||
| 325 | A cast is used to silence the "invalid conversion" error that would | ||
| 326 | otherwise occur. */ | ||
| 327 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 328 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 329 | namespace GNULIB_NAMESPACE \ | ||
| 330 | { \ | ||
| 331 | static const struct _gl_ ## func ## _wrapper \ | ||
| 332 | { \ | ||
| 333 | typedef rettype (*type) parameters; \ | ||
| 334 | \ | ||
| 335 | inline operator type () const \ | ||
| 336 | { \ | ||
| 337 | return reinterpret_cast<type>(::func); \ | ||
| 338 | } \ | ||
| 339 | } func = {}; \ | ||
| 340 | } \ | ||
| 341 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 342 | #else | ||
| 343 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 344 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 345 | #endif | ||
| 346 | |||
| 347 | /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); | ||
| 348 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 349 | except that the C function is picked among a set of overloaded functions, | ||
| 350 | namely the one with rettype2 and parameters2. Two consecutive casts | ||
| 351 | are used to silence the "cannot find a match" and "invalid conversion" | ||
| 352 | errors that would otherwise occur. */ | ||
| 353 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 354 | /* The outer cast must be a reinterpret_cast. | ||
| 355 | The inner cast: When the function is defined as a set of overloaded | ||
| 356 | functions, it works as a static_cast<>, choosing the designated variant. | ||
| 357 | When the function is defined as a single variant, it works as a | ||
| 358 | reinterpret_cast<>. The parenthesized cast syntax works both ways. */ | ||
| 359 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 360 | namespace GNULIB_NAMESPACE \ | ||
| 361 | { \ | ||
| 362 | static const struct _gl_ ## func ## _wrapper \ | ||
| 363 | { \ | ||
| 364 | typedef rettype (*type) parameters; \ | ||
| 365 | \ | ||
| 366 | inline operator type () const \ | ||
| 367 | { \ | ||
| 368 | return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ | ||
| 369 | } \ | ||
| 370 | } func = {}; \ | ||
| 371 | } \ | ||
| 372 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 373 | #else | ||
| 374 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 375 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 376 | #endif | ||
| 377 | |||
| 378 | /* _GL_CXXALIASWARN (func); | ||
| 379 | causes a warning to be emitted when ::func is used but not when | ||
| 380 | GNULIB_NAMESPACE::func is used. func must be defined without overloaded | ||
| 381 | variants. */ | ||
| 382 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 383 | # define _GL_CXXALIASWARN(func) \ | ||
| 384 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | ||
| 385 | # define _GL_CXXALIASWARN_1(func,namespace) \ | ||
| 386 | _GL_CXXALIASWARN_2 (func, namespace) | ||
| 387 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 388 | we enable the warning only when not optimizing. */ | ||
| 389 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 390 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 391 | _GL_WARN_ON_USE (func, \ | ||
| 392 | "The symbol ::" #func " refers to the system function. " \ | ||
| 393 | "Use " #namespace "::" #func " instead.") | ||
| 394 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 395 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 396 | extern __typeof__ (func) func | ||
| 397 | # else | ||
| 398 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 399 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 400 | # endif | ||
| 401 | #else | ||
| 402 | # define _GL_CXXALIASWARN(func) \ | ||
| 403 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 404 | #endif | ||
| 405 | |||
| 406 | /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); | ||
| 407 | causes a warning to be emitted when the given overloaded variant of ::func | ||
| 408 | is used but not when GNULIB_NAMESPACE::func is used. */ | ||
| 409 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 410 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 411 | _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ | ||
| 412 | GNULIB_NAMESPACE) | ||
| 413 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | ||
| 414 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | ||
| 415 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 416 | we enable the warning only when not optimizing. */ | ||
| 417 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 418 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 419 | _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ | ||
| 420 | "The symbol ::" #func " refers to the system function. " \ | ||
| 421 | "Use " #namespace "::" #func " instead.") | ||
| 422 | # else | ||
| 423 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 424 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 425 | # endif | ||
| 426 | #else | ||
| 427 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 428 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 429 | #endif | ||
| 430 | |||
| 431 | #endif /* _GL_CXXDEFS_H */ | ||
| 432 | |||
| 433 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
| 434 | /* A C macro for emitting warnings if a function is used. | ||
| 435 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 436 | |||
| 437 | This program is free software: you can redistribute it and/or modify it | ||
| 438 | under the terms of the GNU Lesser General Public License as published | ||
| 439 | by the Free Software Foundation; either version 2 of the License, or | ||
| 440 | (at your option) any later version. | ||
| 441 | |||
| 442 | This program is distributed in the hope that it will be useful, | ||
| 443 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 444 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 445 | Lesser General Public License for more details. | ||
| 446 | |||
| 447 | You should have received a copy of the GNU Lesser General Public License | ||
| 448 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 449 | |||
| 450 | /* _GL_WARN_ON_USE (function, "literal string") issues a declaration | ||
| 451 | for FUNCTION which will then trigger a compiler warning containing | ||
| 452 | the text of "literal string" anywhere that function is called, if | ||
| 453 | supported by the compiler. If the compiler does not support this | ||
| 454 | feature, the macro expands to an unused extern declaration. | ||
| 455 | |||
| 456 | _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the | ||
| 457 | attribute used in _GL_WARN_ON_USE. If the compiler does not support | ||
| 458 | this feature, it expands to empty. | ||
| 459 | |||
| 460 | These macros are useful for marking a function as a potential | ||
| 461 | portability trap, with the intent that "literal string" include | ||
| 462 | instructions on the replacement function that should be used | ||
| 463 | instead. | ||
| 464 | _GL_WARN_ON_USE is for functions with 'extern' linkage. | ||
| 465 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' | ||
| 466 | linkage. | ||
| 467 | |||
| 468 | _GL_WARN_ON_USE should not be used more than once for a given function | ||
| 469 | in a given compilation unit (because this may generate a warning even | ||
| 470 | if the function is never called). | ||
| 471 | |||
| 472 | However, one of the reasons that a function is a portability trap is | ||
| 473 | if it has the wrong signature. Declaring FUNCTION with a different | ||
| 474 | signature in C is a compilation error, so this macro must use the | ||
| 475 | same type as any existing declaration so that programs that avoid | ||
| 476 | the problematic FUNCTION do not fail to compile merely because they | ||
| 477 | included a header that poisoned the function. But this implies that | ||
| 478 | _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already | ||
| 479 | have a declaration. Use of this macro implies that there must not | ||
| 480 | be any other macro hiding the declaration of FUNCTION; but | ||
| 481 | undefining FUNCTION first is part of the poisoning process anyway | ||
| 482 | (although for symbols that are provided only via a macro, the result | ||
| 483 | is a compilation error rather than a warning containing | ||
| 484 | "literal string"). Also note that in C++, it is only safe to use if | ||
| 485 | FUNCTION has no overloads. | ||
| 486 | |||
| 487 | For an example, it is possible to poison 'getline' by: | ||
| 488 | - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], | ||
| 489 | [getline]) in configure.ac, which potentially defines | ||
| 490 | HAVE_RAW_DECL_GETLINE | ||
| 491 | - adding this code to a header that wraps the system <stdio.h>: | ||
| 492 | #undef getline | ||
| 493 | #if HAVE_RAW_DECL_GETLINE | ||
| 494 | _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" | ||
| 495 | "not universally present; use the gnulib module getline"); | ||
| 496 | #endif | ||
| 497 | |||
| 498 | It is not possible to directly poison global variables. But it is | ||
| 499 | possible to write a wrapper accessor function, and poison that | ||
| 500 | (less common usage, like &environ, will cause a compilation error | ||
| 501 | rather than issue the nice warning, but the end result of informing | ||
| 502 | the developer about their portability problem is still achieved): | ||
| 503 | #if HAVE_RAW_DECL_ENVIRON | ||
| 504 | static char *** | ||
| 505 | rpl_environ (void) { return &environ; } | ||
| 506 | _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); | ||
| 507 | # undef environ | ||
| 508 | # define environ (*rpl_environ ()) | ||
| 509 | #endif | ||
| 510 | or better (avoiding contradictory use of 'static' and 'extern'): | ||
| 511 | #if HAVE_RAW_DECL_ENVIRON | ||
| 512 | static char *** | ||
| 513 | _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") | ||
| 514 | rpl_environ (void) { return &environ; } | ||
| 515 | # undef environ | ||
| 516 | # define environ (*rpl_environ ()) | ||
| 517 | #endif | ||
| 518 | */ | ||
| 519 | #ifndef _GL_WARN_ON_USE | ||
| 520 | |||
| 521 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 522 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 523 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 524 | _GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) | ||
| 525 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 526 | __attribute__ ((__warning__ (message))) | ||
| 527 | # elif __clang_major__ >= 4 | ||
| 528 | /* Another compiler attribute is available in clang. */ | ||
| 529 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 530 | _GL_WARN_EXTERN_C __typeof__ (function) function \ | ||
| 531 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 532 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 533 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 534 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 535 | /* Verify the existence of the function. */ | ||
| 536 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 537 | _GL_WARN_EXTERN_C __typeof__ (function) function | ||
| 538 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 539 | # else /* Unsupported. */ | ||
| 540 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 541 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 542 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 543 | # endif | ||
| 544 | #endif | ||
| 545 | |||
| 546 | /* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") | ||
| 547 | is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the | ||
| 548 | function is declared with the given prototype, consisting of return type, | ||
| 549 | parameters, and attributes. | ||
| 550 | This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does | ||
| 551 | not work in this case. */ | ||
| 552 | #ifndef _GL_WARN_ON_USE_CXX | ||
| 553 | # if !defined __cplusplus | ||
| 554 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 555 | _GL_WARN_ON_USE (function, msg) | ||
| 556 | # else | ||
| 557 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 558 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 559 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 560 | extern rettype_gcc function parameters_and_attributes \ | ||
| 561 | __attribute__ ((__warning__ (msg))) | ||
| 562 | # elif __clang_major__ >= 4 | ||
| 563 | /* Another compiler attribute is available in clang. */ | ||
| 564 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 565 | extern rettype_clang function parameters_and_attributes \ | ||
| 566 | __attribute__ ((__diagnose_if__ (1, msg, "warning"))) | ||
| 567 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 568 | /* Verify the existence of the function. */ | ||
| 569 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 570 | extern rettype_gcc function parameters_and_attributes | ||
| 571 | # else /* Unsupported. */ | ||
| 572 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 573 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 574 | # endif | ||
| 575 | # endif | ||
| 576 | #endif | ||
| 577 | |||
| 578 | /* _GL_WARN_EXTERN_C declaration; | ||
| 579 | performs the declaration with C linkage. */ | ||
| 580 | #ifndef _GL_WARN_EXTERN_C | ||
| 581 | # if defined __cplusplus | ||
| 582 | # define _GL_WARN_EXTERN_C extern "C" | ||
| 583 | # else | ||
| 584 | # define _GL_WARN_EXTERN_C extern | ||
| 585 | # endif | ||
| 586 | #endif | ||
| 587 | |||
| 588 | #if !1 | ||
| 589 | |||
| 590 | # if !GNULIB_defined_struct_sched_param | ||
| 591 | struct sched_param | ||
| 592 | { | ||
| 593 | int sched_priority; | ||
| 594 | }; | ||
| 595 | # define GNULIB_defined_struct_sched_param 1 | ||
| 596 | # endif | ||
| 597 | |||
| 598 | #endif | ||
| 599 | |||
| 600 | #if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER) | ||
| 601 | # define SCHED_FIFO 1 | ||
| 602 | # define SCHED_RR 2 | ||
| 603 | # define SCHED_OTHER 0 | ||
| 604 | #endif | ||
| 605 | |||
| 606 | #if 0 | ||
| 607 | # if 0 | ||
| 608 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 609 | # undef sched_yield | ||
| 610 | # define sched_yield rpl_sched_yield | ||
| 611 | # endif | ||
| 612 | _GL_FUNCDECL_RPL (sched_yield, int, (void), ); | ||
| 613 | _GL_CXXALIAS_RPL (sched_yield, int, (void)); | ||
| 614 | # else | ||
| 615 | # if !1 | ||
| 616 | _GL_FUNCDECL_SYS (sched_yield, int, (void), ); | ||
| 617 | # endif | ||
| 618 | _GL_CXXALIAS_SYS (sched_yield, int, (void)); | ||
| 619 | # endif | ||
| 620 | # if __GLIBC__ >= 2 | ||
| 621 | _GL_CXXALIASWARN (sched_yield); | ||
| 622 | # endif | ||
| 623 | #elif defined GNULIB_POSIXCHECK | ||
| 624 | # if HAVE_RAW_DECL_SCHED_YIELD | ||
| 625 | _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - " | ||
| 626 | "use gnulib module sched_yield for portability"); | ||
| 627 | # endif | ||
| 628 | #endif | ||
| 629 | |||
| 630 | #endif /* _GL_SCHED_H */ | ||
| 631 | #endif /* _GL_SCHED_H */ | ||
diff --git a/gl/sched.in.h b/gl/sched.in.h index 5b4034c3..cb8ceca0 100644 --- a/gl/sched.in.h +++ b/gl/sched.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A GNU-like <sched.h>. | 1 | /* A GNU-like <sched.h>. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Get pid_t. | 47 | /* Get pid_t. |
| 48 | This is needed on glibc 2.11 (see | 48 | This is needed on glibc 2.11 (see |
| 49 | glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>) | 49 | glibc bug <https://sourceware.org/PR13198>) |
| 50 | and Mac OS X 10.5. */ | 50 | and Mac OS X 10.5. */ |
| 51 | #include <sys/types.h> | 51 | #include <sys/types.h> |
| 52 | 52 | ||
| @@ -100,7 +100,6 @@ _GL_CXXALIAS_SYS (sched_yield, int, (void)); | |||
| 100 | _GL_CXXALIASWARN (sched_yield); | 100 | _GL_CXXALIASWARN (sched_yield); |
| 101 | # endif | 101 | # endif |
| 102 | #elif defined GNULIB_POSIXCHECK | 102 | #elif defined GNULIB_POSIXCHECK |
| 103 | # undef sched_yield | ||
| 104 | # if HAVE_RAW_DECL_SCHED_YIELD | 103 | # if HAVE_RAW_DECL_SCHED_YIELD |
| 105 | _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - " | 104 | _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - " |
| 106 | "use gnulib module sched_yield for portability"); | 105 | "use gnulib module sched_yield for portability"); |
diff --git a/gl/setenv.c b/gl/setenv.c index ef301d41..ae53146f 100644 --- a/gl/setenv.c +++ b/gl/setenv.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1992, 1995-2003, 2005-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992, 1995-2003, 2005-2026 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| @@ -126,8 +126,6 @@ int | |||
| 126 | __add_to_environ (const char *name, const char *value, const char *combined, | 126 | __add_to_environ (const char *name, const char *value, const char *combined, |
| 127 | int replace) | 127 | int replace) |
| 128 | { | 128 | { |
| 129 | char **ep; | ||
| 130 | size_t size; | ||
| 131 | const size_t namelen = strlen (name); | 129 | const size_t namelen = strlen (name); |
| 132 | const size_t vallen = value != NULL ? strlen (value) + 1 : 0; | 130 | const size_t vallen = value != NULL ? strlen (value) + 1 : 0; |
| 133 | 131 | ||
| @@ -135,9 +133,9 @@ __add_to_environ (const char *name, const char *value, const char *combined, | |||
| 135 | 133 | ||
| 136 | /* We have to get the pointer now that we have the lock and not earlier | 134 | /* We have to get the pointer now that we have the lock and not earlier |
| 137 | since another thread might have created a new environment. */ | 135 | since another thread might have created a new environment. */ |
| 138 | ep = __environ; | 136 | char **ep = __environ; |
| 139 | 137 | ||
| 140 | size = 0; | 138 | size_t size = 0; |
| 141 | if (ep != NULL) | 139 | if (ep != NULL) |
| 142 | { | 140 | { |
| 143 | for (; *ep != NULL; ++ep) | 141 | for (; *ep != NULL; ++ep) |
| @@ -149,13 +147,8 @@ __add_to_environ (const char *name, const char *value, const char *combined, | |||
| 149 | 147 | ||
| 150 | if (ep == NULL || *ep == NULL) | 148 | if (ep == NULL || *ep == NULL) |
| 151 | { | 149 | { |
| 152 | char **new_environ; | ||
| 153 | #ifdef USE_TSEARCH | ||
| 154 | char *new_value; | ||
| 155 | #endif | ||
| 156 | |||
| 157 | /* We allocated this space; we can extend it. */ | 150 | /* We allocated this space; we can extend it. */ |
| 158 | new_environ = | 151 | char **new_environ = |
| 159 | (char **) (last_environ == NULL | 152 | (char **) (last_environ == NULL |
| 160 | ? malloc ((size + 2) * sizeof (char *)) | 153 | ? malloc ((size + 2) * sizeof (char *)) |
| 161 | : realloc (last_environ, (size + 2) * sizeof (char *))); | 154 | : realloc (last_environ, (size + 2) * sizeof (char *))); |
| @@ -177,6 +170,7 @@ __add_to_environ (const char *name, const char *value, const char *combined, | |||
| 177 | { | 170 | { |
| 178 | /* See whether the value is already known. */ | 171 | /* See whether the value is already known. */ |
| 179 | #ifdef USE_TSEARCH | 172 | #ifdef USE_TSEARCH |
| 173 | char *new_value; | ||
| 180 | # ifdef _LIBC | 174 | # ifdef _LIBC |
| 181 | new_value = (char *) alloca (namelen + 1 + vallen); | 175 | new_value = (char *) alloca (namelen + 1 + vallen); |
| 182 | __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), | 176 | __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), |
| @@ -448,7 +442,6 @@ extern int setenv (const char *, const char *, int); | |||
| 448 | int | 442 | int |
| 449 | rpl_setenv (const char *name, const char *value, int replace) | 443 | rpl_setenv (const char *name, const char *value, int replace) |
| 450 | { | 444 | { |
| 451 | int result; | ||
| 452 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) | 445 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) |
| 453 | { | 446 | { |
| 454 | errno = EINVAL; | 447 | errno = EINVAL; |
| @@ -456,13 +449,12 @@ rpl_setenv (const char *name, const char *value, int replace) | |||
| 456 | } | 449 | } |
| 457 | /* Call the real setenv even if replace is 0, in case implementation | 450 | /* Call the real setenv even if replace is 0, in case implementation |
| 458 | has underlying data to update, such as when environ changes. */ | 451 | has underlying data to update, such as when environ changes. */ |
| 459 | result = setenv (name, value, replace); | 452 | int result = setenv (name, value, replace); |
| 460 | if (result == 0 && replace && *value == '=') | 453 | if (result == 0 && replace && *value == '=') |
| 461 | { | 454 | { |
| 462 | char *tmp = getenv (name); | 455 | char *tmp = getenv (name); |
| 463 | if (!STREQ (tmp, value)) | 456 | if (!STREQ (tmp, value)) |
| 464 | { | 457 | { |
| 465 | int saved_errno; | ||
| 466 | size_t len = strlen (value); | 458 | size_t len = strlen (value); |
| 467 | tmp = malloca (len + 2); | 459 | tmp = malloca (len + 2); |
| 468 | if (tmp == NULL) | 460 | if (tmp == NULL) |
| @@ -474,7 +466,7 @@ rpl_setenv (const char *name, const char *value, int replace) | |||
| 474 | *tmp = '='; | 466 | *tmp = '='; |
| 475 | memcpy (tmp + 1, value, len + 1); | 467 | memcpy (tmp + 1, value, len + 1); |
| 476 | result = setenv (name, tmp, replace); | 468 | result = setenv (name, tmp, replace); |
| 477 | saved_errno = errno; | 469 | int saved_errno = errno; |
| 478 | freea (tmp); | 470 | freea (tmp); |
| 479 | errno = saved_errno; | 471 | errno = saved_errno; |
| 480 | } | 472 | } |
diff --git a/gl/setlocale-lock.c b/gl/setlocale-lock.c index 87e0048c..afbcc046 100644 --- a/gl/setlocale-lock.c +++ b/gl/setlocale-lock.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Return the internal lock used by setlocale_null_r. | 1 | /* Return the internal lock used by setlocale_null_r. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/setlocale_null-unlocked.c b/gl/setlocale_null-unlocked.c index 72729e6b..e7f155c7 100644 --- a/gl/setlocale_null-unlocked.c +++ b/gl/setlocale_null-unlocked.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Query the name of the current global locale, without locking. | 1 | /* Query the name of the current global locale, without locking. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -86,10 +86,8 @@ setlocale_null_r_unlocked (int category, char *buf, size_t bufsize) | |||
| 86 | size_t length = wcslen (result); | 86 | size_t length = wcslen (result); |
| 87 | if (length < bufsize) | 87 | if (length < bufsize) |
| 88 | { | 88 | { |
| 89 | size_t i; | ||
| 90 | |||
| 91 | /* Convert wchar_t[] -> char[], assuming plain ASCII. */ | 89 | /* Convert wchar_t[] -> char[], assuming plain ASCII. */ |
| 92 | for (i = 0; i <= length; i++) | 90 | for (size_t i = 0; i <= length; i++) |
| 93 | buf[i] = result[i]; | 91 | buf[i] = result[i]; |
| 94 | 92 | ||
| 95 | return 0; | 93 | return 0; |
| @@ -101,10 +99,8 @@ setlocale_null_r_unlocked (int category, char *buf, size_t bufsize) | |||
| 101 | /* Return a truncated result in BUF. | 99 | /* Return a truncated result in BUF. |
| 102 | This is a convenience for callers that don't want to write | 100 | This is a convenience for callers that don't want to write |
| 103 | explicit code for handling ERANGE. */ | 101 | explicit code for handling ERANGE. */ |
| 104 | size_t i; | ||
| 105 | |||
| 106 | /* Convert wchar_t[] -> char[], assuming plain ASCII. */ | 102 | /* Convert wchar_t[] -> char[], assuming plain ASCII. */ |
| 107 | for (i = 0; i < bufsize; i++) | 103 | for (size_t i = 0; i < bufsize; i++) |
| 108 | buf[i] = result[i]; | 104 | buf[i] = result[i]; |
| 109 | buf[bufsize - 1] = '\0'; | 105 | buf[bufsize - 1] = '\0'; |
| 110 | } | 106 | } |
diff --git a/gl/setlocale_null.c b/gl/setlocale_null.c index 29889642..39b6766c 100644 --- a/gl/setlocale_null.c +++ b/gl/setlocale_null.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Query the name of the current global locale. | 1 | /* Query the name of the current global locale. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -77,10 +77,9 @@ static int | |||
| 77 | setlocale_null_r_with_lock (int category, char *buf, size_t bufsize) | 77 | setlocale_null_r_with_lock (int category, char *buf, size_t bufsize) |
| 78 | { | 78 | { |
| 79 | CRITICAL_SECTION *lock = gl_get_setlocale_null_lock (); | 79 | CRITICAL_SECTION *lock = gl_get_setlocale_null_lock (); |
| 80 | int ret; | ||
| 81 | 80 | ||
| 82 | EnterCriticalSection (lock); | 81 | EnterCriticalSection (lock); |
| 83 | ret = setlocale_null_r_unlocked (category, buf, bufsize); | 82 | int ret = setlocale_null_r_unlocked (category, buf, bufsize); |
| 84 | LeaveCriticalSection (lock); | 83 | LeaveCriticalSection (lock); |
| 85 | 84 | ||
| 86 | return ret; | 85 | return ret; |
| @@ -116,11 +115,10 @@ setlocale_null_r_with_lock (int category, char *buf, size_t bufsize) | |||
| 116 | if (pthread_in_use()) | 115 | if (pthread_in_use()) |
| 117 | { | 116 | { |
| 118 | pthread_mutex_t *lock = gl_get_setlocale_null_lock (); | 117 | pthread_mutex_t *lock = gl_get_setlocale_null_lock (); |
| 119 | int ret; | ||
| 120 | 118 | ||
| 121 | if (pthread_mutex_lock (lock)) | 119 | if (pthread_mutex_lock (lock)) |
| 122 | abort (); | 120 | abort (); |
| 123 | ret = setlocale_null_r_unlocked (category, buf, bufsize); | 121 | int ret = setlocale_null_r_unlocked (category, buf, bufsize); |
| 124 | if (pthread_mutex_unlock (lock)) | 122 | if (pthread_mutex_unlock (lock)) |
| 125 | abort (); | 123 | abort (); |
| 126 | 124 | ||
| @@ -138,11 +136,10 @@ static int | |||
| 138 | setlocale_null_r_with_lock (int category, char *buf, size_t bufsize) | 136 | setlocale_null_r_with_lock (int category, char *buf, size_t bufsize) |
| 139 | { | 137 | { |
| 140 | mtx_t *lock = gl_get_setlocale_null_lock (); | 138 | mtx_t *lock = gl_get_setlocale_null_lock (); |
| 141 | int ret; | ||
| 142 | 139 | ||
| 143 | if (mtx_lock (lock) != thrd_success) | 140 | if (mtx_lock (lock) != thrd_success) |
| 144 | abort (); | 141 | abort (); |
| 145 | ret = setlocale_null_r_unlocked (category, buf, bufsize); | 142 | int ret = setlocale_null_r_unlocked (category, buf, bufsize); |
| 146 | if (mtx_unlock (lock) != thrd_success) | 143 | if (mtx_unlock (lock) != thrd_success) |
| 147 | abort (); | 144 | abort (); |
| 148 | 145 | ||
| @@ -252,9 +249,7 @@ setlocale_null (int category) | |||
| 252 | i; | 249 | i; |
| 253 | char buf[SETLOCALE_NULL_MAX]; | 250 | char buf[SETLOCALE_NULL_MAX]; |
| 254 | static char resultbuf[LC_INDICES_COUNT][SETLOCALE_NULL_MAX]; | 251 | static char resultbuf[LC_INDICES_COUNT][SETLOCALE_NULL_MAX]; |
| 255 | int err; | 252 | int err = setlocale_null_r (category, buf, sizeof (buf)); |
| 256 | |||
| 257 | err = setlocale_null_r (category, buf, sizeof (buf)); | ||
| 258 | if (err == EINVAL) | 253 | if (err == EINVAL) |
| 259 | return NULL; | 254 | return NULL; |
| 260 | if (err) | 255 | if (err) |
diff --git a/gl/setlocale_null.h b/gl/setlocale_null.h index 3fcb7a82..dbd646b3 100644 --- a/gl/setlocale_null.h +++ b/gl/setlocale_null.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Query the name of the current global locale. | 1 | /* Query the name of the current global locale. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/sha256-stream.c b/gl/sha256-stream.c index e2668078..011b36e2 100644 --- a/gl/sha256-stream.c +++ b/gl/sha256-stream.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or | 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-2. | 2 | memory blocks according to the NIST specification FIPS-180-2. |
| 3 | 3 | ||
| 4 | Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 4 | Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU Lesser General Public License as | 7 | it under the terms of the GNU Lesser General Public License as |
| @@ -67,7 +67,6 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock, | |||
| 67 | /* We read the file in blocks of BLOCKSIZE bytes. One call of the | 67 | /* We read the file in blocks of BLOCKSIZE bytes. One call of the |
| 68 | computation function processes the whole buffer so that with the | 68 | computation function processes the whole buffer so that with the |
| 69 | next round of the loop another block can be read. */ | 69 | next round of the loop another block can be read. */ |
| 70 | size_t n; | ||
| 71 | sum = 0; | 70 | sum = 0; |
| 72 | 71 | ||
| 73 | /* Read block. Take care for partial reads. */ | 72 | /* Read block. Take care for partial reads. */ |
| @@ -77,11 +76,11 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock, | |||
| 77 | or the fread() in afalg_stream may have gotten EOF. | 76 | or the fread() in afalg_stream may have gotten EOF. |
| 78 | We need to avoid a subsequent fread() as EOF may | 77 | We need to avoid a subsequent fread() as EOF may |
| 79 | not be sticky. For details of such systems, see: | 78 | not be sticky. For details of such systems, see: |
| 80 | https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */ | 79 | https://sourceware.org/PR1190 */ |
| 81 | if (feof (stream)) | 80 | if (feof (stream)) |
| 82 | goto process_partial_block; | 81 | goto process_partial_block; |
| 83 | 82 | ||
| 84 | n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); | 83 | size_t n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); |
| 85 | 84 | ||
| 86 | sum += n; | 85 | sum += n; |
| 87 | 86 | ||
diff --git a/gl/sha256.c b/gl/sha256.c index 9358faff..bada2d07 100644 --- a/gl/sha256.c +++ b/gl/sha256.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or | 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-2. | 2 | memory blocks according to the NIST specification FIPS-180-2. |
| 3 | 3 | ||
| 4 | Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 4 | Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU Lesser General Public License as | 7 | it under the terms of the GNU Lesser General Public License as |
| @@ -96,10 +96,9 @@ set_uint32 (char *cp, uint32_t v) | |||
| 96 | void * | 96 | void * |
| 97 | sha256_read_ctx (const struct sha256_ctx *ctx, void *resbuf) | 97 | sha256_read_ctx (const struct sha256_ctx *ctx, void *resbuf) |
| 98 | { | 98 | { |
| 99 | int i; | ||
| 100 | char *r = resbuf; | 99 | char *r = resbuf; |
| 101 | 100 | ||
| 102 | for (i = 0; i < 8; i++) | 101 | for (int i = 0; i < 8; i++) |
| 103 | set_uint32 (r + i * sizeof ctx->state[0], SWAP (ctx->state[i])); | 102 | set_uint32 (r + i * sizeof ctx->state[0], SWAP (ctx->state[i])); |
| 104 | 103 | ||
| 105 | return resbuf; | 104 | return resbuf; |
| @@ -108,10 +107,9 @@ sha256_read_ctx (const struct sha256_ctx *ctx, void *resbuf) | |||
| 108 | void * | 107 | void * |
| 109 | sha224_read_ctx (const struct sha256_ctx *ctx, void *resbuf) | 108 | sha224_read_ctx (const struct sha256_ctx *ctx, void *resbuf) |
| 110 | { | 109 | { |
| 111 | int i; | ||
| 112 | char *r = resbuf; | 110 | char *r = resbuf; |
| 113 | 111 | ||
| 114 | for (i = 0; i < 7; i++) | 112 | for (int i = 0; i < 7; i++) |
| 115 | set_uint32 (r + i * sizeof ctx->state[0], SWAP (ctx->state[i])); | 113 | set_uint32 (r + i * sizeof ctx->state[0], SWAP (ctx->state[i])); |
| 116 | 114 | ||
| 117 | return resbuf; | 115 | return resbuf; |
| @@ -326,8 +324,8 @@ sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) | |||
| 326 | + S0(x[(I-15)&0x0f]) + x[I&0x0f] \ | 324 | + S0(x[(I-15)&0x0f]) + x[I&0x0f] \ |
| 327 | , x[I&0x0f] = tm ) | 325 | , x[I&0x0f] = tm ) |
| 328 | 326 | ||
| 329 | #define R(A,B,C,D,E,F,G,H,K,M) do { t0 = SS0(A) + F2(A,B,C); \ | 327 | #define R(A,B,C,D,E,F,G,H,K,M) do { uint32_t t0 = SS0(A) + F2(A,B,C); \ |
| 330 | t1 = H + SS1(E) \ | 328 | uint32_t t1 = H + SS1(E) \ |
| 331 | + F1(E,F,G) \ | 329 | + F1(E,F,G) \ |
| 332 | + K \ | 330 | + K \ |
| 333 | + M; \ | 331 | + M; \ |
| @@ -336,16 +334,15 @@ sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) | |||
| 336 | 334 | ||
| 337 | while (words < endp) | 335 | while (words < endp) |
| 338 | { | 336 | { |
| 339 | uint32_t tm; | ||
| 340 | uint32_t t0, t1; | ||
| 341 | int t; | ||
| 342 | /* FIXME: see sha1.c for a better implementation. */ | 337 | /* FIXME: see sha1.c for a better implementation. */ |
| 343 | for (t = 0; t < 16; t++) | 338 | for (int t = 0; t < 16; t++) |
| 344 | { | 339 | { |
| 345 | x[t] = SWAP (*words); | 340 | x[t] = SWAP (*words); |
| 346 | words++; | 341 | words++; |
| 347 | } | 342 | } |
| 348 | 343 | ||
| 344 | uint32_t tm; | ||
| 345 | |||
| 349 | R( a, b, c, d, e, f, g, h, K( 0), x[ 0] ); | 346 | R( a, b, c, d, e, f, g, h, K( 0), x[ 0] ); |
| 350 | R( h, a, b, c, d, e, f, g, K( 1), x[ 1] ); | 347 | R( h, a, b, c, d, e, f, g, K( 1), x[ 1] ); |
| 351 | R( g, h, a, b, c, d, e, f, K( 2), x[ 2] ); | 348 | R( g, h, a, b, c, d, e, f, K( 2), x[ 2] ); |
diff --git a/gl/sha256.h b/gl/sha256.h index cd1a9fe3..db80ea5e 100644 --- a/gl/sha256.h +++ b/gl/sha256.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declarations of functions and data types used for SHA256 and SHA224 sum | 1 | /* Declarations of functions and data types used for SHA256 and SHA224 sum |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/size_max.h b/gl/size_max.h index 93eb96a6..b627e5ff 100644 --- a/gl/size_max.h +++ b/gl/size_max.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* size_max.h -- declare SIZE_MAX through system headers | 1 | /* size_max.h -- declare SIZE_MAX through system headers |
| 2 | Copyright (C) 2005-2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Simon Josefsson. | 3 | Written by Simon Josefsson. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/snprintf.c b/gl/snprintf.c index edeee083..58ad5d7a 100644 --- a/gl/snprintf.c +++ b/gl/snprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 2004, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2004, 2006-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -28,10 +28,8 @@ int | |||
| 28 | snprintf (char *str, size_t size, const char *format, ...) | 28 | snprintf (char *str, size_t size, const char *format, ...) |
| 29 | { | 29 | { |
| 30 | va_list args; | 30 | va_list args; |
| 31 | ptrdiff_t ret; | ||
| 32 | |||
| 33 | va_start (args, format); | 31 | va_start (args, format); |
| 34 | ret = vsnzprintf (str, size, format, args); | 32 | ptrdiff_t ret = vsnzprintf (str, size, format, args); |
| 35 | va_end (args); | 33 | va_end (args); |
| 36 | 34 | ||
| 37 | #if PTRDIFF_MAX > INT_MAX | 35 | #if PTRDIFF_MAX > INT_MAX |
diff --git a/gl/sockets.c b/gl/sockets.c index 7accfdd3..ce98698d 100644 --- a/gl/sockets.c +++ b/gl/sockets.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* sockets.c --- wrappers for Windows socket functions | 1 | /* sockets.c --- wrappers for Windows socket functions |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -46,11 +46,10 @@ close_fd_maybe_socket (const struct fd_hook *remaining_list, | |||
| 46 | our calls to closesocket() and the primary close(), some other thread | 46 | our calls to closesocket() and the primary close(), some other thread |
| 47 | could make system calls that allocate precisely the same HANDLE value | 47 | could make system calls that allocate precisely the same HANDLE value |
| 48 | as sock; then the primary close() would call CloseHandle() on it. */ | 48 | as sock; then the primary close() would call CloseHandle() on it. */ |
| 49 | SOCKET sock; | ||
| 50 | WSANETWORKEVENTS ev; | ||
| 51 | 49 | ||
| 52 | /* Test whether fd refers to a socket. */ | 50 | /* Test whether fd refers to a socket. */ |
| 53 | sock = FD_TO_SOCKET (fd); | 51 | SOCKET sock = FD_TO_SOCKET (fd); |
| 52 | WSANETWORKEVENTS ev; | ||
| 54 | ev.lNetworkEvents = 0xDEADBEEF; | 53 | ev.lNetworkEvents = 0xDEADBEEF; |
| 55 | WSAEnumNetworkEvents (sock, NULL, &ev); | 54 | WSAEnumNetworkEvents (sock, NULL, &ev); |
| 56 | if (ev.lNetworkEvents != 0xDEADBEEF) | 55 | if (ev.lNetworkEvents != 0xDEADBEEF) |
| @@ -83,11 +82,9 @@ ioctl_fd_maybe_socket (const struct fd_hook *remaining_list, | |||
| 83 | gl_ioctl_fn primary, | 82 | gl_ioctl_fn primary, |
| 84 | int fd, int request, void *arg) | 83 | int fd, int request, void *arg) |
| 85 | { | 84 | { |
| 86 | SOCKET sock; | ||
| 87 | WSANETWORKEVENTS ev; | ||
| 88 | |||
| 89 | /* Test whether fd refers to a socket. */ | 85 | /* Test whether fd refers to a socket. */ |
| 90 | sock = FD_TO_SOCKET (fd); | 86 | SOCKET sock = FD_TO_SOCKET (fd); |
| 87 | WSANETWORKEVENTS ev; | ||
| 91 | ev.lNetworkEvents = 0xDEADBEEF; | 88 | ev.lNetworkEvents = 0xDEADBEEF; |
| 92 | WSAEnumNetworkEvents (sock, NULL, &ev); | 89 | WSAEnumNetworkEvents (sock, NULL, &ev); |
| 93 | if (ev.lNetworkEvents != 0xDEADBEEF) | 90 | if (ev.lNetworkEvents != 0xDEADBEEF) |
| @@ -119,9 +116,7 @@ gl_sockets_startup (_GL_UNUSED int version) | |||
| 119 | if (version > initialized_sockets_version) | 116 | if (version > initialized_sockets_version) |
| 120 | { | 117 | { |
| 121 | WSADATA data; | 118 | WSADATA data; |
| 122 | int err; | 119 | int err = WSAStartup (version, &data); |
| 123 | |||
| 124 | err = WSAStartup (version, &data); | ||
| 125 | if (err != 0) | 120 | if (err != 0) |
| 126 | return 1; | 121 | return 1; |
| 127 | 122 | ||
| @@ -146,13 +141,11 @@ int | |||
| 146 | gl_sockets_cleanup (void) | 141 | gl_sockets_cleanup (void) |
| 147 | { | 142 | { |
| 148 | #if WINDOWS_SOCKETS | 143 | #if WINDOWS_SOCKETS |
| 149 | int err; | ||
| 150 | |||
| 151 | initialized_sockets_version = 0; | 144 | initialized_sockets_version = 0; |
| 152 | 145 | ||
| 153 | unregister_fd_hook (&fd_sockets_hook); | 146 | unregister_fd_hook (&fd_sockets_hook); |
| 154 | 147 | ||
| 155 | err = WSACleanup (); | 148 | int err = WSACleanup (); |
| 156 | if (err != 0) | 149 | if (err != 0) |
| 157 | return 1; | 150 | return 1; |
| 158 | #endif | 151 | #endif |
diff --git a/gl/sockets.h b/gl/sockets.h index 5be5d3f6..ed12cf9a 100644 --- a/gl/sockets.h +++ b/gl/sockets.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* sockets.h - wrappers for Windows socket functions | 1 | /* sockets.h - wrappers for Windows socket functions |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/stat-time.c b/gl/stat-time.c index fa93e16c..9dcdc377 100644 --- a/gl/stat-time.c +++ b/gl/stat-time.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stat-related time functions. | 1 | /* stat-related time functions. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE | 18 | #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include "stat-time.h" | 20 | #include "stat-time.h" |
diff --git a/gl/stat-time.h b/gl/stat-time.h index 38315b9f..45364316 100644 --- a/gl/stat-time.h +++ b/gl/stat-time.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stat-related time functions. | 1 | /* stat-related time functions. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -232,8 +232,7 @@ stat_time_normalize (int result, _GL_UNUSED struct stat *st) | |||
| 232 | short int const ts_off[] = { STAT_TIMESPEC_OFFSETOF (st_atim), | 232 | short int const ts_off[] = { STAT_TIMESPEC_OFFSETOF (st_atim), |
| 233 | STAT_TIMESPEC_OFFSETOF (st_mtim), | 233 | STAT_TIMESPEC_OFFSETOF (st_mtim), |
| 234 | STAT_TIMESPEC_OFFSETOF (st_ctim) }; | 234 | STAT_TIMESPEC_OFFSETOF (st_ctim) }; |
| 235 | int i; | 235 | for (int i = 0; i < sizeof ts_off / sizeof *ts_off; i++) |
| 236 | for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++) | ||
| 237 | { | 236 | { |
| 238 | struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); | 237 | struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); |
| 239 | long int q = ts->tv_nsec / timespec_hz; | 238 | long int q = ts->tv_nsec / timespec_hz; |
diff --git a/gl/stat-w32.c b/gl/stat-w32.c index 8da8fe5c..583ef09b 100644 --- a/gl/stat-w32.c +++ b/gl/stat-w32.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Core of implementation of fstat and stat for native Windows. | 1 | /* Core of implementation of fstat and stat for native Windows. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -112,11 +112,11 @@ initialize (void) | |||
| 112 | struct timespec | 112 | struct timespec |
| 113 | _gl_convert_FILETIME_to_timespec (const FILETIME *ft) | 113 | _gl_convert_FILETIME_to_timespec (const FILETIME *ft) |
| 114 | { | 114 | { |
| 115 | struct timespec result; | ||
| 116 | /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ | 115 | /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ |
| 117 | unsigned long long since_1601 = | 116 | unsigned long long since_1601 = |
| 118 | ((unsigned long long) ft->dwHighDateTime << 32) | 117 | ((unsigned long long) ft->dwHighDateTime << 32) |
| 119 | | (unsigned long long) ft->dwLowDateTime; | 118 | | (unsigned long long) ft->dwLowDateTime; |
| 119 | struct timespec result; | ||
| 120 | if (since_1601 == 0) | 120 | if (since_1601 == 0) |
| 121 | { | 121 | { |
| 122 | result.tv_sec = 0; | 122 | result.tv_sec = 0; |
| @@ -289,8 +289,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) | |||
| 289 | && (path = fpath, 1))) | 289 | && (path = fpath, 1))) |
| 290 | { | 290 | { |
| 291 | const char *last_dot = NULL; | 291 | const char *last_dot = NULL; |
| 292 | const char *p; | 292 | for (const char *p = path; *p != '\0'; p++) |
| 293 | for (p = path; *p != '\0'; p++) | ||
| 294 | if (*p == '.') | 293 | if (*p == '.') |
| 295 | last_dot = p; | 294 | last_dot = p; |
| 296 | if (last_dot != NULL) | 295 | if (last_dot != NULL) |
diff --git a/gl/stat-w32.h b/gl/stat-w32.h index c70c1be3..f5cc82f4 100644 --- a/gl/stat-w32.h +++ b/gl/stat-w32.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Core of implementation of fstat and stat for native Windows. | 1 | /* Core of implementation of fstat and stat for native Windows. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Work around platform bugs in stat. | 1 | /* Work around platform bugs in stat. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -42,14 +42,7 @@ orig_stat (const char *filename, struct stat *buf) | |||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | /* Specification. */ | 44 | /* Specification. */ |
| 45 | #ifdef __osf__ | 45 | #include <sys/stat.h> |
| 46 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | ||
| 47 | eliminates this include because of the preliminary #include <sys/stat.h> | ||
| 48 | above. */ | ||
| 49 | # include "sys/stat.h" | ||
| 50 | #else | ||
| 51 | # include <sys/stat.h> | ||
| 52 | #endif | ||
| 53 | 46 | ||
| 54 | #include "stat-time.h" | 47 | #include "stat-time.h" |
| 55 | 48 | ||
| @@ -119,7 +112,7 @@ rpl_stat (char const *name, struct stat *buf) | |||
| 119 | <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file> ? */ | 112 | <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file> ? */ |
| 120 | 113 | ||
| 121 | /* To ease portability. Like in open.c. */ | 114 | /* To ease portability. Like in open.c. */ |
| 122 | if (strcmp (name, "/dev/null") == 0) | 115 | if (streq (name, "/dev/null")) |
| 123 | name = "NUL"; | 116 | name = "NUL"; |
| 124 | 117 | ||
| 125 | /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13> | 118 | /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13> |
| @@ -294,8 +287,7 @@ rpl_stat (char const *name, struct stat *buf) | |||
| 294 | if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) | 287 | if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) |
| 295 | { | 288 | { |
| 296 | const char *last_dot = NULL; | 289 | const char *last_dot = NULL; |
| 297 | const char *p; | 290 | for (const char *p = info.cFileName; *p != '\0'; p++) |
| 298 | for (p = info.cFileName; *p != '\0'; p++) | ||
| 299 | if (*p == '.') | 291 | if (*p == '.') |
| 300 | last_dot = p; | 292 | last_dot = p; |
| 301 | if (last_dot != NULL) | 293 | if (last_dot != NULL) |
diff --git a/gl/stdckdint.in.h b/gl/stdckdint.in.h index bb9089b4..ac12fd6c 100644 --- a/gl/stdckdint.in.h +++ b/gl/stdckdint.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stdckdint.h -- checked integer arithmetic | 1 | /* stdckdint.h -- checked integer arithmetic |
| 2 | 2 | ||
| 3 | Copyright 2022-2025 Free Software Foundation, Inc. | 3 | Copyright 2022-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU Lesser General Public License as published | 6 | under the terms of the GNU Lesser General Public License as published |
diff --git a/gl/stddef.in.h b/gl/stddef.in.h index e8c55ff1..2fe9e044 100644 --- a/gl/stddef.in.h +++ b/gl/stddef.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. | 1 | /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. |
| 2 | 2 | ||
| 3 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -32,7 +32,7 @@ | |||
| 32 | || defined __need_wint_t) \ | 32 | || defined __need_wint_t) \ |
| 33 | /* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \ | 33 | /* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \ |
| 34 | in GCC 13.3 and 14.2 \ | 34 | in GCC 13.3 and 14.2 \ |
| 35 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870>. */ \ | 35 | <https://gcc.gnu.org/PR114870>. */ \ |
| 36 | && !@STDDEF_NOT_IDEMPOTENT@ | 36 | && !@STDDEF_NOT_IDEMPOTENT@ |
| 37 | /* Special invocation convention inside gcc header files. In | 37 | /* Special invocation convention inside gcc header files. In |
| 38 | particular, <stddef.h> in some ancient versions of GCC blindly | 38 | particular, <stddef.h> in some ancient versions of GCC blindly |
| @@ -91,7 +91,7 @@ typedef long max_align_t; | |||
| 91 | 91 | ||
| 92 | # if !defined _GCC_NULLPTR_T && !@NULLPTR_T_NEEDS_STDDEF@ | 92 | # if !defined _GCC_NULLPTR_T && !@NULLPTR_T_NEEDS_STDDEF@ |
| 93 | /* Suppress unwanted nullptr_t typedef. See | 93 | /* Suppress unwanted nullptr_t typedef. See |
| 94 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869>. */ | 94 | <https://gcc.gnu.org/PR114869>. */ |
| 95 | # define _GCC_NULLPTR_T | 95 | # define _GCC_NULLPTR_T |
| 96 | # endif | 96 | # endif |
| 97 | 97 | ||
diff --git a/gl/stdint.in.h b/gl/stdint.in.h index ca566b30..f6066094 100644 --- a/gl/stdint.in.h +++ b/gl/stdint.in.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2001-2002, 2004-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2001-2002, 2004-2026 Free Software Foundation, Inc. |
| 2 | Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. | 2 | Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | 4 | ||
| @@ -51,13 +51,6 @@ | |||
| 51 | in public interfaces due to compiler differences. */ | 51 | in public interfaces due to compiler differences. */ |
| 52 | 52 | ||
| 53 | #if @HAVE_STDINT_H@ | 53 | #if @HAVE_STDINT_H@ |
| 54 | # if defined __sgi && ! defined __c99 | ||
| 55 | /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users | ||
| 56 | with "This header file is to be used only for c99 mode compilations" | ||
| 57 | diagnostics. */ | ||
| 58 | # define __STDINT_H__ | ||
| 59 | # endif | ||
| 60 | |||
| 61 | /* Some pre-C++11 <stdint.h> implementations need this. */ | 54 | /* Some pre-C++11 <stdint.h> implementations need this. */ |
| 62 | # ifdef __cplusplus | 55 | # ifdef __cplusplus |
| 63 | # ifndef __STDC_CONSTANT_MACROS | 56 | # ifndef __STDC_CONSTANT_MACROS |
| @@ -94,8 +87,8 @@ | |||
| 94 | 87 | ||
| 95 | #if ! @HAVE_C99_STDINT_H@ | 88 | #if ! @HAVE_C99_STDINT_H@ |
| 96 | 89 | ||
| 97 | /* <sys/types.h> defines some of the stdint.h types as well, on glibc, | 90 | /* <sys/types.h> defines some of the stdint.h types as well, on glibc and |
| 98 | IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). | 91 | OpenBSD 3.8 (via <machine/types.h>). |
| 99 | AIX 5.2 <sys/types.h> isn't needed and causes troubles. | 92 | AIX 5.2 <sys/types.h> isn't needed and causes troubles. |
| 100 | Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but | 93 | Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but |
| 101 | relies on the system <stdint.h> definitions, so include | 94 | relies on the system <stdint.h> definitions, so include |
| @@ -584,11 +577,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 584 | # endif | 577 | # endif |
| 585 | 578 | ||
| 586 | /* wchar_t limits */ | 579 | /* wchar_t limits */ |
| 587 | /* Get WCHAR_MIN, WCHAR_MAX. | 580 | /* Get WCHAR_MIN, WCHAR_MAX. */ |
| 588 | This include is not on the top, above, because on OSF/1 4.0 we have a | ||
| 589 | sequence of nested includes | ||
| 590 | <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes | ||
| 591 | <stdint.h> and assumes its types are already defined. */ | ||
| 592 | # if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) | 581 | # if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) |
| 593 | # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H | 582 | # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H |
| 594 | # include <wchar.h> | 583 | # include <wchar.h> |
diff --git a/gl/stdio-consolesafe.c b/gl/stdio-consolesafe.c index 80561a6d..f634de13 100644 --- a/gl/stdio-consolesafe.c +++ b/gl/stdio-consolesafe.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* msvcrt workarounds. | 1 | /* msvcrt workarounds. |
| 2 | Copyright (C) 2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2025-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -85,7 +85,7 @@ gl_consolesafe_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *fp) | |||
| 85 | specifiers as the mingw *printf functions. */ | 85 | specifiers as the mingw *printf functions. */ |
| 86 | 86 | ||
| 87 | static int | 87 | static int |
| 88 | vasprintf (char **resultp, const char *format, va_list args) | 88 | local_vasprintf (char **resultp, const char *format, va_list args) |
| 89 | { | 89 | { |
| 90 | /* First try: Use a stack-allocated buffer. */ | 90 | /* First try: Use a stack-allocated buffer. */ |
| 91 | char buf[2048]; | 91 | char buf[2048]; |
| @@ -123,6 +123,9 @@ vasprintf (char **resultp, const char *format, va_list args) | |||
| 123 | return nbytes; | 123 | return nbytes; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | # undef vasprintf | ||
| 127 | # define vasprintf local_vasprintf | ||
| 128 | |||
| 126 | # endif | 129 | # endif |
| 127 | 130 | ||
| 128 | /* Bypass the functions __mingw_[v][f]printf, that trigger a bug in msvcrt, | 131 | /* Bypass the functions __mingw_[v][f]printf, that trigger a bug in msvcrt, |
| @@ -133,8 +136,8 @@ int | |||
| 133 | gl_consolesafe_fprintf (FILE *restrict fp, const char *restrict format, ...) | 136 | gl_consolesafe_fprintf (FILE *restrict fp, const char *restrict format, ...) |
| 134 | { | 137 | { |
| 135 | va_list args; | 138 | va_list args; |
| 136 | char *tmpstring; | ||
| 137 | va_start (args, format); | 139 | va_start (args, format); |
| 140 | char *tmpstring; | ||
| 138 | int result = vasprintf (&tmpstring, format, args); | 141 | int result = vasprintf (&tmpstring, format, args); |
| 139 | va_end (args); | 142 | va_end (args); |
| 140 | if (result >= 0) | 143 | if (result >= 0) |
| @@ -151,8 +154,8 @@ int | |||
| 151 | gl_consolesafe_printf (const char *restrict format, ...) | 154 | gl_consolesafe_printf (const char *restrict format, ...) |
| 152 | { | 155 | { |
| 153 | va_list args; | 156 | va_list args; |
| 154 | char *tmpstring; | ||
| 155 | va_start (args, format); | 157 | va_start (args, format); |
| 158 | char *tmpstring; | ||
| 156 | int result = vasprintf (&tmpstring, format, args); | 159 | int result = vasprintf (&tmpstring, format, args); |
| 157 | va_end (args); | 160 | va_end (args); |
| 158 | if (result >= 0) | 161 | if (result >= 0) |
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h index e4a69a8d..c90f64df 100644 --- a/gl/stdio-impl.h +++ b/gl/stdio-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Implementation details of FILE streams. | 1 | /* Implementation details of FILE streams. |
| 2 | Copyright (C) 2007-2008, 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2008, 2010-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/stdio-read.c b/gl/stdio-read.c index 70452b48..0ca956dc 100644 --- a/gl/stdio-read.c +++ b/gl/stdio-read.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* POSIX compatible FILE stream read function. | 1 | /* POSIX compatible FILE stream read function. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -52,9 +52,8 @@ | |||
| 52 | return (EXPRESSION); \ | 52 | return (EXPRESSION); \ |
| 53 | else \ | 53 | else \ |
| 54 | { \ | 54 | { \ |
| 55 | RETTYPE ret; \ | ||
| 56 | SetLastError (0); \ | 55 | SetLastError (0); \ |
| 57 | ret = (EXPRESSION); \ | 56 | RETTYPE ret = (EXPRESSION); \ |
| 58 | if (FAILED) \ | 57 | if (FAILED) \ |
| 59 | { \ | 58 | { \ |
| 60 | if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \ | 59 | if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \ |
| @@ -86,11 +85,9 @@ | |||
| 86 | int | 85 | int |
| 87 | scanf (const char *format, ...) | 86 | scanf (const char *format, ...) |
| 88 | { | 87 | { |
| 89 | int retval; | ||
| 90 | va_list args; | 88 | va_list args; |
| 91 | |||
| 92 | va_start (args, format); | 89 | va_start (args, format); |
| 93 | retval = vfscanf (stdin, format, args); | 90 | int retval = vfscanf (stdin, format, args); |
| 94 | va_end (args); | 91 | va_end (args); |
| 95 | 92 | ||
| 96 | return retval; | 93 | return retval; |
| @@ -103,11 +100,9 @@ scanf (const char *format, ...) | |||
| 103 | int | 100 | int |
| 104 | fscanf (FILE *stream, const char *format, ...) | 101 | fscanf (FILE *stream, const char *format, ...) |
| 105 | { | 102 | { |
| 106 | int retval; | ||
| 107 | va_list args; | 103 | va_list args; |
| 108 | |||
| 109 | va_start (args, format); | 104 | va_start (args, format); |
| 110 | retval = vfscanf (stream, format, args); | 105 | int retval = vfscanf (stream, format, args); |
| 111 | va_end (args); | 106 | va_end (args); |
| 112 | 107 | ||
| 113 | return retval; | 108 | return retval; |
diff --git a/gl/stdio-write.c b/gl/stdio-write.c index 59ba8fc4..fc7f74fe 100644 --- a/gl/stdio-write.c +++ b/gl/stdio-write.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* POSIX compatible FILE stream write function. | 1 | /* POSIX compatible FILE stream write function. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -107,10 +107,9 @@ | |||
| 107 | return (EXPRESSION); \ | 107 | return (EXPRESSION); \ |
| 108 | else \ | 108 | else \ |
| 109 | { \ | 109 | { \ |
| 110 | RETTYPE ret; \ | ||
| 111 | CLEAR_ERRNO \ | 110 | CLEAR_ERRNO \ |
| 112 | CLEAR_LastError \ | 111 | CLEAR_LastError \ |
| 113 | ret = (EXPRESSION); \ | 112 | RETTYPE ret = (EXPRESSION); \ |
| 114 | if (FAILED) \ | 113 | if (FAILED) \ |
| 115 | { \ | 114 | { \ |
| 116 | HANDLE_ENOSPC \ | 115 | HANDLE_ENOSPC \ |
| @@ -124,11 +123,9 @@ | |||
| 124 | int | 123 | int |
| 125 | printf (const char *format, ...) | 124 | printf (const char *format, ...) |
| 126 | { | 125 | { |
| 127 | int retval; | ||
| 128 | va_list args; | 126 | va_list args; |
| 129 | |||
| 130 | va_start (args, format); | 127 | va_start (args, format); |
| 131 | retval = vfprintf (stdout, format, args); | 128 | int retval = vfprintf (stdout, format, args); |
| 132 | va_end (args); | 129 | va_end (args); |
| 133 | 130 | ||
| 134 | return retval; | 131 | return retval; |
| @@ -139,11 +136,9 @@ printf (const char *format, ...) | |||
| 139 | int | 136 | int |
| 140 | fprintf (FILE *stream, const char *format, ...) | 137 | fprintf (FILE *stream, const char *format, ...) |
| 141 | { | 138 | { |
| 142 | int retval; | ||
| 143 | va_list args; | 139 | va_list args; |
| 144 | |||
| 145 | va_start (args, format); | 140 | va_start (args, format); |
| 146 | retval = vfprintf (stream, format, args); | 141 | int retval = vfprintf (stream, format, args); |
| 147 | va_end (args); | 142 | va_end (args); |
| 148 | 143 | ||
| 149 | return retval; | 144 | return retval; |
diff --git a/gl/stdio.in.h b/gl/stdio.in.h index bc454454..33b0b8e4 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <stdio.h>. | 1 | /* A GNU-like <stdio.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2004, 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -22,12 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #if defined __need_FILE || defined __need___FILE || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H || defined _GL_SKIP_GNULIB_STDIO_H | 23 | #if defined __need_FILE || defined __need___FILE || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H || defined _GL_SKIP_GNULIB_STDIO_H |
| 24 | /* Special invocation convention: | 24 | /* Special invocation convention: |
| 25 | - Inside glibc header files. | 25 | - Inside glibc header files. */ |
| 26 | - On OSF/1 5.1 we have a sequence of nested includes | ||
| 27 | <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> -> | ||
| 28 | <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>. | ||
| 29 | In this situation, the functions are not yet declared, therefore we cannot | ||
| 30 | provide the C++ aliases. */ | ||
| 31 | 26 | ||
| 32 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | 27 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ |
| 33 | 28 | ||
| @@ -269,10 +264,6 @@ | |||
| 269 | - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", | 264 | - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", |
| 270 | - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ | 265 | - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ |
| 271 | # define _PRINTF_NAN_LEN_MAX 10 | 266 | # define _PRINTF_NAN_LEN_MAX 10 |
| 272 | # elif defined __sgi | ||
| 273 | /* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal | ||
| 274 | digits. */ | ||
| 275 | # define _PRINTF_NAN_LEN_MAX 14 | ||
| 276 | # else | 267 | # else |
| 277 | /* We don't know, but 32 should be a safe maximum. */ | 268 | /* We don't know, but 32 should be a safe maximum. */ |
| 278 | # define _PRINTF_NAN_LEN_MAX 32 | 269 | # define _PRINTF_NAN_LEN_MAX 32 |
| @@ -347,7 +338,7 @@ _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); | |||
| 347 | _GL_CXXALIASWARN (dprintf); | 338 | _GL_CXXALIASWARN (dprintf); |
| 348 | # endif | 339 | # endif |
| 349 | #elif defined GNULIB_POSIXCHECK | 340 | #elif defined GNULIB_POSIXCHECK |
| 350 | # undef dprintf | 341 | # undef dprintf /* https://lists.gnu.org/r/bug-gnulib/2025-11/msg00254.html */ |
| 351 | # if HAVE_RAW_DECL_DPRINTF | 342 | # if HAVE_RAW_DECL_DPRINTF |
| 352 | _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " | 343 | _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " |
| 353 | "use gnulib module dprintf for portability"); | 344 | "use gnulib module dprintf for portability"); |
| @@ -369,7 +360,6 @@ _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); | |||
| 369 | _GL_CXXALIASWARN (fclose); | 360 | _GL_CXXALIASWARN (fclose); |
| 370 | # endif | 361 | # endif |
| 371 | #elif defined GNULIB_POSIXCHECK | 362 | #elif defined GNULIB_POSIXCHECK |
| 372 | # undef fclose | ||
| 373 | /* Assume fclose is always declared. */ | 363 | /* Assume fclose is always declared. */ |
| 374 | _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " | 364 | _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " |
| 375 | "use gnulib module fclose for portable POSIX compliance"); | 365 | "use gnulib module fclose for portable POSIX compliance"); |
| @@ -456,7 +446,6 @@ _GL_FUNCDECL_SYS (fdopen, FILE *, | |||
| 456 | # endif | 446 | # endif |
| 457 | # endif | 447 | # endif |
| 458 | # if defined GNULIB_POSIXCHECK | 448 | # if defined GNULIB_POSIXCHECK |
| 459 | # undef fdopen | ||
| 460 | /* Assume fdopen is always declared. */ | 449 | /* Assume fdopen is always declared. */ |
| 461 | _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " | 450 | _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " |
| 462 | "use gnulib module fdopen for portability"); | 451 | "use gnulib module fdopen for portability"); |
| @@ -497,7 +486,6 @@ _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); | |||
| 497 | _GL_CXXALIASWARN (fflush); | 486 | _GL_CXXALIASWARN (fflush); |
| 498 | # endif | 487 | # endif |
| 499 | #elif defined GNULIB_POSIXCHECK | 488 | #elif defined GNULIB_POSIXCHECK |
| 500 | # undef fflush | ||
| 501 | /* Assume fflush is always declared. */ | 489 | /* Assume fflush is always declared. */ |
| 502 | _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " | 490 | _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " |
| 503 | "use gnulib module fflush for portable POSIX compliance"); | 491 | "use gnulib module fflush for portable POSIX compliance"); |
| @@ -590,7 +578,6 @@ _GL_FUNCDECL_SYS (fopen, FILE *, | |||
| 590 | _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); | 578 | _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); |
| 591 | # endif | 579 | # endif |
| 592 | # if defined GNULIB_POSIXCHECK | 580 | # if defined GNULIB_POSIXCHECK |
| 593 | # undef fopen | ||
| 594 | /* Assume fopen is always declared. */ | 581 | /* Assume fopen is always declared. */ |
| 595 | _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " | 582 | _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " |
| 596 | "use gnulib module fopen for portability"); | 583 | "use gnulib module fopen for portability"); |
| @@ -650,9 +637,6 @@ _GL_CXXALIASWARN (fprintf); | |||
| 650 | # endif | 637 | # endif |
| 651 | #endif | 638 | #endif |
| 652 | #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | 639 | #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK |
| 653 | # if !GNULIB_overrides_fprintf | ||
| 654 | # undef fprintf | ||
| 655 | # endif | ||
| 656 | /* Assume fprintf is always declared. */ | 640 | /* Assume fprintf is always declared. */ |
| 657 | _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " | 641 | _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " |
| 658 | "use gnulib module fprintf-posix for portable " | 642 | "use gnulib module fprintf-posix for portable " |
| @@ -682,7 +666,6 @@ _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); | |||
| 682 | _GL_CXXALIASWARN (fpurge); | 666 | _GL_CXXALIASWARN (fpurge); |
| 683 | # endif | 667 | # endif |
| 684 | #elif defined GNULIB_POSIXCHECK | 668 | #elif defined GNULIB_POSIXCHECK |
| 685 | # undef fpurge | ||
| 686 | # if HAVE_RAW_DECL_FPURGE | 669 | # if HAVE_RAW_DECL_FPURGE |
| 687 | _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " | 670 | _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " |
| 688 | "use gnulib module fpurge for portability"); | 671 | "use gnulib module fpurge for portability"); |
| @@ -770,7 +753,6 @@ _GL_CXXALIAS_SYS (freopen, FILE *, | |||
| 770 | _GL_CXXALIASWARN (freopen); | 753 | _GL_CXXALIASWARN (freopen); |
| 771 | # endif | 754 | # endif |
| 772 | #elif defined GNULIB_POSIXCHECK | 755 | #elif defined GNULIB_POSIXCHECK |
| 773 | # undef freopen | ||
| 774 | /* Assume freopen is always declared. */ | 756 | /* Assume freopen is always declared. */ |
| 775 | _GL_WARN_ON_USE (freopen, | 757 | _GL_WARN_ON_USE (freopen, |
| 776 | "freopen on native Windows platforms is not POSIX compliant - " | 758 | "freopen on native Windows platforms is not POSIX compliant - " |
| @@ -877,7 +859,6 @@ _GL_CXXALIASWARN (fseeko); | |||
| 877 | #elif defined GNULIB_POSIXCHECK | 859 | #elif defined GNULIB_POSIXCHECK |
| 878 | # define _GL_FSEEK_WARN /* Category 1, above. */ | 860 | # define _GL_FSEEK_WARN /* Category 1, above. */ |
| 879 | # undef fseek | 861 | # undef fseek |
| 880 | # undef fseeko | ||
| 881 | # if HAVE_RAW_DECL_FSEEKO | 862 | # if HAVE_RAW_DECL_FSEEKO |
| 882 | _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " | 863 | _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " |
| 883 | "use gnulib module fseeko for portability"); | 864 | "use gnulib module fseeko for portability"); |
| @@ -941,7 +922,6 @@ _GL_CXXALIASWARN (ftello); | |||
| 941 | #elif defined GNULIB_POSIXCHECK | 922 | #elif defined GNULIB_POSIXCHECK |
| 942 | # define _GL_FTELL_WARN /* Category 1, above. */ | 923 | # define _GL_FTELL_WARN /* Category 1, above. */ |
| 943 | # undef ftell | 924 | # undef ftell |
| 944 | # undef ftello | ||
| 945 | # if HAVE_RAW_DECL_FTELLO | 925 | # if HAVE_RAW_DECL_FTELLO |
| 946 | _GL_WARN_ON_USE (ftello, "ftello is unportable - " | 926 | _GL_WARN_ON_USE (ftello, "ftello is unportable - " |
| 947 | "use gnulib module ftello for portability"); | 927 | "use gnulib module ftello for portability"); |
| @@ -977,7 +957,7 @@ _GL_CXXALIAS_SYS (fwrite, size_t, | |||
| 977 | FILE *restrict stream)); | 957 | FILE *restrict stream)); |
| 978 | 958 | ||
| 979 | /* Work around bug 11959 when fortifying glibc 2.4 through 2.15 | 959 | /* Work around bug 11959 when fortifying glibc 2.4 through 2.15 |
| 980 | <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>, | 960 | <https://sourceware.org/PR11959>, |
| 981 | which sometimes causes an unwanted diagnostic for fwrite calls. | 961 | which sometimes causes an unwanted diagnostic for fwrite calls. |
| 982 | This affects only function declaration attributes under certain | 962 | This affects only function declaration attributes under certain |
| 983 | versions of gcc and clang, and is not needed for C++. */ | 963 | versions of gcc and clang, and is not needed for C++. */ |
| @@ -1053,6 +1033,17 @@ _GL_CXXALIASWARN (getchar); | |||
| 1053 | # undef getdelim | 1033 | # undef getdelim |
| 1054 | # define getdelim rpl_getdelim | 1034 | # define getdelim rpl_getdelim |
| 1055 | # endif | 1035 | # endif |
| 1036 | # ifndef __has_feature | ||
| 1037 | # define __has_feature(a) 0 | ||
| 1038 | # endif | ||
| 1039 | # if __GLIBC__ >= 2 && !(defined __SANITIZE_ADDRESS__ \ | ||
| 1040 | || __has_feature (address_sanitizer)) | ||
| 1041 | /* Arrange for the inline definition of getline() in <bits/stdio.h> | ||
| 1042 | to call our getdelim() override. Do not use the __getdelim symbol | ||
| 1043 | if address sanitizer is in use, otherwise it may be overridden by | ||
| 1044 | __interceptor_trampoline___getdelim. */ | ||
| 1045 | # define rpl_getdelim __getdelim | ||
| 1046 | # endif | ||
| 1056 | _GL_FUNCDECL_RPL (getdelim, ssize_t, | 1047 | _GL_FUNCDECL_RPL (getdelim, ssize_t, |
| 1057 | (char **restrict lineptr, size_t *restrict linesize, | 1048 | (char **restrict lineptr, size_t *restrict linesize, |
| 1058 | int delimiter, | 1049 | int delimiter, |
| @@ -1079,7 +1070,6 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, | |||
| 1079 | _GL_CXXALIASWARN (getdelim); | 1070 | _GL_CXXALIASWARN (getdelim); |
| 1080 | # endif | 1071 | # endif |
| 1081 | #elif defined GNULIB_POSIXCHECK | 1072 | #elif defined GNULIB_POSIXCHECK |
| 1082 | # undef getdelim | ||
| 1083 | # if HAVE_RAW_DECL_GETDELIM | 1073 | # if HAVE_RAW_DECL_GETDELIM |
| 1084 | _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " | 1074 | _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " |
| 1085 | "use gnulib module getdelim for portability"); | 1075 | "use gnulib module getdelim for portability"); |
| @@ -1094,14 +1084,27 @@ _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " | |||
| 1094 | Return the number of bytes read and stored at *LINEPTR (not including the | 1084 | Return the number of bytes read and stored at *LINEPTR (not including the |
| 1095 | NUL terminator), or -1 on error or EOF. */ | 1085 | NUL terminator), or -1 on error or EOF. */ |
| 1096 | # if @REPLACE_GETLINE@ | 1086 | # if @REPLACE_GETLINE@ |
| 1097 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1098 | # undef getline | ||
| 1099 | # define getline rpl_getline | ||
| 1100 | # endif | ||
| 1101 | _GL_FUNCDECL_RPL (getline, ssize_t, | 1087 | _GL_FUNCDECL_RPL (getline, ssize_t, |
| 1102 | (char **restrict lineptr, size_t *restrict linesize, | 1088 | (char **restrict lineptr, size_t *restrict linesize, |
| 1103 | FILE *restrict stream), | 1089 | FILE *restrict stream), |
| 1104 | _GL_ARG_NONNULL ((1, 2, 3)) _GL_ATTRIBUTE_NODISCARD); | 1090 | _GL_ARG_NONNULL ((1, 2, 3)) _GL_ATTRIBUTE_NODISCARD); |
| 1091 | # if defined __cplusplus | ||
| 1092 | /* The C++ standard library defines std::basic_istream::getline in <istream> | ||
| 1093 | or <string>. */ | ||
| 1094 | # if !(__GLIBC__ >= 2) | ||
| 1095 | extern "C" { | ||
| 1096 | inline ssize_t | ||
| 1097 | getline (char **restrict lineptr, size_t *restrict linesize, | ||
| 1098 | FILE *restrict stream) | ||
| 1099 | { | ||
| 1100 | return rpl_getline (lineptr, linesize, stream); | ||
| 1101 | } | ||
| 1102 | } | ||
| 1103 | # endif | ||
| 1104 | # else | ||
| 1105 | # undef getline | ||
| 1106 | # define getline rpl_getline | ||
| 1107 | # endif | ||
| 1105 | _GL_CXXALIAS_RPL (getline, ssize_t, | 1108 | _GL_CXXALIAS_RPL (getline, ssize_t, |
| 1106 | (char **restrict lineptr, size_t *restrict linesize, | 1109 | (char **restrict lineptr, size_t *restrict linesize, |
| 1107 | FILE *restrict stream)); | 1110 | FILE *restrict stream)); |
| @@ -1120,7 +1123,6 @@ _GL_CXXALIAS_SYS (getline, ssize_t, | |||
| 1120 | _GL_CXXALIASWARN (getline); | 1123 | _GL_CXXALIASWARN (getline); |
| 1121 | # endif | 1124 | # endif |
| 1122 | #elif defined GNULIB_POSIXCHECK | 1125 | #elif defined GNULIB_POSIXCHECK |
| 1123 | # undef getline | ||
| 1124 | # if HAVE_RAW_DECL_GETLINE | 1126 | # if HAVE_RAW_DECL_GETLINE |
| 1125 | _GL_WARN_ON_USE (getline, "getline is unportable - " | 1127 | _GL_WARN_ON_USE (getline, "getline is unportable - " |
| 1126 | "use gnulib module getline for portability"); | 1128 | "use gnulib module getline for portability"); |
| @@ -1130,7 +1132,6 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " | |||
| 1130 | /* It is very rare that the developer ever has full control of stdin, | 1132 | /* It is very rare that the developer ever has full control of stdin, |
| 1131 | so any use of gets warrants an unconditional warning; besides, C11 | 1133 | so any use of gets warrants an unconditional warning; besides, C11 |
| 1132 | removed it. */ | 1134 | removed it. */ |
| 1133 | #undef gets | ||
| 1134 | #if HAVE_RAW_DECL_GETS && !defined __cplusplus | 1135 | #if HAVE_RAW_DECL_GETS && !defined __cplusplus |
| 1135 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | 1136 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); |
| 1136 | #endif | 1137 | #endif |
| @@ -1243,7 +1244,6 @@ _GL_FUNCDECL_SYS (pclose, int, (FILE *stream), _GL_ARG_NONNULL ((1))); | |||
| 1243 | _GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); | 1244 | _GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); |
| 1244 | _GL_CXXALIASWARN (pclose); | 1245 | _GL_CXXALIASWARN (pclose); |
| 1245 | #elif defined GNULIB_POSIXCHECK | 1246 | #elif defined GNULIB_POSIXCHECK |
| 1246 | # undef pclose | ||
| 1247 | # if HAVE_RAW_DECL_PCLOSE | 1247 | # if HAVE_RAW_DECL_PCLOSE |
| 1248 | _GL_WARN_ON_USE (pclose, "pclose is unportable - " | 1248 | _GL_WARN_ON_USE (pclose, "pclose is unportable - " |
| 1249 | "use gnulib module pclose for more portability"); | 1249 | "use gnulib module pclose for more portability"); |
| @@ -1267,7 +1267,6 @@ _GL_CXXALIAS_SYS (perror, void, (const char *string)); | |||
| 1267 | _GL_CXXALIASWARN (perror); | 1267 | _GL_CXXALIASWARN (perror); |
| 1268 | # endif | 1268 | # endif |
| 1269 | #elif defined GNULIB_POSIXCHECK | 1269 | #elif defined GNULIB_POSIXCHECK |
| 1270 | # undef perror | ||
| 1271 | /* Assume perror is always declared. */ | 1270 | /* Assume perror is always declared. */ |
| 1272 | _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " | 1271 | _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " |
| 1273 | "use gnulib module perror for portability"); | 1272 | "use gnulib module perror for portability"); |
| @@ -1304,7 +1303,6 @@ _GL_FUNCDECL_SYS (popen, FILE *, | |||
| 1304 | _GL_ATTRIBUTE_MALLOC); | 1303 | _GL_ATTRIBUTE_MALLOC); |
| 1305 | # endif | 1304 | # endif |
| 1306 | # if defined GNULIB_POSIXCHECK | 1305 | # if defined GNULIB_POSIXCHECK |
| 1307 | # undef popen | ||
| 1308 | # if HAVE_RAW_DECL_POPEN | 1306 | # if HAVE_RAW_DECL_POPEN |
| 1309 | _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " | 1307 | _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " |
| 1310 | "use gnulib module popen or pipe for more portability"); | 1308 | "use gnulib module popen or pipe for more portability"); |
| @@ -1377,9 +1375,6 @@ _GL_CXXALIASWARN (printf); | |||
| 1377 | # endif | 1375 | # endif |
| 1378 | #endif | 1376 | #endif |
| 1379 | #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK | 1377 | #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK |
| 1380 | # if !GNULIB_overrides_printf | ||
| 1381 | # undef printf | ||
| 1382 | # endif | ||
| 1383 | /* Assume printf is always declared. */ | 1378 | /* Assume printf is always declared. */ |
| 1384 | _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " | 1379 | _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " |
| 1385 | "use gnulib module printf-posix for portable " | 1380 | "use gnulib module printf-posix for portable " |
| @@ -1473,7 +1468,6 @@ _GL_CXXALIAS_SYS (remove, int, (const char *name)); | |||
| 1473 | _GL_CXXALIASWARN (remove); | 1468 | _GL_CXXALIASWARN (remove); |
| 1474 | # endif | 1469 | # endif |
| 1475 | #elif defined GNULIB_POSIXCHECK | 1470 | #elif defined GNULIB_POSIXCHECK |
| 1476 | # undef remove | ||
| 1477 | /* Assume remove is always declared. */ | 1471 | /* Assume remove is always declared. */ |
| 1478 | _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " | 1472 | _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " |
| 1479 | "use gnulib module remove for more portability"); | 1473 | "use gnulib module remove for more portability"); |
| @@ -1498,7 +1492,6 @@ _GL_CXXALIAS_SYS (rename, int, | |||
| 1498 | _GL_CXXALIASWARN (rename); | 1492 | _GL_CXXALIASWARN (rename); |
| 1499 | # endif | 1493 | # endif |
| 1500 | #elif defined GNULIB_POSIXCHECK | 1494 | #elif defined GNULIB_POSIXCHECK |
| 1501 | # undef rename | ||
| 1502 | /* Assume rename is always declared. */ | 1495 | /* Assume rename is always declared. */ |
| 1503 | _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " | 1496 | _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " |
| 1504 | "use gnulib module rename for more portability"); | 1497 | "use gnulib module rename for more portability"); |
| @@ -1526,7 +1519,6 @@ _GL_CXXALIAS_SYS (renameat, int, | |||
| 1526 | # endif | 1519 | # endif |
| 1527 | _GL_CXXALIASWARN (renameat); | 1520 | _GL_CXXALIASWARN (renameat); |
| 1528 | #elif defined GNULIB_POSIXCHECK | 1521 | #elif defined GNULIB_POSIXCHECK |
| 1529 | # undef renameat | ||
| 1530 | # if HAVE_RAW_DECL_RENAMEAT | 1522 | # if HAVE_RAW_DECL_RENAMEAT |
| 1531 | _GL_WARN_ON_USE (renameat, "renameat is not portable - " | 1523 | _GL_WARN_ON_USE (renameat, "renameat is not portable - " |
| 1532 | "use gnulib module renameat for portability"); | 1524 | "use gnulib module renameat for portability"); |
| @@ -1620,7 +1612,6 @@ _GL_CXXALIAS_SYS (snprintf, int, | |||
| 1620 | _GL_CXXALIASWARN (snprintf); | 1612 | _GL_CXXALIASWARN (snprintf); |
| 1621 | # endif | 1613 | # endif |
| 1622 | #elif defined GNULIB_POSIXCHECK | 1614 | #elif defined GNULIB_POSIXCHECK |
| 1623 | # undef snprintf | ||
| 1624 | # if HAVE_RAW_DECL_SNPRINTF | 1615 | # if HAVE_RAW_DECL_SNPRINTF |
| 1625 | _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " | 1616 | _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " |
| 1626 | "use gnulib module snprintf for portability"); | 1617 | "use gnulib module snprintf for portability"); |
| @@ -1676,7 +1667,6 @@ _GL_CXXALIAS_SYS (sprintf, int, | |||
| 1676 | _GL_CXXALIASWARN (sprintf); | 1667 | _GL_CXXALIASWARN (sprintf); |
| 1677 | # endif | 1668 | # endif |
| 1678 | #elif defined GNULIB_POSIXCHECK | 1669 | #elif defined GNULIB_POSIXCHECK |
| 1679 | # undef sprintf | ||
| 1680 | /* Assume sprintf is always declared. */ | 1670 | /* Assume sprintf is always declared. */ |
| 1681 | _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " | 1671 | _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " |
| 1682 | "use gnulib module sprintf-posix for portable " | 1672 | "use gnulib module sprintf-posix for portable " |
| @@ -1731,7 +1721,6 @@ _GL_FUNCDECL_SYS (tmpfile, FILE *, (void), | |||
| 1731 | _GL_ATTRIBUTE_MALLOC); | 1721 | _GL_ATTRIBUTE_MALLOC); |
| 1732 | # endif | 1722 | # endif |
| 1733 | # if defined GNULIB_POSIXCHECK | 1723 | # if defined GNULIB_POSIXCHECK |
| 1734 | # undef tmpfile | ||
| 1735 | # if HAVE_RAW_DECL_TMPFILE | 1724 | # if HAVE_RAW_DECL_TMPFILE |
| 1736 | _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " | 1725 | _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " |
| 1737 | "use gnulib module tmpfile for portability"); | 1726 | "use gnulib module tmpfile for portability"); |
| @@ -1865,7 +1854,6 @@ _GL_CXXALIAS_SYS_CAST (vdprintf, int, | |||
| 1865 | _GL_CXXALIASWARN (vdprintf); | 1854 | _GL_CXXALIASWARN (vdprintf); |
| 1866 | # endif | 1855 | # endif |
| 1867 | #elif defined GNULIB_POSIXCHECK | 1856 | #elif defined GNULIB_POSIXCHECK |
| 1868 | # undef vdprintf | ||
| 1869 | # if HAVE_RAW_DECL_VDPRINTF | 1857 | # if HAVE_RAW_DECL_VDPRINTF |
| 1870 | _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " | 1858 | _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " |
| 1871 | "use gnulib module vdprintf for portability"); | 1859 | "use gnulib module vdprintf for portability"); |
| @@ -1934,9 +1922,6 @@ _GL_CXXALIASWARN (vfprintf); | |||
| 1934 | # endif | 1922 | # endif |
| 1935 | #endif | 1923 | #endif |
| 1936 | #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | 1924 | #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK |
| 1937 | # if !GNULIB_overrides_vfprintf | ||
| 1938 | # undef vfprintf | ||
| 1939 | # endif | ||
| 1940 | /* Assume vfprintf is always declared. */ | 1925 | /* Assume vfprintf is always declared. */ |
| 1941 | _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " | 1926 | _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " |
| 1942 | "use gnulib module vfprintf-posix for portable " | 1927 | "use gnulib module vfprintf-posix for portable " |
| @@ -2020,9 +2005,6 @@ _GL_CXXALIASWARN (vprintf); | |||
| 2020 | # endif | 2005 | # endif |
| 2021 | #endif | 2006 | #endif |
| 2022 | #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | 2007 | #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK |
| 2023 | # if !GNULIB_overrides_vprintf | ||
| 2024 | # undef vprintf | ||
| 2025 | # endif | ||
| 2026 | /* Assume vprintf is always declared. */ | 2008 | /* Assume vprintf is always declared. */ |
| 2027 | _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " | 2009 | _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " |
| 2028 | "use gnulib module vprintf-posix for portable " | 2010 | "use gnulib module vprintf-posix for portable " |
| @@ -2101,7 +2083,6 @@ _GL_CXXALIAS_SYS (vsnprintf, int, | |||
| 2101 | _GL_CXXALIASWARN (vsnprintf); | 2083 | _GL_CXXALIASWARN (vsnprintf); |
| 2102 | # endif | 2084 | # endif |
| 2103 | #elif defined GNULIB_POSIXCHECK | 2085 | #elif defined GNULIB_POSIXCHECK |
| 2104 | # undef vsnprintf | ||
| 2105 | # if HAVE_RAW_DECL_VSNPRINTF | 2086 | # if HAVE_RAW_DECL_VSNPRINTF |
| 2106 | _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " | 2087 | _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " |
| 2107 | "use gnulib module vsnprintf for portability"); | 2088 | "use gnulib module vsnprintf for portability"); |
| @@ -2154,7 +2135,6 @@ _GL_CXXALIAS_SYS_CAST (vsprintf, int, | |||
| 2154 | _GL_CXXALIASWARN (vsprintf); | 2135 | _GL_CXXALIASWARN (vsprintf); |
| 2155 | # endif | 2136 | # endif |
| 2156 | #elif defined GNULIB_POSIXCHECK | 2137 | #elif defined GNULIB_POSIXCHECK |
| 2157 | # undef vsprintf | ||
| 2158 | /* Assume vsprintf is always declared. */ | 2138 | /* Assume vsprintf is always declared. */ |
| 2159 | _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " | 2139 | _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " |
| 2160 | "use gnulib module vsprintf-posix for portable " | 2140 | "use gnulib module vsprintf-posix for portable " |
diff --git a/gl/stdlib.c b/gl/stdlib.c index 6a06f5ba..f51a25c3 100644 --- a/gl/stdlib.c +++ b/gl/stdlib.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <stdlib.h>. | 1 | /* Inline functions for <stdlib.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 1342db48..95237f2a 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <stdlib.h>. | 1 | /* A GNU-like <stdlib.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 2001-2004, 2006-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1995, 2001-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -62,12 +62,6 @@ | |||
| 62 | /* NetBSD 5.0 mis-defines NULL. */ | 62 | /* NetBSD 5.0 mis-defines NULL. */ |
| 63 | #include <stddef.h> | 63 | #include <stddef.h> |
| 64 | 64 | ||
| 65 | /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. | ||
| 66 | glibc 2.41 defines WCOREDUMP in <sys/wait.h>, not in <stdlib.h>. */ | ||
| 67 | #if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP) | ||
| 68 | # include <sys/wait.h> | ||
| 69 | #endif | ||
| 70 | |||
| 71 | /* Solaris declares getloadavg() in <sys/loadavg.h>. */ | 65 | /* Solaris declares getloadavg() in <sys/loadavg.h>. */ |
| 72 | #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ | 66 | #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ |
| 73 | /* OpenIndiana has a bug: <sys/time.h> must be included before | 67 | /* OpenIndiana has a bug: <sys/time.h> must be included before |
| @@ -76,6 +70,11 @@ | |||
| 76 | # include <sys/loadavg.h> | 70 | # include <sys/loadavg.h> |
| 77 | #endif | 71 | #endif |
| 78 | 72 | ||
| 73 | /* QNX declares getprogname() in <sys/process.h>. */ | ||
| 74 | #if (@GNULIB_GETPROGNAME@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_PROCESS_H@ | ||
| 75 | # include <sys/process.h> | ||
| 76 | #endif | ||
| 77 | |||
| 79 | /* Native Windows platforms declare _mktemp() in <io.h>. */ | 78 | /* Native Windows platforms declare _mktemp() in <io.h>. */ |
| 80 | #if defined _WIN32 && !defined __CYGWIN__ | 79 | #if defined _WIN32 && !defined __CYGWIN__ |
| 81 | # include <io.h> | 80 | # include <io.h> |
| @@ -83,13 +82,6 @@ | |||
| 83 | 82 | ||
| 84 | #if @GNULIB_RANDOM_R@ | 83 | #if @GNULIB_RANDOM_R@ |
| 85 | 84 | ||
| 86 | /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included | ||
| 87 | from <stdlib.h> if _REENTRANT is defined. Include it whenever we need | ||
| 88 | 'struct random_data'. */ | ||
| 89 | # if @HAVE_RANDOM_H@ | ||
| 90 | # include <random.h> | ||
| 91 | # endif | ||
| 92 | |||
| 93 | # include <stdint.h> | 85 | # include <stdint.h> |
| 94 | 86 | ||
| 95 | # if !@HAVE_STRUCT_RANDOM_DATA@ | 87 | # if !@HAVE_STRUCT_RANDOM_DATA@ |
| @@ -237,9 +229,9 @@ _GL_INLINE_HEADER_BEGIN | |||
| 237 | 229 | ||
| 238 | /* Declarations for ISO C N3322. */ | 230 | /* Declarations for ISO C N3322. */ |
| 239 | #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ | 231 | #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ |
| 240 | _GL_EXTERN_C void *bsearch (const void *__key, | 232 | _GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) |
| 241 | const void *__base, size_t __nmemb, size_t __size, | 233 | (const void *__key, const void *__base, size_t __nmemb, size_t __size, |
| 242 | int (*__compare) (const void *, const void *)) | 234 | int (*__compare) (const void *, const void *)) |
| 243 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); | 235 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); |
| 244 | _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, | 236 | _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, |
| 245 | int (*__compare) (const void *, const void *)) | 237 | int (*__compare) (const void *, const void *)) |
| @@ -267,7 +259,6 @@ _GL_CXXALIAS_SYS (_Exit, void, (int status)); | |||
| 267 | _GL_CXXALIASWARN (_Exit); | 259 | _GL_CXXALIASWARN (_Exit); |
| 268 | # endif | 260 | # endif |
| 269 | #elif defined GNULIB_POSIXCHECK | 261 | #elif defined GNULIB_POSIXCHECK |
| 270 | # undef _Exit | ||
| 271 | # if HAVE_RAW_DECL__EXIT | 262 | # if HAVE_RAW_DECL__EXIT |
| 272 | _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " | 263 | _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " |
| 273 | "use gnulib module _Exit for portability"); | 264 | "use gnulib module _Exit for portability"); |
| @@ -314,7 +305,6 @@ _GL_CXXALIAS_SYS (free, void, (void *ptr)); | |||
| 314 | _GL_CXXALIASWARN (free); | 305 | _GL_CXXALIASWARN (free); |
| 315 | # endif | 306 | # endif |
| 316 | #elif defined GNULIB_POSIXCHECK | 307 | #elif defined GNULIB_POSIXCHECK |
| 317 | # undef free | ||
| 318 | /* Assume free is always declared. */ | 308 | /* Assume free is always declared. */ |
| 319 | _GL_WARN_ON_USE (free, "free is not POSIX:2024 compliant everywhere - " | 309 | _GL_WARN_ON_USE (free, "free is not POSIX:2024 compliant everywhere - " |
| 320 | "use gnulib module free-posix for portability"); | 310 | "use gnulib module free-posix for portability"); |
| @@ -372,7 +362,6 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *, | |||
| 372 | # endif | 362 | # endif |
| 373 | # endif | 363 | # endif |
| 374 | # if defined GNULIB_POSIXCHECK | 364 | # if defined GNULIB_POSIXCHECK |
| 375 | # undef aligned_alloc | ||
| 376 | # if HAVE_RAW_DECL_ALIGNED_ALLOC | 365 | # if HAVE_RAW_DECL_ALIGNED_ALLOC |
| 377 | _GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " | 366 | _GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " |
| 378 | "use gnulib module aligned_alloc for portability"); | 367 | "use gnulib module aligned_alloc for portability"); |
| @@ -392,7 +381,6 @@ _GL_FUNCDECL_SYS (atoll, long long, | |||
| 392 | _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); | 381 | _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); |
| 393 | _GL_CXXALIASWARN (atoll); | 382 | _GL_CXXALIASWARN (atoll); |
| 394 | #elif defined GNULIB_POSIXCHECK | 383 | #elif defined GNULIB_POSIXCHECK |
| 395 | # undef atoll | ||
| 396 | # if HAVE_RAW_DECL_ATOLL | 384 | # if HAVE_RAW_DECL_ATOLL |
| 397 | _GL_WARN_ON_USE (atoll, "atoll is unportable - " | 385 | _GL_WARN_ON_USE (atoll, "atoll is unportable - " |
| 398 | "use gnulib module atoll for portability"); | 386 | "use gnulib module atoll for portability"); |
| @@ -449,7 +437,6 @@ _GL_FUNCDECL_SYS (calloc, void *, | |||
| 449 | # endif | 437 | # endif |
| 450 | # endif | 438 | # endif |
| 451 | # if defined GNULIB_POSIXCHECK | 439 | # if defined GNULIB_POSIXCHECK |
| 452 | # undef calloc | ||
| 453 | /* Assume calloc is always declared. */ | 440 | /* Assume calloc is always declared. */ |
| 454 | _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " | 441 | _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " |
| 455 | "use gnulib module calloc-posix for portability"); | 442 | "use gnulib module calloc-posix for portability"); |
| @@ -510,7 +497,6 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, | |||
| 510 | # endif | 497 | # endif |
| 511 | # endif | 498 | # endif |
| 512 | # if defined GNULIB_POSIXCHECK | 499 | # if defined GNULIB_POSIXCHECK |
| 513 | # undef canonicalize_file_name | ||
| 514 | # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME | 500 | # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME |
| 515 | _GL_WARN_ON_USE (canonicalize_file_name, | 501 | _GL_WARN_ON_USE (canonicalize_file_name, |
| 516 | "canonicalize_file_name is unportable - " | 502 | "canonicalize_file_name is unportable - " |
| @@ -610,7 +596,6 @@ _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); | |||
| 610 | _GL_CXXALIASWARN (getloadavg); | 596 | _GL_CXXALIASWARN (getloadavg); |
| 611 | # endif | 597 | # endif |
| 612 | #elif defined GNULIB_POSIXCHECK | 598 | #elif defined GNULIB_POSIXCHECK |
| 613 | # undef getloadavg | ||
| 614 | # if HAVE_RAW_DECL_GETLOADAVG | 599 | # if HAVE_RAW_DECL_GETLOADAVG |
| 615 | _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " | 600 | _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " |
| 616 | "use gnulib module getloadavg for portability"); | 601 | "use gnulib module getloadavg for portability"); |
| @@ -645,7 +630,6 @@ _GL_CXXALIAS_SYS (getprogname, const char *, (void)); | |||
| 645 | _GL_CXXALIASWARN (getprogname); | 630 | _GL_CXXALIASWARN (getprogname); |
| 646 | # endif | 631 | # endif |
| 647 | #elif defined GNULIB_POSIXCHECK | 632 | #elif defined GNULIB_POSIXCHECK |
| 648 | # undef getprogname | ||
| 649 | # if HAVE_RAW_DECL_GETPROGNAME | 633 | # if HAVE_RAW_DECL_GETPROGNAME |
| 650 | _GL_WARN_ON_USE (getprogname, "getprogname is unportable - " | 634 | _GL_WARN_ON_USE (getprogname, "getprogname is unportable - " |
| 651 | "use gnulib module getprogname for portability"); | 635 | "use gnulib module getprogname for portability"); |
| @@ -687,7 +671,6 @@ _GL_CXXALIAS_SYS (getsubopt, int, | |||
| 687 | _GL_CXXALIASWARN (getsubopt); | 671 | _GL_CXXALIASWARN (getsubopt); |
| 688 | # endif | 672 | # endif |
| 689 | #elif defined GNULIB_POSIXCHECK | 673 | #elif defined GNULIB_POSIXCHECK |
| 690 | # undef getsubopt | ||
| 691 | # if HAVE_RAW_DECL_GETSUBOPT | 674 | # if HAVE_RAW_DECL_GETSUBOPT |
| 692 | _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " | 675 | _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " |
| 693 | "use gnulib module getsubopt for portability"); | 676 | "use gnulib module getsubopt for portability"); |
| @@ -703,7 +686,6 @@ _GL_FUNCDECL_SYS (grantpt, int, (int fd), ); | |||
| 703 | _GL_CXXALIAS_SYS (grantpt, int, (int fd)); | 686 | _GL_CXXALIAS_SYS (grantpt, int, (int fd)); |
| 704 | _GL_CXXALIASWARN (grantpt); | 687 | _GL_CXXALIASWARN (grantpt); |
| 705 | #elif defined GNULIB_POSIXCHECK | 688 | #elif defined GNULIB_POSIXCHECK |
| 706 | # undef grantpt | ||
| 707 | # if HAVE_RAW_DECL_GRANTPT | 689 | # if HAVE_RAW_DECL_GRANTPT |
| 708 | _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " | 690 | _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " |
| 709 | "use gnulib module grantpt for portability"); | 691 | "use gnulib module grantpt for portability"); |
| @@ -764,7 +746,6 @@ _GL_FUNCDECL_SYS (malloc, void *, | |||
| 764 | # endif | 746 | # endif |
| 765 | # endif | 747 | # endif |
| 766 | # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC | 748 | # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC |
| 767 | # undef malloc | ||
| 768 | /* Assume malloc is always declared. */ | 749 | /* Assume malloc is always declared. */ |
| 769 | _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " | 750 | _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " |
| 770 | "use gnulib module malloc-posix for portability"); | 751 | "use gnulib module malloc-posix for portability"); |
| @@ -815,7 +796,6 @@ _GL_CXXALIAS_SYS (mbstowcs, size_t, | |||
| 815 | _GL_CXXALIASWARN (mbstowcs); | 796 | _GL_CXXALIASWARN (mbstowcs); |
| 816 | # endif | 797 | # endif |
| 817 | #elif defined GNULIB_POSIXCHECK | 798 | #elif defined GNULIB_POSIXCHECK |
| 818 | # undef mbstowcs | ||
| 819 | # if HAVE_RAW_DECL_MBSTOWCS | 799 | # if HAVE_RAW_DECL_MBSTOWCS |
| 820 | _GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " | 800 | _GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " |
| 821 | "use gnulib module mbstowcs for portability"); | 801 | "use gnulib module mbstowcs for portability"); |
| @@ -845,7 +825,6 @@ _GL_CXXALIAS_SYS (mbtowc, int, | |||
| 845 | _GL_CXXALIASWARN (mbtowc); | 825 | _GL_CXXALIASWARN (mbtowc); |
| 846 | # endif | 826 | # endif |
| 847 | #elif defined GNULIB_POSIXCHECK | 827 | #elif defined GNULIB_POSIXCHECK |
| 848 | # undef mbtowc | ||
| 849 | # if HAVE_RAW_DECL_MBTOWC | 828 | # if HAVE_RAW_DECL_MBTOWC |
| 850 | _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " | 829 | _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " |
| 851 | "use gnulib module mbtowc for portability"); | 830 | "use gnulib module mbtowc for portability"); |
| @@ -866,7 +845,6 @@ _GL_FUNCDECL_SYS (mkdtemp, char *, | |||
| 866 | _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); | 845 | _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); |
| 867 | _GL_CXXALIASWARN (mkdtemp); | 846 | _GL_CXXALIASWARN (mkdtemp); |
| 868 | #elif defined GNULIB_POSIXCHECK | 847 | #elif defined GNULIB_POSIXCHECK |
| 869 | # undef mkdtemp | ||
| 870 | # if HAVE_RAW_DECL_MKDTEMP | 848 | # if HAVE_RAW_DECL_MKDTEMP |
| 871 | _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " | 849 | _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " |
| 872 | "use gnulib module mkdtemp for portability"); | 850 | "use gnulib module mkdtemp for portability"); |
| @@ -905,7 +883,6 @@ _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); | |||
| 905 | _GL_CXXALIASWARN (mkostemp); | 883 | _GL_CXXALIASWARN (mkostemp); |
| 906 | # endif | 884 | # endif |
| 907 | #elif defined GNULIB_POSIXCHECK | 885 | #elif defined GNULIB_POSIXCHECK |
| 908 | # undef mkostemp | ||
| 909 | # if HAVE_RAW_DECL_MKOSTEMP | 886 | # if HAVE_RAW_DECL_MKOSTEMP |
| 910 | _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " | 887 | _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " |
| 911 | "use gnulib module mkostemp for portability"); | 888 | "use gnulib module mkostemp for portability"); |
| @@ -949,7 +926,6 @@ _GL_CXXALIAS_SYS (mkostemps, int, | |||
| 949 | _GL_CXXALIASWARN (mkostemps); | 926 | _GL_CXXALIASWARN (mkostemps); |
| 950 | # endif | 927 | # endif |
| 951 | #elif defined GNULIB_POSIXCHECK | 928 | #elif defined GNULIB_POSIXCHECK |
| 952 | # undef mkostemps | ||
| 953 | # if HAVE_RAW_DECL_MKOSTEMPS | 929 | # if HAVE_RAW_DECL_MKOSTEMPS |
| 954 | _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " | 930 | _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " |
| 955 | "use gnulib module mkostemps for portability"); | 931 | "use gnulib module mkostemps for portability"); |
| @@ -982,7 +958,6 @@ _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); | |||
| 982 | # endif | 958 | # endif |
| 983 | _GL_CXXALIASWARN (mkstemp); | 959 | _GL_CXXALIASWARN (mkstemp); |
| 984 | #elif defined GNULIB_POSIXCHECK | 960 | #elif defined GNULIB_POSIXCHECK |
| 985 | # undef mkstemp | ||
| 986 | # if HAVE_RAW_DECL_MKSTEMP | 961 | # if HAVE_RAW_DECL_MKSTEMP |
| 987 | _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " | 962 | _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " |
| 988 | "use gnulib module mkstemp for portability"); | 963 | "use gnulib module mkstemp for portability"); |
| @@ -1007,7 +982,6 @@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/), | |||
| 1007 | _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); | 982 | _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); |
| 1008 | _GL_CXXALIASWARN (mkstemps); | 983 | _GL_CXXALIASWARN (mkstemps); |
| 1009 | #elif defined GNULIB_POSIXCHECK | 984 | #elif defined GNULIB_POSIXCHECK |
| 1010 | # undef mkstemps | ||
| 1011 | # if HAVE_RAW_DECL_MKSTEMPS | 985 | # if HAVE_RAW_DECL_MKSTEMPS |
| 1012 | _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " | 986 | _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " |
| 1013 | "use gnulib module mkstemps for portability"); | 987 | "use gnulib module mkstemps for portability"); |
| @@ -1052,7 +1026,6 @@ _GL_CXXALIAS_SYS (posix_memalign, int, | |||
| 1052 | _GL_CXXALIASWARN (posix_memalign); | 1026 | _GL_CXXALIASWARN (posix_memalign); |
| 1053 | # endif | 1027 | # endif |
| 1054 | #elif defined GNULIB_POSIXCHECK | 1028 | #elif defined GNULIB_POSIXCHECK |
| 1055 | # undef posix_memalign | ||
| 1056 | # if HAVE_RAW_DECL_POSIX_MEMALIGN | 1029 | # if HAVE_RAW_DECL_POSIX_MEMALIGN |
| 1057 | _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " | 1030 | _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " |
| 1058 | "use gnulib module posix_memalign for portability"); | 1031 | "use gnulib module posix_memalign for portability"); |
| @@ -1079,7 +1052,6 @@ _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); | |||
| 1079 | _GL_CXXALIASWARN (posix_openpt); | 1052 | _GL_CXXALIASWARN (posix_openpt); |
| 1080 | # endif | 1053 | # endif |
| 1081 | #elif defined GNULIB_POSIXCHECK | 1054 | #elif defined GNULIB_POSIXCHECK |
| 1082 | # undef posix_openpt | ||
| 1083 | # if HAVE_RAW_DECL_POSIX_OPENPT | 1055 | # if HAVE_RAW_DECL_POSIX_OPENPT |
| 1084 | _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " | 1056 | _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " |
| 1085 | "use gnulib module posix_openpt for portability"); | 1057 | "use gnulib module posix_openpt for portability"); |
| @@ -1104,7 +1076,6 @@ _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); | |||
| 1104 | # endif | 1076 | # endif |
| 1105 | _GL_CXXALIASWARN (ptsname); | 1077 | _GL_CXXALIASWARN (ptsname); |
| 1106 | #elif defined GNULIB_POSIXCHECK | 1078 | #elif defined GNULIB_POSIXCHECK |
| 1107 | # undef ptsname | ||
| 1108 | # if HAVE_RAW_DECL_PTSNAME | 1079 | # if HAVE_RAW_DECL_PTSNAME |
| 1109 | _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " | 1080 | _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " |
| 1110 | "use gnulib module ptsname for portability"); | 1081 | "use gnulib module ptsname for portability"); |
| @@ -1133,7 +1104,6 @@ _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); | |||
| 1133 | # endif | 1104 | # endif |
| 1134 | _GL_CXXALIASWARN (ptsname_r); | 1105 | _GL_CXXALIASWARN (ptsname_r); |
| 1135 | #elif defined GNULIB_POSIXCHECK | 1106 | #elif defined GNULIB_POSIXCHECK |
| 1136 | # undef ptsname_r | ||
| 1137 | # if HAVE_RAW_DECL_PTSNAME_R | 1107 | # if HAVE_RAW_DECL_PTSNAME_R |
| 1138 | _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " | 1108 | _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " |
| 1139 | "use gnulib module ptsname_r for portability"); | 1109 | "use gnulib module ptsname_r for portability"); |
| @@ -1227,7 +1197,6 @@ _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, | |||
| 1227 | _GL_CXXALIASWARN (qsort_r); | 1197 | _GL_CXXALIASWARN (qsort_r); |
| 1228 | # endif | 1198 | # endif |
| 1229 | #elif defined GNULIB_POSIXCHECK | 1199 | #elif defined GNULIB_POSIXCHECK |
| 1230 | # undef qsort_r | ||
| 1231 | # if HAVE_RAW_DECL_QSORT_R | 1200 | # if HAVE_RAW_DECL_QSORT_R |
| 1232 | _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " | 1201 | _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " |
| 1233 | "use gnulib module qsort_r for portability"); | 1202 | "use gnulib module qsort_r for portability"); |
| @@ -1279,7 +1248,6 @@ _GL_CXXALIAS_SYS_CAST (random, long, (void)); | |||
| 1279 | _GL_CXXALIASWARN (random); | 1248 | _GL_CXXALIASWARN (random); |
| 1280 | # endif | 1249 | # endif |
| 1281 | #elif defined GNULIB_POSIXCHECK | 1250 | #elif defined GNULIB_POSIXCHECK |
| 1282 | # undef random | ||
| 1283 | # if HAVE_RAW_DECL_RANDOM | 1251 | # if HAVE_RAW_DECL_RANDOM |
| 1284 | _GL_WARN_ON_USE (random, "random is unportable - " | 1252 | _GL_WARN_ON_USE (random, "random is unportable - " |
| 1285 | "use gnulib module random for portability"); | 1253 | "use gnulib module random for portability"); |
| @@ -1306,7 +1274,6 @@ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); | |||
| 1306 | _GL_CXXALIASWARN (srandom); | 1274 | _GL_CXXALIASWARN (srandom); |
| 1307 | # endif | 1275 | # endif |
| 1308 | #elif defined GNULIB_POSIXCHECK | 1276 | #elif defined GNULIB_POSIXCHECK |
| 1309 | # undef srandom | ||
| 1310 | # if HAVE_RAW_DECL_SRANDOM | 1277 | # if HAVE_RAW_DECL_SRANDOM |
| 1311 | _GL_WARN_ON_USE (srandom, "srandom is unportable - " | 1278 | _GL_WARN_ON_USE (srandom, "srandom is unportable - " |
| 1312 | "use gnulib module random for portability"); | 1279 | "use gnulib module random for portability"); |
| @@ -1339,7 +1306,6 @@ _GL_CXXALIAS_SYS_CAST (initstate, char *, | |||
| 1339 | _GL_CXXALIASWARN (initstate); | 1306 | _GL_CXXALIASWARN (initstate); |
| 1340 | # endif | 1307 | # endif |
| 1341 | #elif defined GNULIB_POSIXCHECK | 1308 | #elif defined GNULIB_POSIXCHECK |
| 1342 | # undef initstate | ||
| 1343 | # if HAVE_RAW_DECL_INITSTATE | 1309 | # if HAVE_RAW_DECL_INITSTATE |
| 1344 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " | 1310 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " |
| 1345 | "use gnulib module random for portability"); | 1311 | "use gnulib module random for portability"); |
| @@ -1366,7 +1332,6 @@ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); | |||
| 1366 | _GL_CXXALIASWARN (setstate); | 1332 | _GL_CXXALIASWARN (setstate); |
| 1367 | # endif | 1333 | # endif |
| 1368 | #elif defined GNULIB_POSIXCHECK | 1334 | #elif defined GNULIB_POSIXCHECK |
| 1369 | # undef setstate | ||
| 1370 | # if HAVE_RAW_DECL_SETSTATE | 1335 | # if HAVE_RAW_DECL_SETSTATE |
| 1371 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " | 1336 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " |
| 1372 | "use gnulib module random for portability"); | 1337 | "use gnulib module random for portability"); |
| @@ -1392,7 +1357,6 @@ _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); | |||
| 1392 | # endif | 1357 | # endif |
| 1393 | _GL_CXXALIASWARN (random_r); | 1358 | _GL_CXXALIASWARN (random_r); |
| 1394 | #elif defined GNULIB_POSIXCHECK | 1359 | #elif defined GNULIB_POSIXCHECK |
| 1395 | # undef random_r | ||
| 1396 | # if HAVE_RAW_DECL_RANDOM_R | 1360 | # if HAVE_RAW_DECL_RANDOM_R |
| 1397 | _GL_WARN_ON_USE (random_r, "random_r is unportable - " | 1361 | _GL_WARN_ON_USE (random_r, "random_r is unportable - " |
| 1398 | "use gnulib module random_r for portability"); | 1362 | "use gnulib module random_r for portability"); |
| @@ -1421,7 +1385,6 @@ _GL_CXXALIAS_SYS (srandom_r, int, | |||
| 1421 | # endif | 1385 | # endif |
| 1422 | _GL_CXXALIASWARN (srandom_r); | 1386 | _GL_CXXALIASWARN (srandom_r); |
| 1423 | #elif defined GNULIB_POSIXCHECK | 1387 | #elif defined GNULIB_POSIXCHECK |
| 1424 | # undef srandom_r | ||
| 1425 | # if HAVE_RAW_DECL_SRANDOM_R | 1388 | # if HAVE_RAW_DECL_SRANDOM_R |
| 1426 | _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " | 1389 | _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " |
| 1427 | "use gnulib module random_r for portability"); | 1390 | "use gnulib module random_r for portability"); |
| @@ -1456,7 +1419,6 @@ _GL_CXXALIAS_SYS_CAST (initstate_r, int, | |||
| 1456 | # endif | 1419 | # endif |
| 1457 | _GL_CXXALIASWARN (initstate_r); | 1420 | _GL_CXXALIASWARN (initstate_r); |
| 1458 | #elif defined GNULIB_POSIXCHECK | 1421 | #elif defined GNULIB_POSIXCHECK |
| 1459 | # undef initstate_r | ||
| 1460 | # if HAVE_RAW_DECL_INITSTATE_R | 1422 | # if HAVE_RAW_DECL_INITSTATE_R |
| 1461 | _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " | 1423 | _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " |
| 1462 | "use gnulib module random_r for portability"); | 1424 | "use gnulib module random_r for portability"); |
| @@ -1487,7 +1449,6 @@ _GL_CXXALIAS_SYS_CAST (setstate_r, int, | |||
| 1487 | # endif | 1449 | # endif |
| 1488 | _GL_CXXALIASWARN (setstate_r); | 1450 | _GL_CXXALIASWARN (setstate_r); |
| 1489 | #elif defined GNULIB_POSIXCHECK | 1451 | #elif defined GNULIB_POSIXCHECK |
| 1490 | # undef setstate_r | ||
| 1491 | # if HAVE_RAW_DECL_SETSTATE_R | 1452 | # if HAVE_RAW_DECL_SETSTATE_R |
| 1492 | _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " | 1453 | _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " |
| 1493 | "use gnulib module random_r for portability"); | 1454 | "use gnulib module random_r for portability"); |
| @@ -1557,7 +1518,6 @@ _GL_FUNCDECL_SYS (realloc, void *, | |||
| 1557 | # endif | 1518 | # endif |
| 1558 | # endif | 1519 | # endif |
| 1559 | # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC | 1520 | # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC |
| 1560 | # undef realloc | ||
| 1561 | /* Assume realloc is always declared. */ | 1521 | /* Assume realloc is always declared. */ |
| 1562 | _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " | 1522 | _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " |
| 1563 | "use gnulib module realloc-posix for portability"); | 1523 | "use gnulib module realloc-posix for portability"); |
| @@ -1589,7 +1549,6 @@ _GL_CXXALIAS_SYS (reallocarray, void *, | |||
| 1589 | _GL_CXXALIASWARN (reallocarray); | 1549 | _GL_CXXALIASWARN (reallocarray); |
| 1590 | # endif | 1550 | # endif |
| 1591 | #elif defined GNULIB_POSIXCHECK | 1551 | #elif defined GNULIB_POSIXCHECK |
| 1592 | # undef reallocarray | ||
| 1593 | # if HAVE_RAW_DECL_REALLOCARRAY | 1552 | # if HAVE_RAW_DECL_REALLOCARRAY |
| 1594 | _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " | 1553 | _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " |
| 1595 | "use gnulib module reallocarray for portability"); | 1554 | "use gnulib module reallocarray for portability"); |
| @@ -1617,7 +1576,6 @@ _GL_CXXALIAS_SYS (realpath, char *, | |||
| 1617 | # endif | 1576 | # endif |
| 1618 | _GL_CXXALIASWARN (realpath); | 1577 | _GL_CXXALIASWARN (realpath); |
| 1619 | #elif defined GNULIB_POSIXCHECK | 1578 | #elif defined GNULIB_POSIXCHECK |
| 1620 | # undef realpath | ||
| 1621 | # if HAVE_RAW_DECL_REALPATH | 1579 | # if HAVE_RAW_DECL_REALPATH |
| 1622 | _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " | 1580 | _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " |
| 1623 | "canonicalize or canonicalize-lgpl for portability"); | 1581 | "canonicalize or canonicalize-lgpl for portability"); |
| @@ -1634,7 +1592,6 @@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response), | |||
| 1634 | _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); | 1592 | _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); |
| 1635 | _GL_CXXALIASWARN (rpmatch); | 1593 | _GL_CXXALIASWARN (rpmatch); |
| 1636 | #elif defined GNULIB_POSIXCHECK | 1594 | #elif defined GNULIB_POSIXCHECK |
| 1637 | # undef rpmatch | ||
| 1638 | # if HAVE_RAW_DECL_RPMATCH | 1595 | # if HAVE_RAW_DECL_RPMATCH |
| 1639 | _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " | 1596 | _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " |
| 1640 | "use gnulib module rpmatch for portability"); | 1597 | "use gnulib module rpmatch for portability"); |
| @@ -1651,7 +1608,6 @@ _GL_FUNCDECL_SYS (secure_getenv, char *, | |||
| 1651 | _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); | 1608 | _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); |
| 1652 | _GL_CXXALIASWARN (secure_getenv); | 1609 | _GL_CXXALIASWARN (secure_getenv); |
| 1653 | #elif defined GNULIB_POSIXCHECK | 1610 | #elif defined GNULIB_POSIXCHECK |
| 1654 | # undef secure_getenv | ||
| 1655 | # if HAVE_RAW_DECL_SECURE_GETENV | 1611 | # if HAVE_RAW_DECL_SECURE_GETENV |
| 1656 | _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " | 1612 | _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " |
| 1657 | "use gnulib module secure_getenv for portability"); | 1613 | "use gnulib module secure_getenv for portability"); |
| @@ -1684,7 +1640,6 @@ _GL_CXXALIAS_SYS (setenv, int, | |||
| 1684 | _GL_CXXALIASWARN (setenv); | 1640 | _GL_CXXALIASWARN (setenv); |
| 1685 | # endif | 1641 | # endif |
| 1686 | #elif defined GNULIB_POSIXCHECK | 1642 | #elif defined GNULIB_POSIXCHECK |
| 1687 | # undef setenv | ||
| 1688 | # if HAVE_RAW_DECL_SETENV | 1643 | # if HAVE_RAW_DECL_SETENV |
| 1689 | _GL_WARN_ON_USE (setenv, "setenv is unportable - " | 1644 | _GL_WARN_ON_USE (setenv, "setenv is unportable - " |
| 1690 | "use gnulib module setenv for portability"); | 1645 | "use gnulib module setenv for portability"); |
| @@ -1729,7 +1684,6 @@ _GL_CXXALIAS_SYS (strtod, double, | |||
| 1729 | _GL_CXXALIASWARN (strtod); | 1684 | _GL_CXXALIASWARN (strtod); |
| 1730 | # endif | 1685 | # endif |
| 1731 | #elif defined GNULIB_POSIXCHECK | 1686 | #elif defined GNULIB_POSIXCHECK |
| 1732 | # undef strtod | ||
| 1733 | # if HAVE_RAW_DECL_STRTOD | 1687 | # if HAVE_RAW_DECL_STRTOD |
| 1734 | _GL_WARN_ON_USE (strtod, "strtod is unportable - " | 1688 | _GL_WARN_ON_USE (strtod, "strtod is unportable - " |
| 1735 | "use gnulib module strtod for portability"); | 1689 | "use gnulib module strtod for portability"); |
| @@ -1761,7 +1715,6 @@ _GL_CXXALIAS_SYS (strtof, float, | |||
| 1761 | _GL_CXXALIASWARN (strtof); | 1715 | _GL_CXXALIASWARN (strtof); |
| 1762 | # endif | 1716 | # endif |
| 1763 | #elif defined GNULIB_POSIXCHECK | 1717 | #elif defined GNULIB_POSIXCHECK |
| 1764 | # undef strtof | ||
| 1765 | # if HAVE_RAW_DECL_STRTOF | 1718 | # if HAVE_RAW_DECL_STRTOF |
| 1766 | _GL_WARN_ON_USE (strtof, "strtof is unportable - " | 1719 | _GL_WARN_ON_USE (strtof, "strtof is unportable - " |
| 1767 | "use gnulib module strtof for portability"); | 1720 | "use gnulib module strtof for portability"); |
| @@ -1791,7 +1744,6 @@ _GL_CXXALIAS_SYS (strtold, long double, | |||
| 1791 | # endif | 1744 | # endif |
| 1792 | _GL_CXXALIASWARN (strtold); | 1745 | _GL_CXXALIASWARN (strtold); |
| 1793 | #elif defined GNULIB_POSIXCHECK | 1746 | #elif defined GNULIB_POSIXCHECK |
| 1794 | # undef strtold | ||
| 1795 | # if HAVE_RAW_DECL_STRTOLD | 1747 | # if HAVE_RAW_DECL_STRTOLD |
| 1796 | _GL_WARN_ON_USE (strtold, "strtold is unportable - " | 1748 | _GL_WARN_ON_USE (strtold, "strtold is unportable - " |
| 1797 | "use gnulib module strtold for portability"); | 1749 | "use gnulib module strtold for portability"); |
| @@ -1834,7 +1786,6 @@ _GL_CXXALIAS_SYS (strtol, long, | |||
| 1834 | _GL_CXXALIASWARN (strtol); | 1786 | _GL_CXXALIASWARN (strtol); |
| 1835 | # endif | 1787 | # endif |
| 1836 | #elif defined GNULIB_POSIXCHECK | 1788 | #elif defined GNULIB_POSIXCHECK |
| 1837 | # undef strtol | ||
| 1838 | # if HAVE_RAW_DECL_STRTOL | 1789 | # if HAVE_RAW_DECL_STRTOL |
| 1839 | _GL_WARN_ON_USE (strtol, "strtol is unportable - " | 1790 | _GL_WARN_ON_USE (strtol, "strtol is unportable - " |
| 1840 | "use gnulib module strtol for portability"); | 1791 | "use gnulib module strtol for portability"); |
| @@ -1875,7 +1826,6 @@ _GL_CXXALIAS_SYS (strtoll, long long, | |||
| 1875 | # endif | 1826 | # endif |
| 1876 | _GL_CXXALIASWARN (strtoll); | 1827 | _GL_CXXALIASWARN (strtoll); |
| 1877 | #elif defined GNULIB_POSIXCHECK | 1828 | #elif defined GNULIB_POSIXCHECK |
| 1878 | # undef strtoll | ||
| 1879 | # if HAVE_RAW_DECL_STRTOLL | 1829 | # if HAVE_RAW_DECL_STRTOLL |
| 1880 | _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " | 1830 | _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " |
| 1881 | "use gnulib module strtoll for portability"); | 1831 | "use gnulib module strtoll for portability"); |
| @@ -1917,7 +1867,6 @@ _GL_CXXALIAS_SYS (strtoul, unsigned long, | |||
| 1917 | _GL_CXXALIASWARN (strtoul); | 1867 | _GL_CXXALIASWARN (strtoul); |
| 1918 | # endif | 1868 | # endif |
| 1919 | #elif defined GNULIB_POSIXCHECK | 1869 | #elif defined GNULIB_POSIXCHECK |
| 1920 | # undef strtoul | ||
| 1921 | # if HAVE_RAW_DECL_STRTOUL | 1870 | # if HAVE_RAW_DECL_STRTOUL |
| 1922 | _GL_WARN_ON_USE (strtoul, "strtoul is unportable - " | 1871 | _GL_WARN_ON_USE (strtoul, "strtoul is unportable - " |
| 1923 | "use gnulib module strtoul for portability"); | 1872 | "use gnulib module strtoul for portability"); |
| @@ -1958,7 +1907,6 @@ _GL_CXXALIAS_SYS (strtoull, unsigned long long, | |||
| 1958 | # endif | 1907 | # endif |
| 1959 | _GL_CXXALIASWARN (strtoull); | 1908 | _GL_CXXALIASWARN (strtoull); |
| 1960 | #elif defined GNULIB_POSIXCHECK | 1909 | #elif defined GNULIB_POSIXCHECK |
| 1961 | # undef strtoull | ||
| 1962 | # if HAVE_RAW_DECL_STRTOULL | 1910 | # if HAVE_RAW_DECL_STRTOULL |
| 1963 | _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " | 1911 | _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " |
| 1964 | "use gnulib module strtoull for portability"); | 1912 | "use gnulib module strtoull for portability"); |
| @@ -1974,7 +1922,6 @@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd), ); | |||
| 1974 | _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); | 1922 | _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); |
| 1975 | _GL_CXXALIASWARN (unlockpt); | 1923 | _GL_CXXALIASWARN (unlockpt); |
| 1976 | #elif defined GNULIB_POSIXCHECK | 1924 | #elif defined GNULIB_POSIXCHECK |
| 1977 | # undef unlockpt | ||
| 1978 | # if HAVE_RAW_DECL_UNLOCKPT | 1925 | # if HAVE_RAW_DECL_UNLOCKPT |
| 1979 | _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " | 1926 | _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " |
| 1980 | "use gnulib module unlockpt for portability"); | 1927 | "use gnulib module unlockpt for portability"); |
| @@ -2000,7 +1947,6 @@ _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); | |||
| 2000 | _GL_CXXALIASWARN (unsetenv); | 1947 | _GL_CXXALIASWARN (unsetenv); |
| 2001 | # endif | 1948 | # endif |
| 2002 | #elif defined GNULIB_POSIXCHECK | 1949 | #elif defined GNULIB_POSIXCHECK |
| 2003 | # undef unsetenv | ||
| 2004 | # if HAVE_RAW_DECL_UNSETENV | 1950 | # if HAVE_RAW_DECL_UNSETENV |
| 2005 | _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " | 1951 | _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " |
| 2006 | "use gnulib module unsetenv for portability"); | 1952 | "use gnulib module unsetenv for portability"); |
| @@ -2027,6 +1973,18 @@ _GL_CXXALIASWARN (wctomb); | |||
| 2027 | 1973 | ||
| 2028 | _GL_INLINE_HEADER_END | 1974 | _GL_INLINE_HEADER_END |
| 2029 | 1975 | ||
| 1976 | |||
| 1977 | /* Includes that provide only macros that don't need to be overridden. | ||
| 1978 | (Includes that are needed for type definitions and function declarations | ||
| 1979 | have their place above, before the function overrides.) */ | ||
| 1980 | |||
| 1981 | /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. | ||
| 1982 | glibc 2.41 defines WCOREDUMP in <sys/wait.h>, not in <stdlib.h>. */ | ||
| 1983 | #if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP) | ||
| 1984 | # include <sys/wait.h> | ||
| 1985 | #endif | ||
| 1986 | |||
| 1987 | |||
| 2030 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ | 1988 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ |
| 2031 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ | 1989 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ |
| 2032 | #endif | 1990 | #endif |
diff --git a/gl/str-two-way.h b/gl/str-two-way.h index d13fb298..7cf91ffd 100644 --- a/gl/str-two-way.h +++ b/gl/str-two-way.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Byte-wise substring search, using the Two-Way algorithm. | 1 | /* Byte-wise substring search, using the Two-Way algorithm. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Written by Eric Blake <ebb9@byu.net>, 2008. | 4 | Written by Eric Blake <ebb9@byu.net>, 2008. |
| 5 | 5 | ||
| @@ -108,13 +108,6 @@ static size_t | |||
| 108 | critical_factorization (const unsigned char *needle, size_t needle_len, | 108 | critical_factorization (const unsigned char *needle, size_t needle_len, |
| 109 | size_t *period) | 109 | size_t *period) |
| 110 | { | 110 | { |
| 111 | /* Index of last byte of left half, or SIZE_MAX. */ | ||
| 112 | size_t max_suffix, max_suffix_rev; | ||
| 113 | size_t j; /* Index into NEEDLE for current candidate suffix. */ | ||
| 114 | size_t k; /* Offset into current period. */ | ||
| 115 | size_t p; /* Intermediate period. */ | ||
| 116 | unsigned char a, b; /* Current comparison bytes. */ | ||
| 117 | |||
| 118 | /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered | 111 | /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered |
| 119 | out 0-length needles. */ | 112 | out 0-length needles. */ |
| 120 | if (needle_len < 3) | 113 | if (needle_len < 3) |
| @@ -133,73 +126,83 @@ critical_factorization (const unsigned char *needle, size_t needle_len, | |||
| 133 | */ | 126 | */ |
| 134 | 127 | ||
| 135 | /* Perform lexicographic search. */ | 128 | /* Perform lexicographic search. */ |
| 136 | max_suffix = SIZE_MAX; | 129 | size_t max_suffix = /* Index of last byte of left half, or SIZE_MAX. */ |
| 137 | j = 0; | 130 | SIZE_MAX; |
| 138 | k = p = 1; | 131 | { |
| 139 | while (j + k < needle_len) | 132 | size_t j = 0; /* Index into NEEDLE for current candidate suffix. */ |
| 140 | { | 133 | size_t k = 1; /* Offset into current period. */ |
| 141 | a = CANON_ELEMENT (needle[j + k]); | 134 | size_t p = 1; /* Intermediate period. */ |
| 142 | b = CANON_ELEMENT (needle[max_suffix + k]); | 135 | while (j + k < needle_len) |
| 143 | if (a < b) | 136 | { |
| 144 | { | 137 | unsigned char a = CANON_ELEMENT (needle[j + k]); |
| 145 | /* Suffix is smaller, period is entire prefix so far. */ | 138 | unsigned char b = CANON_ELEMENT (needle[max_suffix + k]); |
| 146 | j += k; | 139 | if (a < b) |
| 147 | k = 1; | 140 | { |
| 148 | p = j - max_suffix; | 141 | /* Suffix is smaller, period is entire prefix so far. */ |
| 149 | } | 142 | j += k; |
| 150 | else if (a == b) | 143 | k = 1; |
| 151 | { | 144 | p = j - max_suffix; |
| 152 | /* Advance through repetition of the current period. */ | 145 | } |
| 153 | if (k != p) | 146 | else if (a == b) |
| 154 | ++k; | 147 | { |
| 155 | else | 148 | /* Advance through repetition of the current period. */ |
| 156 | { | 149 | if (k != p) |
| 157 | j += p; | 150 | ++k; |
| 158 | k = 1; | 151 | else |
| 159 | } | 152 | { |
| 160 | } | 153 | j += p; |
| 161 | else /* b < a */ | 154 | k = 1; |
| 162 | { | 155 | } |
| 163 | /* Suffix is larger, start over from current location. */ | 156 | } |
| 164 | max_suffix = j++; | 157 | else /* b < a */ |
| 165 | k = p = 1; | 158 | { |
| 166 | } | 159 | /* Suffix is larger, start over from current location. */ |
| 167 | } | 160 | max_suffix = j++; |
| 168 | *period = p; | 161 | k = p = 1; |
| 162 | } | ||
| 163 | } | ||
| 164 | *period = p; | ||
| 165 | } | ||
| 169 | 166 | ||
| 170 | /* Perform reverse lexicographic search. */ | 167 | /* Perform reverse lexicographic search. */ |
| 171 | max_suffix_rev = SIZE_MAX; | 168 | size_t max_suffix_rev = /* Index of last byte of left half, or SIZE_MAX. */ |
| 172 | j = 0; | 169 | SIZE_MAX; |
| 173 | k = p = 1; | 170 | size_t p_rev; |
| 174 | while (j + k < needle_len) | 171 | { |
| 175 | { | 172 | size_t j = 0; /* Index into NEEDLE for current candidate suffix. */ |
| 176 | a = CANON_ELEMENT (needle[j + k]); | 173 | size_t k = 1; /* Offset into current period. */ |
| 177 | b = CANON_ELEMENT (needle[max_suffix_rev + k]); | 174 | size_t p = 1; /* Intermediate period. */ |
| 178 | if (b < a) | 175 | while (j + k < needle_len) |
| 179 | { | 176 | { |
| 180 | /* Suffix is smaller, period is entire prefix so far. */ | 177 | unsigned char a = CANON_ELEMENT (needle[j + k]); |
| 181 | j += k; | 178 | unsigned char b = CANON_ELEMENT (needle[max_suffix_rev + k]); |
| 182 | k = 1; | 179 | if (b < a) |
| 183 | p = j - max_suffix_rev; | 180 | { |
| 184 | } | 181 | /* Suffix is smaller, period is entire prefix so far. */ |
| 185 | else if (a == b) | 182 | j += k; |
| 186 | { | 183 | k = 1; |
| 187 | /* Advance through repetition of the current period. */ | 184 | p = j - max_suffix_rev; |
| 188 | if (k != p) | 185 | } |
| 189 | ++k; | 186 | else if (a == b) |
| 190 | else | 187 | { |
| 191 | { | 188 | /* Advance through repetition of the current period. */ |
| 192 | j += p; | 189 | if (k != p) |
| 193 | k = 1; | 190 | ++k; |
| 194 | } | 191 | else |
| 195 | } | 192 | { |
| 196 | else /* a < b */ | 193 | j += p; |
| 197 | { | 194 | k = 1; |
| 198 | /* Suffix is larger, start over from current location. */ | 195 | } |
| 199 | max_suffix_rev = j++; | 196 | } |
| 200 | k = p = 1; | 197 | else /* a < b */ |
| 201 | } | 198 | { |
| 202 | } | 199 | /* Suffix is larger, start over from current location. */ |
| 200 | max_suffix_rev = j++; | ||
| 201 | k = p = 1; | ||
| 202 | } | ||
| 203 | } | ||
| 204 | p_rev = p; | ||
| 205 | } | ||
| 203 | 206 | ||
| 204 | /* Choose the shorter suffix. Return the index of the first byte of | 207 | /* Choose the shorter suffix. Return the index of the first byte of |
| 205 | the right half, rather than the last byte of the left half. | 208 | the right half, rather than the last byte of the left half. |
| @@ -217,7 +220,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len, | |||
| 217 | factorization. */ | 220 | factorization. */ |
| 218 | if (max_suffix_rev + 1 < max_suffix + 1) | 221 | if (max_suffix_rev + 1 < max_suffix + 1) |
| 219 | return max_suffix + 1; | 222 | return max_suffix + 1; |
| 220 | *period = p; | 223 | *period = p_rev; |
| 221 | return max_suffix_rev + 1; | 224 | return max_suffix_rev + 1; |
| 222 | } | 225 | } |
| 223 | 226 | ||
| @@ -235,15 +238,12 @@ static RETURN_TYPE _GL_ATTRIBUTE_PURE | |||
| 235 | two_way_short_needle (const unsigned char *haystack, size_t haystack_len, | 238 | two_way_short_needle (const unsigned char *haystack, size_t haystack_len, |
| 236 | const unsigned char *needle, size_t needle_len) | 239 | const unsigned char *needle, size_t needle_len) |
| 237 | { | 240 | { |
| 238 | size_t i; /* Index into current byte of NEEDLE. */ | ||
| 239 | size_t j; /* Index into current window of HAYSTACK. */ | ||
| 240 | size_t period; /* The period of the right half of needle. */ | ||
| 241 | size_t suffix; /* The index of the right half of needle. */ | ||
| 242 | |||
| 243 | /* Factor the needle into two halves, such that the left half is | 241 | /* Factor the needle into two halves, such that the left half is |
| 244 | smaller than the global period, and the right half is | 242 | smaller than the global period, and the right half is |
| 245 | periodic (with a period as large as NEEDLE_LEN - suffix). */ | 243 | periodic (with a period as large as NEEDLE_LEN - suffix). */ |
| 246 | suffix = critical_factorization (needle, needle_len, &period); | 244 | size_t period; /* The period of the right half of needle. */ |
| 245 | size_t suffix = /* The index of the right half of needle. */ | ||
| 246 | critical_factorization (needle, needle_len, &period); | ||
| 247 | 247 | ||
| 248 | /* Perform the search. Each iteration compares the right half | 248 | /* Perform the search. Each iteration compares the right half |
| 249 | first. */ | 249 | first. */ |
| @@ -253,11 +253,12 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len, | |||
| 253 | only advance by the period, so use memory to avoid rescanning | 253 | only advance by the period, so use memory to avoid rescanning |
| 254 | known occurrences of the period in the right half. */ | 254 | known occurrences of the period in the right half. */ |
| 255 | size_t memory = 0; | 255 | size_t memory = 0; |
| 256 | j = 0; | 256 | size_t j = 0; /* Index into current window of HAYSTACK. */ |
| 257 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | 257 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) |
| 258 | { | 258 | { |
| 259 | /* Scan for matches in right half. */ | 259 | /* Scan for matches in right half. */ |
| 260 | i = MAX (suffix, memory); | 260 | size_t i = /* Index into current byte of NEEDLE. */ |
| 261 | MAX (suffix, memory); | ||
| 261 | while (i < needle_len && (CANON_ELEMENT (needle[i]) | 262 | while (i < needle_len && (CANON_ELEMENT (needle[i]) |
| 262 | == CANON_ELEMENT (haystack[i + j]))) | 263 | == CANON_ELEMENT (haystack[i + j]))) |
| 263 | ++i; | 264 | ++i; |
| @@ -287,11 +288,12 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len, | |||
| 287 | /* The two halves of needle are distinct; no extra memory is | 288 | /* The two halves of needle are distinct; no extra memory is |
| 288 | required, and any mismatch results in a maximal shift. */ | 289 | required, and any mismatch results in a maximal shift. */ |
| 289 | period = MAX (suffix, needle_len - suffix) + 1; | 290 | period = MAX (suffix, needle_len - suffix) + 1; |
| 290 | j = 0; | 291 | size_t j = 0; /* Index into current window of HAYSTACK. */ |
| 291 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | 292 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) |
| 292 | { | 293 | { |
| 293 | /* Scan for matches in right half. */ | 294 | /* Scan for matches in right half. */ |
| 294 | i = suffix; | 295 | size_t i = /* Index into current byte of NEEDLE. */ |
| 296 | suffix; | ||
| 295 | while (i < needle_len && (CANON_ELEMENT (needle[i]) | 297 | while (i < needle_len && (CANON_ELEMENT (needle[i]) |
| 296 | == CANON_ELEMENT (haystack[i + j]))) | 298 | == CANON_ELEMENT (haystack[i + j]))) |
| 297 | ++i; | 299 | ++i; |
| @@ -329,24 +331,21 @@ static RETURN_TYPE _GL_ATTRIBUTE_PURE | |||
| 329 | two_way_long_needle (const unsigned char *haystack, size_t haystack_len, | 331 | two_way_long_needle (const unsigned char *haystack, size_t haystack_len, |
| 330 | const unsigned char *needle, size_t needle_len) | 332 | const unsigned char *needle, size_t needle_len) |
| 331 | { | 333 | { |
| 332 | size_t i; /* Index into current byte of NEEDLE. */ | ||
| 333 | size_t j; /* Index into current window of HAYSTACK. */ | ||
| 334 | size_t period; /* The period of the right half of needle. */ | ||
| 335 | size_t suffix; /* The index of the right half of needle. */ | ||
| 336 | size_t shift_table[1U << CHAR_BIT]; /* See below. */ | ||
| 337 | |||
| 338 | /* Factor the needle into two halves, such that the left half is | 334 | /* Factor the needle into two halves, such that the left half is |
| 339 | smaller than the global period, and the right half is | 335 | smaller than the global period, and the right half is |
| 340 | periodic (with a period as large as NEEDLE_LEN - suffix). */ | 336 | periodic (with a period as large as NEEDLE_LEN - suffix). */ |
| 341 | suffix = critical_factorization (needle, needle_len, &period); | 337 | size_t period; /* The period of the right half of needle. */ |
| 338 | size_t suffix = /* The index of the right half of needle. */ | ||
| 339 | critical_factorization (needle, needle_len, &period); | ||
| 342 | 340 | ||
| 343 | /* Populate shift_table. For each possible byte value c, | 341 | /* Populate shift_table. For each possible byte value c, |
| 344 | shift_table[c] is the distance from the last occurrence of c to | 342 | shift_table[c] is the distance from the last occurrence of c to |
| 345 | the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. | 343 | the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. |
| 346 | shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ | 344 | shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ |
| 347 | for (i = 0; i < 1U << CHAR_BIT; i++) | 345 | size_t shift_table[1U << CHAR_BIT]; |
| 346 | for (size_t i = 0; i < 1U << CHAR_BIT; i++) | ||
| 348 | shift_table[i] = needle_len; | 347 | shift_table[i] = needle_len; |
| 349 | for (i = 0; i < needle_len; i++) | 348 | for (size_t i = 0; i < needle_len; i++) |
| 350 | shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; | 349 | shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; |
| 351 | 350 | ||
| 352 | /* Perform the search. Each iteration compares the right half | 351 | /* Perform the search. Each iteration compares the right half |
| @@ -357,13 +356,13 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len, | |||
| 357 | only advance by the period, so use memory to avoid rescanning | 356 | only advance by the period, so use memory to avoid rescanning |
| 358 | known occurrences of the period in the right half. */ | 357 | known occurrences of the period in the right half. */ |
| 359 | size_t memory = 0; | 358 | size_t memory = 0; |
| 360 | size_t shift; | 359 | size_t j = 0; /* Index into current window of HAYSTACK. */ |
| 361 | j = 0; | ||
| 362 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | 360 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) |
| 363 | { | 361 | { |
| 364 | /* Check the last byte first; if it does not match, then | 362 | /* Check the last byte first; if it does not match, then |
| 365 | shift to the next possible match location. */ | 363 | shift to the next possible match location. */ |
| 366 | shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | 364 | size_t shift = |
| 365 | shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | ||
| 367 | if (0 < shift) | 366 | if (0 < shift) |
| 368 | { | 367 | { |
| 369 | if (memory && shift < period) | 368 | if (memory && shift < period) |
| @@ -375,32 +374,34 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len, | |||
| 375 | } | 374 | } |
| 376 | memory = 0; | 375 | memory = 0; |
| 377 | j += shift; | 376 | j += shift; |
| 378 | continue; | ||
| 379 | } | ||
| 380 | /* Scan for matches in right half. The last byte has | ||
| 381 | already been matched, by virtue of the shift table. */ | ||
| 382 | i = MAX (suffix, memory); | ||
| 383 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) | ||
| 384 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 385 | ++i; | ||
| 386 | if (needle_len - 1 <= i) | ||
| 387 | { | ||
| 388 | /* Scan for matches in left half. */ | ||
| 389 | i = suffix - 1; | ||
| 390 | while (memory < i + 1 && (CANON_ELEMENT (needle[i]) | ||
| 391 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 392 | --i; | ||
| 393 | if (i + 1 < memory + 1) | ||
| 394 | return (RETURN_TYPE) (haystack + j); | ||
| 395 | /* No match, so remember how many repetitions of period | ||
| 396 | on the right half were scanned. */ | ||
| 397 | j += period; | ||
| 398 | memory = needle_len - period; | ||
| 399 | } | 377 | } |
| 400 | else | 378 | else |
| 401 | { | 379 | { |
| 402 | j += i - suffix + 1; | 380 | /* Scan for matches in right half. The last byte has |
| 403 | memory = 0; | 381 | already been matched, by virtue of the shift table. */ |
| 382 | size_t i = MAX (suffix, memory); | ||
| 383 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) | ||
| 384 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 385 | ++i; | ||
| 386 | if (needle_len - 1 <= i) | ||
| 387 | { | ||
| 388 | /* Scan for matches in left half. */ | ||
| 389 | i = suffix - 1; | ||
| 390 | while (memory < i + 1 && (CANON_ELEMENT (needle[i]) | ||
| 391 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 392 | --i; | ||
| 393 | if (i + 1 < memory + 1) | ||
| 394 | return (RETURN_TYPE) (haystack + j); | ||
| 395 | /* No match, so remember how many repetitions of period | ||
| 396 | on the right half were scanned. */ | ||
| 397 | j += period; | ||
| 398 | memory = needle_len - period; | ||
| 399 | } | ||
| 400 | else | ||
| 401 | { | ||
| 402 | j += i - suffix + 1; | ||
| 403 | memory = 0; | ||
| 404 | } | ||
| 404 | } | 405 | } |
| 405 | } | 406 | } |
| 406 | } | 407 | } |
| @@ -408,38 +409,40 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len, | |||
| 408 | { | 409 | { |
| 409 | /* The two halves of needle are distinct; no extra memory is | 410 | /* The two halves of needle are distinct; no extra memory is |
| 410 | required, and any mismatch results in a maximal shift. */ | 411 | required, and any mismatch results in a maximal shift. */ |
| 411 | size_t shift; | ||
| 412 | period = MAX (suffix, needle_len - suffix) + 1; | 412 | period = MAX (suffix, needle_len - suffix) + 1; |
| 413 | j = 0; | 413 | size_t j = 0; /* Index into current window of HAYSTACK. */ |
| 414 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | 414 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) |
| 415 | { | 415 | { |
| 416 | /* Check the last byte first; if it does not match, then | 416 | /* Check the last byte first; if it does not match, then |
| 417 | shift to the next possible match location. */ | 417 | shift to the next possible match location. */ |
| 418 | shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | 418 | size_t shift = |
| 419 | shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | ||
| 419 | if (0 < shift) | 420 | if (0 < shift) |
| 420 | { | 421 | { |
| 421 | j += shift; | 422 | j += shift; |
| 422 | continue; | ||
| 423 | } | 423 | } |
| 424 | /* Scan for matches in right half. The last byte has | 424 | else |
| 425 | already been matched, by virtue of the shift table. */ | ||
| 426 | i = suffix; | ||
| 427 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) | ||
| 428 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 429 | ++i; | ||
| 430 | if (needle_len - 1 <= i) | ||
| 431 | { | 425 | { |
| 432 | /* Scan for matches in left half. */ | 426 | /* Scan for matches in right half. The last byte has |
| 433 | i = suffix - 1; | 427 | already been matched, by virtue of the shift table. */ |
| 434 | while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) | 428 | size_t i = suffix; |
| 435 | == CANON_ELEMENT (haystack[i + j]))) | 429 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) |
| 436 | --i; | 430 | == CANON_ELEMENT (haystack[i + j]))) |
| 437 | if (i == SIZE_MAX) | 431 | ++i; |
| 438 | return (RETURN_TYPE) (haystack + j); | 432 | if (needle_len - 1 <= i) |
| 439 | j += period; | 433 | { |
| 434 | /* Scan for matches in left half. */ | ||
| 435 | i = suffix - 1; | ||
| 436 | while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) | ||
| 437 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 438 | --i; | ||
| 439 | if (i == SIZE_MAX) | ||
| 440 | return (RETURN_TYPE) (haystack + j); | ||
| 441 | j += period; | ||
| 442 | } | ||
| 443 | else | ||
| 444 | j += i - suffix + 1; | ||
| 440 | } | 445 | } |
| 441 | else | ||
| 442 | j += i - suffix + 1; | ||
| 443 | } | 446 | } |
| 444 | } | 447 | } |
| 445 | return NULL; | 448 | return NULL; |
diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c index 16626d4d..67192a31 100644 --- a/gl/strcasecmp.c +++ b/gl/strcasecmp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Case-insensitive string comparison function for unibyte locales. | 1 | /* Case-insensitive string comparison function for unibyte locales. |
| 2 | Copyright (C) 1998-1999, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-1999, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -32,29 +32,24 @@ strcasecmp (const char *s1, const char *s2) | |||
| 32 | { | 32 | { |
| 33 | const unsigned char *p1 = (const unsigned char *) s1; | 33 | const unsigned char *p1 = (const unsigned char *) s1; |
| 34 | const unsigned char *p2 = (const unsigned char *) s2; | 34 | const unsigned char *p2 = (const unsigned char *) s2; |
| 35 | unsigned char c1, c2; | ||
| 36 | 35 | ||
| 37 | if (p1 == p2) | 36 | if (p1 == p2) |
| 38 | return 0; | 37 | return 0; |
| 39 | 38 | ||
| 40 | do | 39 | for (;; p1++, p2++) |
| 41 | { | 40 | { |
| 42 | c1 = tolower (*p1); | 41 | unsigned char c1 = tolower (*p1); |
| 43 | c2 = tolower (*p2); | 42 | unsigned char c2 = tolower (*p2); |
| 44 | 43 | ||
| 45 | if (c1 == '\0') | 44 | if (c1 == '\0' || c1 != c2) |
| 46 | break; | 45 | { |
| 47 | 46 | if (UCHAR_MAX <= INT_MAX) | |
| 48 | ++p1; | 47 | return c1 - c2; |
| 49 | ++p2; | 48 | else |
| 49 | /* On machines where 'char' and 'int' are types of the same size, | ||
| 50 | the difference of two 'unsigned char' values - including the | ||
| 51 | sign bit - doesn't fit in an 'int'. */ | ||
| 52 | return _GL_CMP (c1, c2); | ||
| 53 | } | ||
| 50 | } | 54 | } |
| 51 | while (c1 == c2); | ||
| 52 | |||
| 53 | if (UCHAR_MAX <= INT_MAX) | ||
| 54 | return c1 - c2; | ||
| 55 | else | ||
| 56 | /* On machines where 'char' and 'int' are types of the same size, the | ||
| 57 | difference of two 'unsigned char' values - including the sign bit - | ||
| 58 | doesn't fit in an 'int'. */ | ||
| 59 | return _GL_CMP (c1, c2); | ||
| 60 | } | 55 | } |
diff --git a/gl/strcasestr.c b/gl/strcasestr.c index fd0e2c3e..fcfbcf3b 100644 --- a/gl/strcasestr.c +++ b/gl/strcasestr.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Case-insensitive searching in a string. | 1 | /* Case-insensitive searching in a string. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2005. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2005. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -39,29 +39,32 @@ | |||
| 39 | char * | 39 | char * |
| 40 | strcasestr (const char *haystack_start, const char *needle_start) | 40 | strcasestr (const char *haystack_start, const char *needle_start) |
| 41 | { | 41 | { |
| 42 | const char *haystack = haystack_start; | ||
| 43 | const char *needle = needle_start; | 42 | const char *needle = needle_start; |
| 44 | size_t needle_len; /* Length of NEEDLE. */ | ||
| 45 | size_t haystack_len; /* Known minimum length of HAYSTACK. */ | ||
| 46 | bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ | ||
| 47 | 43 | ||
| 48 | /* Determine length of NEEDLE, and in the process, make sure | 44 | /* Determine length of NEEDLE, and in the process, make sure |
| 49 | HAYSTACK is at least as long (no point processing all of a long | 45 | HAYSTACK is at least as long (no point processing all of a long |
| 50 | NEEDLE if HAYSTACK is too short). */ | 46 | NEEDLE if HAYSTACK is too short). */ |
| 51 | while (*haystack && *needle) | 47 | { |
| 52 | { | 48 | const char *haystack = haystack_start; |
| 53 | ok &= (tolower ((unsigned char) *haystack) | 49 | bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ |
| 54 | == tolower ((unsigned char) *needle)); | 50 | while (*haystack && *needle) |
| 55 | haystack++; | 51 | { |
| 56 | needle++; | 52 | ok &= (tolower ((unsigned char) *haystack) |
| 57 | } | 53 | == tolower ((unsigned char) *needle)); |
| 58 | if (*needle) | 54 | haystack++; |
| 59 | return NULL; | 55 | needle++; |
| 60 | if (ok) | 56 | } |
| 61 | return (char *) haystack_start; | 57 | if (*needle) |
| 62 | needle_len = needle - needle_start; | 58 | return NULL; |
| 63 | haystack = haystack_start + 1; | 59 | if (ok) |
| 64 | haystack_len = needle_len - 1; | 60 | return (char *) haystack_start; |
| 61 | } | ||
| 62 | |||
| 63 | size_t needle_len = /* Length of NEEDLE. */ | ||
| 64 | needle - needle_start; | ||
| 65 | const char *haystack = haystack_start + 1; | ||
| 66 | size_t haystack_len = /* Known minimum length of HAYSTACK. */ | ||
| 67 | needle_len - 1; | ||
| 65 | 68 | ||
| 66 | /* Perform the search. Abstract memory is considered to be an array | 69 | /* Perform the search. Abstract memory is considered to be an array |
| 67 | of 'unsigned char' values, not an array of 'char' values. See | 70 | of 'unsigned char' values, not an array of 'char' values. See |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Optimized string comparison. | 1 | /* Optimized string comparison. |
| 2 | Copyright (C) 2001-2002, 2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2002, 2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -39,7 +39,7 @@ extern "C" { | |||
| 39 | static inline int | 39 | static inline int |
| 40 | streq9 (const char *s1, const char *s2) | 40 | streq9 (const char *s1, const char *s2) |
| 41 | { | 41 | { |
| 42 | return strcmp (s1 + 9, s2 + 9) == 0; | 42 | return streq (s1 + 9, s2 + 9); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static inline int | 45 | static inline int |
diff --git a/gl/strerror-override.c b/gl/strerror-override.c index 3cc25905..a07ed62f 100644 --- a/gl/strerror-override.c +++ b/gl/strerror-override.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* strerror-override.c --- POSIX compatible system error routine | 1 | /* strerror-override.c --- POSIX compatible system error routine |
| 2 | 2 | ||
| 3 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/strerror-override.h b/gl/strerror-override.h index 653ea0ad..1e84bdbc 100644 --- a/gl/strerror-override.h +++ b/gl/strerror-override.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* strerror-override.h --- POSIX compatible system error routine | 1 | /* strerror-override.h --- POSIX compatible system error routine |
| 2 | 2 | ||
| 3 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/strerror.c b/gl/strerror.c index 72572ae4..c451f055 100644 --- a/gl/strerror.c +++ b/gl/strerror.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* strerror.c --- POSIX compatible system error routine | 1 | /* strerror.c --- POSIX compatible system error routine |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -42,7 +42,6 @@ strerror (int n) | |||
| 42 | #undef strerror | 42 | #undef strerror |
| 43 | { | 43 | { |
| 44 | static char buf[STACKBUF_LEN]; | 44 | static char buf[STACKBUF_LEN]; |
| 45 | size_t len; | ||
| 46 | 45 | ||
| 47 | /* Cast away const, due to the historical signature of strerror; | 46 | /* Cast away const, due to the historical signature of strerror; |
| 48 | callers should not be modifying the string. */ | 47 | callers should not be modifying the string. */ |
| @@ -67,7 +66,7 @@ strerror (int n) | |||
| 67 | } | 66 | } |
| 68 | 67 | ||
| 69 | /* Fix STACKBUF_LEN if this ever aborts. */ | 68 | /* Fix STACKBUF_LEN if this ever aborts. */ |
| 70 | len = strlen (msg); | 69 | size_t len = strlen (msg); |
| 71 | if (sizeof buf <= len) | 70 | if (sizeof buf <= len) |
| 72 | abort (); | 71 | abort (); |
| 73 | 72 | ||
diff --git a/gl/string.c b/gl/string.c new file mode 100644 index 00000000..c2e1b1f4 --- /dev/null +++ b/gl/string.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* streq and memeq functions. | ||
| 2 | Copyright (C) 2025-2026 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU Lesser General Public License as | ||
| 6 | published by the Free Software Foundation; either version 2.1 of the | ||
| 7 | License, or (at your option) any later version. | ||
| 8 | |||
| 9 | This file is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU Lesser General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU Lesser General Public License | ||
| 15 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 16 | |||
| 17 | #define _GL_STRING_INLINE _GL_EXTERN_INLINE | ||
| 18 | #include <config.h> | ||
| 19 | #include <string.h> | ||
diff --git a/gl/string.in.h b/gl/string.in.h index 25e6a087..b54ec0ca 100644 --- a/gl/string.in.h +++ b/gl/string.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <string.h>. | 1 | /* A GNU-like <string.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1995-1996, 2001-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -80,6 +80,12 @@ | |||
| 80 | # include <strings.h> | 80 | # include <strings.h> |
| 81 | #endif | 81 | #endif |
| 82 | 82 | ||
| 83 | _GL_INLINE_HEADER_BEGIN | ||
| 84 | |||
| 85 | #ifndef _GL_STRING_INLINE | ||
| 86 | # define _GL_STRING_INLINE _GL_INLINE | ||
| 87 | #endif | ||
| 88 | |||
| 83 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers | 89 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
| 84 | that can be freed by passing them as the Ith argument to the | 90 | that can be freed by passing them as the Ith argument to the |
| 85 | function F. */ | 91 | function F. */ |
| @@ -96,7 +102,7 @@ | |||
| 96 | /* Applies to: functions. Cannot be used on inline functions. */ | 102 | /* Applies to: functions. Cannot be used on inline functions. */ |
| 97 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE | 103 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 98 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ | 104 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ |
| 99 | /* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */ | 105 | /* Work around GCC bug <https://gcc.gnu.org/PR108231> */ |
| 100 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ | 106 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ |
| 101 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) | 107 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) |
| 102 | # else | 108 | # else |
| @@ -306,7 +312,6 @@ _GL_FUNCDECL_SYS (explicit_bzero, void, | |||
| 306 | _GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); | 312 | _GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); |
| 307 | _GL_CXXALIASWARN (explicit_bzero); | 313 | _GL_CXXALIASWARN (explicit_bzero); |
| 308 | #elif defined GNULIB_POSIXCHECK | 314 | #elif defined GNULIB_POSIXCHECK |
| 309 | # undef explicit_bzero | ||
| 310 | # if HAVE_RAW_DECL_EXPLICIT_BZERO | 315 | # if HAVE_RAW_DECL_EXPLICIT_BZERO |
| 311 | _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " | 316 | _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " |
| 312 | "use gnulib module explicit_bzero for portability"); | 317 | "use gnulib module explicit_bzero for portability"); |
| @@ -322,7 +327,6 @@ _GL_FUNCDECL_SYS (ffsl, int, (long int i), ); | |||
| 322 | _GL_CXXALIAS_SYS (ffsl, int, (long int i)); | 327 | _GL_CXXALIAS_SYS (ffsl, int, (long int i)); |
| 323 | _GL_CXXALIASWARN (ffsl); | 328 | _GL_CXXALIASWARN (ffsl); |
| 324 | #elif defined GNULIB_POSIXCHECK | 329 | #elif defined GNULIB_POSIXCHECK |
| 325 | # undef ffsl | ||
| 326 | # if HAVE_RAW_DECL_FFSL | 330 | # if HAVE_RAW_DECL_FFSL |
| 327 | _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); | 331 | _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); |
| 328 | # endif | 332 | # endif |
| @@ -345,7 +349,6 @@ _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); | |||
| 345 | # endif | 349 | # endif |
| 346 | _GL_CXXALIASWARN (ffsll); | 350 | _GL_CXXALIASWARN (ffsll); |
| 347 | #elif defined GNULIB_POSIXCHECK | 351 | #elif defined GNULIB_POSIXCHECK |
| 348 | # undef ffsll | ||
| 349 | # if HAVE_RAW_DECL_FFSLL | 352 | # if HAVE_RAW_DECL_FFSLL |
| 350 | _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); | 353 | _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); |
| 351 | # endif | 354 | # endif |
| @@ -403,7 +406,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, | |||
| 403 | _GL_CXXALIASWARN (memchr); | 406 | _GL_CXXALIASWARN (memchr); |
| 404 | # endif | 407 | # endif |
| 405 | #elif defined GNULIB_POSIXCHECK | 408 | #elif defined GNULIB_POSIXCHECK |
| 406 | # undef memchr | ||
| 407 | /* Assume memchr is always declared. */ | 409 | /* Assume memchr is always declared. */ |
| 408 | _GL_WARN_ON_USE_CXX (memchr, | 410 | _GL_WARN_ON_USE_CXX (memchr, |
| 409 | const void *, void *, (void const *, int, size_t), | 411 | const void *, void *, (void const *, int, size_t), |
| @@ -411,6 +413,21 @@ _GL_WARN_ON_USE_CXX (memchr, | |||
| 411 | "use gnulib module memchr for portability" ); | 413 | "use gnulib module memchr for portability" ); |
| 412 | #endif | 414 | #endif |
| 413 | 415 | ||
| 416 | /* Are S1 and S2, of size N, bytewise equal? */ | ||
| 417 | #if @GNULIB_STRINGEQ@ && !@HAVE_DECL_MEMEQ@ | ||
| 418 | # ifdef __cplusplus | ||
| 419 | extern "C" { | ||
| 420 | # endif | ||
| 421 | _GL_STRING_INLINE bool | ||
| 422 | memeq (void const *__s1, void const *__s2, size_t __n) | ||
| 423 | { | ||
| 424 | return !memcmp (__s1, __s2, __n); | ||
| 425 | } | ||
| 426 | # ifdef __cplusplus | ||
| 427 | } | ||
| 428 | # endif | ||
| 429 | #endif | ||
| 430 | |||
| 414 | /* Return the first occurrence of NEEDLE in HAYSTACK. */ | 431 | /* Return the first occurrence of NEEDLE in HAYSTACK. */ |
| 415 | #if @GNULIB_MEMMEM@ | 432 | #if @GNULIB_MEMMEM@ |
| 416 | # if @REPLACE_MEMMEM@ | 433 | # if @REPLACE_MEMMEM@ |
| @@ -439,7 +456,6 @@ _GL_CXXALIAS_SYS (memmem, void *, | |||
| 439 | # endif | 456 | # endif |
| 440 | _GL_CXXALIASWARN (memmem); | 457 | _GL_CXXALIASWARN (memmem); |
| 441 | #elif defined GNULIB_POSIXCHECK | 458 | #elif defined GNULIB_POSIXCHECK |
| 442 | # undef memmem | ||
| 443 | # if HAVE_RAW_DECL_MEMMEM | 459 | # if HAVE_RAW_DECL_MEMMEM |
| 444 | _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " | 460 | _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " |
| 445 | "use gnulib module memmem-simple for portability, " | 461 | "use gnulib module memmem-simple for portability, " |
| @@ -477,7 +493,6 @@ _GL_CXXALIAS_SYS (mempcpy, void *, | |||
| 477 | _GL_CXXALIASWARN (mempcpy); | 493 | _GL_CXXALIASWARN (mempcpy); |
| 478 | # endif | 494 | # endif |
| 479 | #elif defined GNULIB_POSIXCHECK | 495 | #elif defined GNULIB_POSIXCHECK |
| 480 | # undef mempcpy | ||
| 481 | # if HAVE_RAW_DECL_MEMPCPY | 496 | # if HAVE_RAW_DECL_MEMPCPY |
| 482 | _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " | 497 | _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " |
| 483 | "use gnulib module mempcpy for portability"); | 498 | "use gnulib module mempcpy for portability"); |
| @@ -510,7 +525,6 @@ _GL_CXXALIASWARN1 (memrchr, void const *, | |||
| 510 | _GL_CXXALIASWARN (memrchr); | 525 | _GL_CXXALIASWARN (memrchr); |
| 511 | # endif | 526 | # endif |
| 512 | #elif defined GNULIB_POSIXCHECK | 527 | #elif defined GNULIB_POSIXCHECK |
| 513 | # undef memrchr | ||
| 514 | # if HAVE_RAW_DECL_MEMRCHR | 528 | # if HAVE_RAW_DECL_MEMRCHR |
| 515 | _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " | 529 | _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " |
| 516 | "use gnulib module memrchr for portability"); | 530 | "use gnulib module memrchr for portability"); |
| @@ -541,7 +555,6 @@ _GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); | |||
| 541 | _GL_CXXALIASWARN (memset_explicit); | 555 | _GL_CXXALIASWARN (memset_explicit); |
| 542 | # endif | 556 | # endif |
| 543 | #elif defined GNULIB_POSIXCHECK | 557 | #elif defined GNULIB_POSIXCHECK |
| 544 | # undef memset_explicit | ||
| 545 | # if HAVE_RAW_DECL_MEMSET_EXPLICIT | 558 | # if HAVE_RAW_DECL_MEMSET_EXPLICIT |
| 546 | _GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " | 559 | _GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " |
| 547 | "use gnulib module memset_explicit for portability"); | 560 | "use gnulib module memset_explicit for portability"); |
| @@ -576,7 +589,6 @@ _GL_CXXALIASWARN1 (rawmemchr, void const *, | |||
| 576 | _GL_CXXALIASWARN (rawmemchr); | 589 | _GL_CXXALIASWARN (rawmemchr); |
| 577 | # endif | 590 | # endif |
| 578 | #elif defined GNULIB_POSIXCHECK | 591 | #elif defined GNULIB_POSIXCHECK |
| 579 | # undef rawmemchr | ||
| 580 | # if HAVE_RAW_DECL_RAWMEMCHR | 592 | # if HAVE_RAW_DECL_RAWMEMCHR |
| 581 | _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " | 593 | _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " |
| 582 | "use gnulib module rawmemchr for portability"); | 594 | "use gnulib module rawmemchr for portability"); |
| @@ -608,7 +620,6 @@ _GL_CXXALIAS_SYS (stpcpy, char *, | |||
| 608 | _GL_CXXALIASWARN (stpcpy); | 620 | _GL_CXXALIASWARN (stpcpy); |
| 609 | # endif | 621 | # endif |
| 610 | #elif defined GNULIB_POSIXCHECK | 622 | #elif defined GNULIB_POSIXCHECK |
| 611 | # undef stpcpy | ||
| 612 | # if HAVE_RAW_DECL_STPCPY | 623 | # if HAVE_RAW_DECL_STPCPY |
| 613 | _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " | 624 | _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " |
| 614 | "use gnulib module stpcpy for portability"); | 625 | "use gnulib module stpcpy for portability"); |
| @@ -645,7 +656,6 @@ _GL_CXXALIAS_SYS (stpncpy, char *, | |||
| 645 | _GL_CXXALIASWARN (stpncpy); | 656 | _GL_CXXALIASWARN (stpncpy); |
| 646 | # endif | 657 | # endif |
| 647 | #elif defined GNULIB_POSIXCHECK | 658 | #elif defined GNULIB_POSIXCHECK |
| 648 | # undef stpncpy | ||
| 649 | # if HAVE_RAW_DECL_STPNCPY | 659 | # if HAVE_RAW_DECL_STPNCPY |
| 650 | _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " | 660 | _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " |
| 651 | "use gnulib module stpncpy for portability"); | 661 | "use gnulib module stpncpy for portability"); |
| @@ -655,7 +665,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " | |||
| 655 | #if defined GNULIB_POSIXCHECK | 665 | #if defined GNULIB_POSIXCHECK |
| 656 | /* strchr() does not work with multibyte strings if the locale encoding is | 666 | /* strchr() does not work with multibyte strings if the locale encoding is |
| 657 | GB18030 and the character to be searched is a digit. */ | 667 | GB18030 and the character to be searched is a digit. */ |
| 658 | # undef strchr | ||
| 659 | /* Assume strchr is always declared. */ | 668 | /* Assume strchr is always declared. */ |
| 660 | _GL_WARN_ON_USE_CXX (strchr, | 669 | _GL_WARN_ON_USE_CXX (strchr, |
| 661 | const char *, char *, (const char *, int), | 670 | const char *, char *, (const char *, int), |
| @@ -701,7 +710,6 @@ _GL_CXXALIASWARN1 (strchrnul, char const *, | |||
| 701 | _GL_CXXALIASWARN (strchrnul); | 710 | _GL_CXXALIASWARN (strchrnul); |
| 702 | # endif | 711 | # endif |
| 703 | #elif defined GNULIB_POSIXCHECK | 712 | #elif defined GNULIB_POSIXCHECK |
| 704 | # undef strchrnul | ||
| 705 | # if HAVE_RAW_DECL_STRCHRNUL | 713 | # if HAVE_RAW_DECL_STRCHRNUL |
| 706 | _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " | 714 | _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " |
| 707 | "use gnulib module strchrnul for portability"); | 715 | "use gnulib module strchrnul for portability"); |
| @@ -766,7 +774,6 @@ _GL_FUNCDECL_SYS (strdup, char *, | |||
| 766 | # endif | 774 | # endif |
| 767 | # endif | 775 | # endif |
| 768 | # if defined GNULIB_POSIXCHECK | 776 | # if defined GNULIB_POSIXCHECK |
| 769 | # undef strdup | ||
| 770 | # if HAVE_RAW_DECL_STRDUP | 777 | # if HAVE_RAW_DECL_STRDUP |
| 771 | _GL_WARN_ON_USE (strdup, "strdup is unportable - " | 778 | _GL_WARN_ON_USE (strdup, "strdup is unportable - " |
| 772 | "use gnulib module strdup for portability"); | 779 | "use gnulib module strdup for portability"); |
| @@ -791,6 +798,21 @@ _GL_CXXALIASWARN (strdup); | |||
| 791 | # endif | 798 | # endif |
| 792 | #endif | 799 | #endif |
| 793 | 800 | ||
| 801 | /* Are strings S1 and S2 equal? */ | ||
| 802 | #if @GNULIB_STRINGEQ@ && !@HAVE_DECL_STREQ@ | ||
| 803 | # ifdef __cplusplus | ||
| 804 | extern "C" { | ||
| 805 | # endif | ||
| 806 | _GL_STRING_INLINE bool | ||
| 807 | streq (char const *__s1, char const *__s2) | ||
| 808 | { | ||
| 809 | return !strcmp (__s1, __s2); | ||
| 810 | } | ||
| 811 | # ifdef __cplusplus | ||
| 812 | } | ||
| 813 | # endif | ||
| 814 | #endif | ||
| 815 | |||
| 794 | /* Append no more than N characters from SRC onto DEST. */ | 816 | /* Append no more than N characters from SRC onto DEST. */ |
| 795 | #if @GNULIB_STRNCAT@ | 817 | #if @GNULIB_STRNCAT@ |
| 796 | # if @REPLACE_STRNCAT@ | 818 | # if @REPLACE_STRNCAT@ |
| @@ -812,7 +834,6 @@ _GL_CXXALIAS_SYS (strncat, char *, | |||
| 812 | _GL_CXXALIASWARN (strncat); | 834 | _GL_CXXALIASWARN (strncat); |
| 813 | # endif | 835 | # endif |
| 814 | #elif defined GNULIB_POSIXCHECK | 836 | #elif defined GNULIB_POSIXCHECK |
| 815 | # undef strncat | ||
| 816 | # if HAVE_RAW_DECL_STRNCAT | 837 | # if HAVE_RAW_DECL_STRNCAT |
| 817 | _GL_WARN_ON_USE (strncat, "strncat is unportable - " | 838 | _GL_WARN_ON_USE (strncat, "strncat is unportable - " |
| 818 | "use gnulib module strncat for portability"); | 839 | "use gnulib module strncat for portability"); |
| @@ -896,7 +917,6 @@ _GL_FUNCDECL_SYS (strndup, char *, | |||
| 896 | # endif | 917 | # endif |
| 897 | # endif | 918 | # endif |
| 898 | # if defined GNULIB_POSIXCHECK | 919 | # if defined GNULIB_POSIXCHECK |
| 899 | # undef strndup | ||
| 900 | # if HAVE_RAW_DECL_STRNDUP | 920 | # if HAVE_RAW_DECL_STRNDUP |
| 901 | _GL_WARN_ON_USE (strndup, "strndup is unportable - " | 921 | _GL_WARN_ON_USE (strndup, "strndup is unportable - " |
| 902 | "use gnulib module strndup for portability"); | 922 | "use gnulib module strndup for portability"); |
| @@ -927,7 +947,6 @@ _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); | |||
| 927 | # endif | 947 | # endif |
| 928 | _GL_CXXALIASWARN (strnlen); | 948 | _GL_CXXALIASWARN (strnlen); |
| 929 | #elif defined GNULIB_POSIXCHECK | 949 | #elif defined GNULIB_POSIXCHECK |
| 930 | # undef strnlen | ||
| 931 | # if HAVE_RAW_DECL_STRNLEN | 950 | # if HAVE_RAW_DECL_STRNLEN |
| 932 | _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " | 951 | _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " |
| 933 | "use gnulib module strnlen for portability"); | 952 | "use gnulib module strnlen for portability"); |
| @@ -939,7 +958,6 @@ _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " | |||
| 939 | Even in this simple case, it does not work with multibyte strings if the | 958 | Even in this simple case, it does not work with multibyte strings if the |
| 940 | locale encoding is GB18030 and one of the characters to be searched is a | 959 | locale encoding is GB18030 and one of the characters to be searched is a |
| 941 | digit. */ | 960 | digit. */ |
| 942 | # undef strcspn | ||
| 943 | /* Assume strcspn is always declared. */ | 961 | /* Assume strcspn is always declared. */ |
| 944 | _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " | 962 | _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " |
| 945 | "in multibyte locales - " | 963 | "in multibyte locales - " |
| @@ -976,7 +994,6 @@ _GL_CXXALIASWARN (strpbrk); | |||
| 976 | Even in this simple case, it does not work with multibyte strings if the | 994 | Even in this simple case, it does not work with multibyte strings if the |
| 977 | locale encoding is GB18030 and one of the characters to be searched is a | 995 | locale encoding is GB18030 and one of the characters to be searched is a |
| 978 | digit. */ | 996 | digit. */ |
| 979 | # undef strpbrk | ||
| 980 | _GL_WARN_ON_USE_CXX (strpbrk, | 997 | _GL_WARN_ON_USE_CXX (strpbrk, |
| 981 | const char *, char *, (const char *, const char *), | 998 | const char *, char *, (const char *, const char *), |
| 982 | "strpbrk cannot work correctly on character strings " | 999 | "strpbrk cannot work correctly on character strings " |
| @@ -996,7 +1013,6 @@ _GL_WARN_ON_USE_CXX (strpbrk, | |||
| 996 | #if defined GNULIB_POSIXCHECK | 1013 | #if defined GNULIB_POSIXCHECK |
| 997 | /* strspn() assumes the second argument is a list of single-byte characters. | 1014 | /* strspn() assumes the second argument is a list of single-byte characters. |
| 998 | Even in this simple case, it cannot work with multibyte strings. */ | 1015 | Even in this simple case, it cannot work with multibyte strings. */ |
| 999 | # undef strspn | ||
| 1000 | /* Assume strspn is always declared. */ | 1016 | /* Assume strspn is always declared. */ |
| 1001 | _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " | 1017 | _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " |
| 1002 | "in multibyte locales - " | 1018 | "in multibyte locales - " |
| @@ -1006,7 +1022,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " | |||
| 1006 | #if defined GNULIB_POSIXCHECK | 1022 | #if defined GNULIB_POSIXCHECK |
| 1007 | /* strrchr() does not work with multibyte strings if the locale encoding is | 1023 | /* strrchr() does not work with multibyte strings if the locale encoding is |
| 1008 | GB18030 and the character to be searched is a digit. */ | 1024 | GB18030 and the character to be searched is a digit. */ |
| 1009 | # undef strrchr | ||
| 1010 | /* Assume strrchr is always declared. */ | 1025 | /* Assume strrchr is always declared. */ |
| 1011 | _GL_WARN_ON_USE_CXX (strrchr, | 1026 | _GL_WARN_ON_USE_CXX (strrchr, |
| 1012 | const char *, char *, (const char *, int), | 1027 | const char *, char *, (const char *, int), |
| @@ -1041,13 +1056,11 @@ _GL_CXXALIAS_SYS (strsep, char *, | |||
| 1041 | (char **restrict __stringp, char const *restrict __delim)); | 1056 | (char **restrict __stringp, char const *restrict __delim)); |
| 1042 | _GL_CXXALIASWARN (strsep); | 1057 | _GL_CXXALIASWARN (strsep); |
| 1043 | # if defined GNULIB_POSIXCHECK | 1058 | # if defined GNULIB_POSIXCHECK |
| 1044 | # undef strsep | ||
| 1045 | _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " | 1059 | _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " |
| 1046 | "in multibyte locales - " | 1060 | "in multibyte locales - " |
| 1047 | "use mbssep if you care about internationalization"); | 1061 | "use mbssep if you care about internationalization"); |
| 1048 | # endif | 1062 | # endif |
| 1049 | #elif defined GNULIB_POSIXCHECK | 1063 | #elif defined GNULIB_POSIXCHECK |
| 1050 | # undef strsep | ||
| 1051 | # if HAVE_RAW_DECL_STRSEP | 1064 | # if HAVE_RAW_DECL_STRSEP |
| 1052 | _GL_WARN_ON_USE (strsep, "strsep is unportable - " | 1065 | _GL_WARN_ON_USE (strsep, "strsep is unportable - " |
| 1053 | "use gnulib module strsep for portability"); | 1066 | "use gnulib module strsep for portability"); |
| @@ -1142,7 +1155,6 @@ _GL_CXXALIASWARN (strcasestr); | |||
| 1142 | /* strcasestr() does not work with multibyte strings: | 1155 | /* strcasestr() does not work with multibyte strings: |
| 1143 | It is a glibc extension, and glibc implements it only for unibyte | 1156 | It is a glibc extension, and glibc implements it only for unibyte |
| 1144 | locales. */ | 1157 | locales. */ |
| 1145 | # undef strcasestr | ||
| 1146 | # if HAVE_RAW_DECL_STRCASESTR | 1158 | # if HAVE_RAW_DECL_STRCASESTR |
| 1147 | _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " | 1159 | _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " |
| 1148 | "strings in multibyte locales - " | 1160 | "strings in multibyte locales - " |
| @@ -1188,7 +1200,7 @@ _GL_CXXALIAS_RPL (strtok_r, char *, | |||
| 1188 | (char *restrict s, char const *restrict delim, | 1200 | (char *restrict s, char const *restrict delim, |
| 1189 | char **restrict save_ptr)); | 1201 | char **restrict save_ptr)); |
| 1190 | # else | 1202 | # else |
| 1191 | # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK | 1203 | # if @UNDEFINE_STRTOK_R@ |
| 1192 | # undef strtok_r | 1204 | # undef strtok_r |
| 1193 | # endif | 1205 | # endif |
| 1194 | # if ! @HAVE_DECL_STRTOK_R@ | 1206 | # if ! @HAVE_DECL_STRTOK_R@ |
| @@ -1208,7 +1220,6 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " | |||
| 1208 | "use mbstok_r if you care about internationalization"); | 1220 | "use mbstok_r if you care about internationalization"); |
| 1209 | # endif | 1221 | # endif |
| 1210 | #elif defined GNULIB_POSIXCHECK | 1222 | #elif defined GNULIB_POSIXCHECK |
| 1211 | # undef strtok_r | ||
| 1212 | # if HAVE_RAW_DECL_STRTOK_R | 1223 | # if HAVE_RAW_DECL_STRTOK_R |
| 1213 | _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " | 1224 | _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " |
| 1214 | "use gnulib module strtok_r for portability"); | 1225 | "use gnulib module strtok_r for portability"); |
| @@ -1241,7 +1252,7 @@ _GL_EXTERN_C bool str_endswith (const char *string, const char *prefix) | |||
| 1241 | # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ | 1252 | # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ |
| 1242 | # undef mbslen | 1253 | # undef mbslen |
| 1243 | # endif | 1254 | # endif |
| 1244 | # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ | 1255 | # if @HAVE_MBSLEN@ /* AIX, MirBSD define mbslen already in libc. */ |
| 1245 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1256 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1246 | # define mbslen rpl_mbslen | 1257 | # define mbslen rpl_mbslen |
| 1247 | # endif | 1258 | # endif |
| @@ -1546,8 +1557,6 @@ _GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, | |||
| 1546 | _GL_EXTERN_C bool mbs_startswith (const char *string, const char *prefix) | 1557 | _GL_EXTERN_C bool mbs_startswith (const char *string, const char *prefix) |
| 1547 | _GL_ATTRIBUTE_PURE | 1558 | _GL_ATTRIBUTE_PURE |
| 1548 | _GL_ARG_NONNULL ((1, 2)); | 1559 | _GL_ARG_NONNULL ((1, 2)); |
| 1549 | /* No extra code is needed for multibyte locales for this function. */ | ||
| 1550 | # define mbs_startswith str_startswith | ||
| 1551 | #endif | 1560 | #endif |
| 1552 | 1561 | ||
| 1553 | #if @GNULIB_MBS_ENDSWITH@ | 1562 | #if @GNULIB_MBS_ENDSWITH@ |
| @@ -1576,7 +1585,6 @@ _GL_CXXALIAS_SYS (strerror, char *, (int)); | |||
| 1576 | _GL_CXXALIASWARN (strerror); | 1585 | _GL_CXXALIASWARN (strerror); |
| 1577 | # endif | 1586 | # endif |
| 1578 | #elif defined GNULIB_POSIXCHECK | 1587 | #elif defined GNULIB_POSIXCHECK |
| 1579 | # undef strerror | ||
| 1580 | /* Assume strerror is always declared. */ | 1588 | /* Assume strerror is always declared. */ |
| 1581 | _GL_WARN_ON_USE (strerror, "strerror is unportable - " | 1589 | _GL_WARN_ON_USE (strerror, "strerror is unportable - " |
| 1582 | "use gnulib module strerror to guarantee non-NULL result"); | 1590 | "use gnulib module strerror to guarantee non-NULL result"); |
| @@ -1604,7 +1612,6 @@ _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); | |||
| 1604 | _GL_CXXALIASWARN (strerror_r); | 1612 | _GL_CXXALIASWARN (strerror_r); |
| 1605 | # endif | 1613 | # endif |
| 1606 | #elif defined GNULIB_POSIXCHECK | 1614 | #elif defined GNULIB_POSIXCHECK |
| 1607 | # undef strerror_r | ||
| 1608 | # if HAVE_RAW_DECL_STRERROR_R | 1615 | # if HAVE_RAW_DECL_STRERROR_R |
| 1609 | _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " | 1616 | _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " |
| 1610 | "use gnulib module strerror_r-posix for portability"); | 1617 | "use gnulib module strerror_r-posix for portability"); |
| @@ -1633,7 +1640,6 @@ _GL_CXXALIAS_SYS (strerror_l, char *, (int errnum, locale_t locale)); | |||
| 1633 | _GL_CXXALIASWARN (strerror_l); | 1640 | _GL_CXXALIASWARN (strerror_l); |
| 1634 | # endif | 1641 | # endif |
| 1635 | #elif defined GNULIB_POSIXCHECK | 1642 | #elif defined GNULIB_POSIXCHECK |
| 1636 | # undef strerror_l | ||
| 1637 | # if HAVE_RAW_DECL_STRERROR_L | 1643 | # if HAVE_RAW_DECL_STRERROR_L |
| 1638 | _GL_WARN_ON_USE (strerror_l, "strerror_l is unportable - " | 1644 | _GL_WARN_ON_USE (strerror_l, "strerror_l is unportable - " |
| 1639 | "use gnulib module strerror_l for portability"); | 1645 | "use gnulib module strerror_l for portability"); |
| @@ -1668,7 +1674,6 @@ _GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); | |||
| 1668 | _GL_CXXALIASWARN (strerrorname_np); | 1674 | _GL_CXXALIASWARN (strerrorname_np); |
| 1669 | # endif | 1675 | # endif |
| 1670 | #elif defined GNULIB_POSIXCHECK | 1676 | #elif defined GNULIB_POSIXCHECK |
| 1671 | # undef strerrorname_np | ||
| 1672 | # if HAVE_RAW_DECL_STRERRORNAME_NP | 1677 | # if HAVE_RAW_DECL_STRERRORNAME_NP |
| 1673 | _GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " | 1678 | _GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " |
| 1674 | "use gnulib module strerrorname_np for portability"); | 1679 | "use gnulib module strerrorname_np for portability"); |
| @@ -1683,7 +1688,6 @@ _GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig), ); | |||
| 1683 | _GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); | 1688 | _GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); |
| 1684 | _GL_CXXALIASWARN (sigabbrev_np); | 1689 | _GL_CXXALIASWARN (sigabbrev_np); |
| 1685 | #elif defined GNULIB_POSIXCHECK | 1690 | #elif defined GNULIB_POSIXCHECK |
| 1686 | # undef sigabbrev_np | ||
| 1687 | # if HAVE_RAW_DECL_SIGABBREV_NP | 1691 | # if HAVE_RAW_DECL_SIGABBREV_NP |
| 1688 | _GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " | 1692 | _GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " |
| 1689 | "use gnulib module sigabbrev_np for portability"); | 1693 | "use gnulib module sigabbrev_np for portability"); |
| @@ -1698,7 +1702,6 @@ _GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig), ); | |||
| 1698 | _GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); | 1702 | _GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); |
| 1699 | _GL_CXXALIASWARN (sigdescr_np); | 1703 | _GL_CXXALIASWARN (sigdescr_np); |
| 1700 | #elif defined GNULIB_POSIXCHECK | 1704 | #elif defined GNULIB_POSIXCHECK |
| 1701 | # undef sigdescr_np | ||
| 1702 | # if HAVE_RAW_DECL_SIGDESCR_NP | 1705 | # if HAVE_RAW_DECL_SIGDESCR_NP |
| 1703 | _GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " | 1706 | _GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " |
| 1704 | "use gnulib module sigdescr_np for portability"); | 1707 | "use gnulib module sigdescr_np for portability"); |
| @@ -1722,7 +1725,6 @@ _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); | |||
| 1722 | # endif | 1725 | # endif |
| 1723 | _GL_CXXALIASWARN (strsignal); | 1726 | _GL_CXXALIASWARN (strsignal); |
| 1724 | #elif defined GNULIB_POSIXCHECK | 1727 | #elif defined GNULIB_POSIXCHECK |
| 1725 | # undef strsignal | ||
| 1726 | # if HAVE_RAW_DECL_STRSIGNAL | 1728 | # if HAVE_RAW_DECL_STRSIGNAL |
| 1727 | _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " | 1729 | _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " |
| 1728 | "use gnulib module strsignal for portability"); | 1730 | "use gnulib module strsignal for portability"); |
| @@ -1748,13 +1750,13 @@ _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); | |||
| 1748 | # endif | 1750 | # endif |
| 1749 | _GL_CXXALIASWARN (strverscmp); | 1751 | _GL_CXXALIASWARN (strverscmp); |
| 1750 | #elif defined GNULIB_POSIXCHECK | 1752 | #elif defined GNULIB_POSIXCHECK |
| 1751 | # undef strverscmp | ||
| 1752 | # if HAVE_RAW_DECL_STRVERSCMP | 1753 | # if HAVE_RAW_DECL_STRVERSCMP |
| 1753 | _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " | 1754 | _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " |
| 1754 | "use gnulib module strverscmp for portability"); | 1755 | "use gnulib module strverscmp for portability"); |
| 1755 | # endif | 1756 | # endif |
| 1756 | #endif | 1757 | #endif |
| 1757 | 1758 | ||
| 1759 | _GL_INLINE_HEADER_END | ||
| 1758 | 1760 | ||
| 1759 | #endif /* _@GUARD_PREFIX@_STRING_H */ | 1761 | #endif /* _@GUARD_PREFIX@_STRING_H */ |
| 1760 | #endif /* _@GUARD_PREFIX@_STRING_H */ | 1762 | #endif /* _@GUARD_PREFIX@_STRING_H */ |
diff --git a/gl/strings.in.h b/gl/strings.in.h index 40c891d7..fd7cd2df 100644 --- a/gl/strings.in.h +++ b/gl/strings.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute <strings.h>. | 1 | /* A substitute <strings.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -76,7 +76,6 @@ _GL_FUNCDECL_SYS (ffs, int, (int i), ); | |||
| 76 | _GL_CXXALIAS_SYS (ffs, int, (int i)); | 76 | _GL_CXXALIAS_SYS (ffs, int, (int i)); |
| 77 | _GL_CXXALIASWARN (ffs); | 77 | _GL_CXXALIASWARN (ffs); |
| 78 | #elif defined GNULIB_POSIXCHECK | 78 | #elif defined GNULIB_POSIXCHECK |
| 79 | # undef ffs | ||
| 80 | # if HAVE_RAW_DECL_FFS | 79 | # if HAVE_RAW_DECL_FFS |
| 81 | _GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); | 80 | _GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); |
| 82 | # endif | 81 | # endif |
| @@ -109,7 +108,6 @@ _GL_CXXALIASWARN (strcasecmp); | |||
| 109 | /* strcasecmp() does not work with multibyte strings: | 108 | /* strcasecmp() does not work with multibyte strings: |
| 110 | POSIX says that it operates on "strings", and "string" in POSIX is defined | 109 | POSIX says that it operates on "strings", and "string" in POSIX is defined |
| 111 | as a sequence of bytes, not of characters. */ | 110 | as a sequence of bytes, not of characters. */ |
| 112 | # undef strcasecmp | ||
| 113 | # if HAVE_RAW_DECL_STRCASECMP | 111 | # if HAVE_RAW_DECL_STRCASECMP |
| 114 | _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " | 112 | _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " |
| 115 | "strings in multibyte locales and is unportable - " | 113 | "strings in multibyte locales and is unportable - " |
| @@ -147,7 +145,6 @@ _GL_CXXALIASWARN (strcasecmp_l); | |||
| 147 | /* strcasecmp_l() does not work with multibyte strings: | 145 | /* strcasecmp_l() does not work with multibyte strings: |
| 148 | POSIX says that it operates on "strings", and "string" in POSIX is defined | 146 | POSIX says that it operates on "strings", and "string" in POSIX is defined |
| 149 | as a sequence of bytes, not of characters. */ | 147 | as a sequence of bytes, not of characters. */ |
| 150 | # undef strcasecmp_l | ||
| 151 | # if HAVE_RAW_DECL_STRCASECMP_L | 148 | # if HAVE_RAW_DECL_STRCASECMP_L |
| 152 | _GL_WARN_ON_USE (strcasecmp_l, "strcasecmp_l cannot work correctly on " | 149 | _GL_WARN_ON_USE (strcasecmp_l, "strcasecmp_l cannot work correctly on " |
| 153 | "character strings in multibyte locales and is unportable - " | 150 | "character strings in multibyte locales and is unportable - " |
| @@ -182,7 +179,6 @@ _GL_CXXALIASWARN (strncasecmp); | |||
| 182 | /* strncasecmp() does not work with multibyte strings: | 179 | /* strncasecmp() does not work with multibyte strings: |
| 183 | POSIX says that it operates on "strings", and "string" in POSIX is defined | 180 | POSIX says that it operates on "strings", and "string" in POSIX is defined |
| 184 | as a sequence of bytes, not of characters. */ | 181 | as a sequence of bytes, not of characters. */ |
| 185 | # undef strncasecmp | ||
| 186 | # if HAVE_RAW_DECL_STRNCASECMP | 182 | # if HAVE_RAW_DECL_STRNCASECMP |
| 187 | _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " | 183 | _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " |
| 188 | "strings in multibyte locales and is unportable - " | 184 | "strings in multibyte locales and is unportable - " |
| @@ -220,7 +216,6 @@ _GL_CXXALIASWARN (strncasecmp_l); | |||
| 220 | /* strncasecmp_l() does not work with multibyte strings: | 216 | /* strncasecmp_l() does not work with multibyte strings: |
| 221 | POSIX says that it operates on "strings", and "string" in POSIX is defined | 217 | POSIX says that it operates on "strings", and "string" in POSIX is defined |
| 222 | as a sequence of bytes, not of characters. */ | 218 | as a sequence of bytes, not of characters. */ |
| 223 | # undef strncasecmp_l | ||
| 224 | # if HAVE_RAW_DECL_STRNCASECMP_L | 219 | # if HAVE_RAW_DECL_STRNCASECMP_L |
| 225 | _GL_WARN_ON_USE (strncasecmp_l, "strncasecmp_l cannot work correctly on " | 220 | _GL_WARN_ON_USE (strncasecmp_l, "strncasecmp_l cannot work correctly on " |
| 226 | "character strings in multibyte locales and is unportable - " | 221 | "character strings in multibyte locales and is unportable - " |
diff --git a/gl/stripslash.c b/gl/stripslash.c index d5b07bca..8f8c38e3 100644 --- a/gl/stripslash.c +++ b/gl/stripslash.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stripslash.c -- remove redundant trailing slashes from a file name | 1 | /* stripslash.c -- remove redundant trailing slashes from a file name |
| 2 | 2 | ||
| 3 | Copyright (C) 1990, 2001, 2003-2006, 2009-2025 Free Software Foundation, | 3 | Copyright (C) 1990, 2001, 2003-2006, 2009-2026 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -31,15 +31,13 @@ bool | |||
| 31 | strip_trailing_slashes (char *file) | 31 | strip_trailing_slashes (char *file) |
| 32 | { | 32 | { |
| 33 | char *base = last_component (file); | 33 | char *base = last_component (file); |
| 34 | char *base_lim; | ||
| 35 | bool had_slash; | ||
| 36 | 34 | ||
| 37 | /* last_component returns "" for file system roots, but we need to turn | 35 | /* last_component returns "" for file system roots, but we need to turn |
| 38 | "///" into "/". */ | 36 | "///" into "/". */ |
| 39 | if (! *base) | 37 | if (! *base) |
| 40 | base = file; | 38 | base = file; |
| 41 | base_lim = base + base_len (base); | 39 | char *base_lim = base + base_len (base); |
| 42 | had_slash = (*base_lim != '\0'); | 40 | bool had_slash = (*base_lim != '\0'); |
| 43 | *base_lim = '\0'; | 41 | *base_lim = '\0'; |
| 44 | return had_slash; | 42 | return had_slash; |
| 45 | } | 43 | } |
diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c index 7d7c5b7f..c6bec00d 100644 --- a/gl/strncasecmp.c +++ b/gl/strncasecmp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Case-insensitive string comparison function for unibyte locales. | 1 | /* Case-insensitive string comparison function for unibyte locales. |
| 2 | Copyright (C) 1998-1999, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-1999, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -32,29 +32,24 @@ strncasecmp (const char *s1, const char *s2, size_t n) | |||
| 32 | { | 32 | { |
| 33 | register const unsigned char *p1 = (const unsigned char *) s1; | 33 | register const unsigned char *p1 = (const unsigned char *) s1; |
| 34 | register const unsigned char *p2 = (const unsigned char *) s2; | 34 | register const unsigned char *p2 = (const unsigned char *) s2; |
| 35 | unsigned char c1, c2; | ||
| 36 | 35 | ||
| 37 | if (p1 == p2 || n == 0) | 36 | if (p1 == p2 || n == 0) |
| 38 | return 0; | 37 | return 0; |
| 39 | 38 | ||
| 40 | do | 39 | for (;; p1++, p2++) |
| 41 | { | 40 | { |
| 42 | c1 = tolower (*p1); | 41 | unsigned char c1 = tolower (*p1); |
| 43 | c2 = tolower (*p2); | 42 | unsigned char c2 = tolower (*p2); |
| 44 | 43 | ||
| 45 | if (--n == 0 || c1 == '\0') | 44 | if (--n == 0 || c1 == '\0' || c1 != c2) |
| 46 | break; | 45 | { |
| 47 | 46 | if (UCHAR_MAX <= INT_MAX) | |
| 48 | ++p1; | 47 | return c1 - c2; |
| 49 | ++p2; | 48 | else |
| 49 | /* On machines where 'char' and 'int' are types of the same size, | ||
| 50 | the difference of two 'unsigned char' values - including the | ||
| 51 | sign bit - doesn't fit in an 'int'. */ | ||
| 52 | return _GL_CMP (c1, c2); | ||
| 53 | } | ||
| 50 | } | 54 | } |
| 51 | while (c1 == c2); | ||
| 52 | |||
| 53 | if (UCHAR_MAX <= INT_MAX) | ||
| 54 | return c1 - c2; | ||
| 55 | else | ||
| 56 | /* On machines where 'char' and 'int' are types of the same size, the | ||
| 57 | difference of two 'unsigned char' values - including the sign bit - | ||
| 58 | doesn't fit in an 'int'. */ | ||
| 59 | return _GL_CMP (c1, c2); | ||
| 60 | } | 55 | } |
diff --git a/gl/strncpy.c b/gl/strncpy.c index 1b680046..25908377 100644 --- a/gl/strncpy.c +++ b/gl/strncpy.c | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | /* Copy a size-bounded string. | 1 | /* Copy a size-bounded string. |
| 2 | Copyright (C) 1999, 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| 6 | published by the Free Software Foundation, either version 3 of the | 6 | published by the Free Software Foundation; either version 2.1 of the |
| 7 | License, or (at your option) any later version. | 7 | License, or (at your option) any later version. |
| 8 | 8 | ||
| 9 | This file is distributed in the hope that it will be useful, | 9 | This file is distributed in the hope that it will be useful, |
diff --git a/gl/strsep.c b/gl/strsep.c index 5a489d11..6338c62d 100644 --- a/gl/strsep.c +++ b/gl/strsep.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2004, 2007, 2009-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2004, 2007, 2009-2026 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | Written by Yoann Vandoorselaere <yoann@prelude-ids.org>. | 3 | Written by Yoann Vandoorselaere <yoann@prelude-ids.org>. |
| 4 | 4 | ||
| @@ -26,7 +26,6 @@ char * | |||
| 26 | strsep (char **stringp, const char *delim) | 26 | strsep (char **stringp, const char *delim) |
| 27 | { | 27 | { |
| 28 | char *start = *stringp; | 28 | char *start = *stringp; |
| 29 | char *ptr; | ||
| 30 | 29 | ||
| 31 | if (start == NULL) | 30 | if (start == NULL) |
| 32 | return NULL; | 31 | return NULL; |
| @@ -38,12 +37,14 @@ strsep (char **stringp, const char *delim) | |||
| 38 | return start; | 37 | return start; |
| 39 | } | 38 | } |
| 40 | 39 | ||
| 40 | char *ptr; | ||
| 41 | /* Optimize the case of one delimiter. */ | 41 | /* Optimize the case of one delimiter. */ |
| 42 | if (delim[1] == '\0') | 42 | if (delim[1] == '\0') |
| 43 | ptr = strchr (start, delim[0]); | 43 | ptr = strchr (start, delim[0]); |
| 44 | else | 44 | else |
| 45 | /* The general case. */ | 45 | /* The general case. */ |
| 46 | ptr = strpbrk (start, delim); | 46 | ptr = strpbrk (start, delim); |
| 47 | |||
| 47 | if (ptr == NULL) | 48 | if (ptr == NULL) |
| 48 | { | 49 | { |
| 49 | *stringp = NULL; | 50 | *stringp = NULL; |
diff --git a/gl/strstr.c b/gl/strstr.c index d6953f90..a5730a37 100644 --- a/gl/strstr.c +++ b/gl/strstr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2025 Free Software | 1 | /* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2026 Free Software |
| 2 | Foundation, Inc. | 2 | Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| @@ -36,31 +36,33 @@ | |||
| 36 | char * | 36 | char * |
| 37 | strstr (const char *haystack_start, const char *needle_start) | 37 | strstr (const char *haystack_start, const char *needle_start) |
| 38 | { | 38 | { |
| 39 | const char *haystack = haystack_start; | ||
| 40 | const char *needle = needle_start; | 39 | const char *needle = needle_start; |
| 41 | size_t needle_len; /* Length of NEEDLE. */ | ||
| 42 | size_t haystack_len; /* Known minimum length of HAYSTACK. */ | ||
| 43 | bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ | ||
| 44 | 40 | ||
| 45 | /* Determine length of NEEDLE, and in the process, make sure | 41 | /* Determine length of NEEDLE, and in the process, make sure |
| 46 | HAYSTACK is at least as long (no point processing all of a long | 42 | HAYSTACK is at least as long (no point processing all of a long |
| 47 | NEEDLE if HAYSTACK is too short). */ | 43 | NEEDLE if HAYSTACK is too short). */ |
| 48 | while (*haystack && *needle) | 44 | { |
| 49 | ok &= *haystack++ == *needle++; | 45 | const char *haystack = haystack_start; |
| 50 | if (*needle) | 46 | bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ |
| 51 | return NULL; | 47 | while (*haystack && *needle) |
| 52 | if (ok) | 48 | ok &= *haystack++ == *needle++; |
| 53 | return (char *) haystack_start; | 49 | if (*needle) |
| 50 | return NULL; | ||
| 51 | if (ok) | ||
| 52 | return (char *) haystack_start; | ||
| 53 | } | ||
| 54 | 54 | ||
| 55 | /* Reduce the size of haystack using strchr, since it has a smaller | 55 | /* Reduce the size of haystack using strchr, since it has a smaller |
| 56 | linear coefficient than the Two-Way algorithm. */ | 56 | linear coefficient than the Two-Way algorithm. */ |
| 57 | needle_len = needle - needle_start; | 57 | size_t needle_len = /* Length of NEEDLE. */ |
| 58 | haystack = strchr (haystack_start + 1, *needle_start); | 58 | needle - needle_start; |
| 59 | const char *haystack = strchr (haystack_start + 1, *needle_start); | ||
| 59 | if (!haystack || __builtin_expect (needle_len == 1, 0)) | 60 | if (!haystack || __builtin_expect (needle_len == 1, 0)) |
| 60 | return (char *) haystack; | 61 | return (char *) haystack; |
| 61 | needle -= needle_len; | 62 | needle -= needle_len; |
| 62 | haystack_len = (haystack > haystack_start + needle_len ? 1 | 63 | size_t haystack_len = /* Known minimum length of HAYSTACK. */ |
| 63 | : needle_len + haystack_start - haystack); | 64 | (haystack > haystack_start + needle_len ? 1 |
| 65 | : needle_len + haystack_start - haystack); | ||
| 64 | 66 | ||
| 65 | /* Perform the search. Abstract memory is considered to be an array | 67 | /* Perform the search. Abstract memory is considered to be an array |
| 66 | of 'unsigned char' values, not an array of 'char' values. See | 68 | of 'unsigned char' values, not an array of 'char' values. See |
diff --git a/gl/sys-limits.h b/gl/sys-limits.h index a556dfeb..d61ebdf7 100644 --- a/gl/sys-limits.h +++ b/gl/sys-limits.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* System call limits | 1 | /* System call limits |
| 2 | 2 | ||
| 3 | Copyright 2018-2025 Free Software Foundation, Inc. | 3 | Copyright 2018-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -30,10 +30,6 @@ | |||
| 30 | Using this also works around a serious Linux bug before 2.6.16; see | 30 | Using this also works around a serious Linux bug before 2.6.16; see |
| 31 | <https://bugzilla.redhat.com/show_bug.cgi?id=612839>. | 31 | <https://bugzilla.redhat.com/show_bug.cgi?id=612839>. |
| 32 | 32 | ||
| 33 | Using this also works around a Tru64 5.1 bug, where attempting | ||
| 34 | to read INT_MAX bytes fails with errno == EINVAL. See | ||
| 35 | <https://lists.gnu.org/r/bug-gnu-utils/2002-04/msg00010.html>. | ||
| 36 | |||
| 37 | Using this is likely to work around similar bugs in other operating | 33 | Using this is likely to work around similar bugs in other operating |
| 38 | systems. */ | 34 | systems. */ |
| 39 | 35 | ||
diff --git a/gl/sys_socket.c b/gl/sys_socket.c index efd36610..023a7c55 100644 --- a/gl/sys_socket.c +++ b/gl/sys_socket.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <sys/socket.h>. | 1 | /* Inline functions for <sys/socket.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h index 8632c66d..c19b7461 100644 --- a/gl/sys_socket.in.h +++ b/gl/sys_socket.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide a sys/socket header file for systems lacking it (read: MinGW) | 1 | /* Provide a sys/socket header file for systems lacking it (read: MinGW) |
| 2 | and for systems where it is incomplete. | 2 | and for systems where it is incomplete. |
| 3 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 4 | Written by Simon Josefsson. | 4 | Written by Simon Josefsson. |
| 5 | 5 | ||
| 6 | This file is free software: you can redistribute it and/or modify | 6 | This file is free software: you can redistribute it and/or modify |
| @@ -235,11 +235,10 @@ struct msghdr { | |||
| 235 | _GL_SYS_SOCKET_INLINE int | 235 | _GL_SYS_SOCKET_INLINE int |
| 236 | rpl_fd_isset (SOCKET fd, fd_set * set) | 236 | rpl_fd_isset (SOCKET fd, fd_set * set) |
| 237 | { | 237 | { |
| 238 | u_int i; | ||
| 239 | if (set == NULL) | 238 | if (set == NULL) |
| 240 | return 0; | 239 | return 0; |
| 241 | 240 | ||
| 242 | for (i = 0; i < set->fd_count; i++) | 241 | for (u_int i = 0; i < set->fd_count; i++) |
| 243 | if (set->fd_array[i] == fd) | 242 | if (set->fd_array[i] == fd) |
| 244 | return 1; | 243 | return 1; |
| 245 | 244 | ||
| @@ -304,7 +303,6 @@ _GL_CXXALIASWARN (socket); | |||
| 304 | # define socket socket_used_without_requesting_gnulib_module_socket | 303 | # define socket socket_used_without_requesting_gnulib_module_socket |
| 305 | # endif | 304 | # endif |
| 306 | #elif defined GNULIB_POSIXCHECK | 305 | #elif defined GNULIB_POSIXCHECK |
| 307 | # undef socket | ||
| 308 | # if HAVE_RAW_DECL_SOCKET | 306 | # if HAVE_RAW_DECL_SOCKET |
| 309 | _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " | 307 | _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " |
| 310 | "use gnulib module socket for portability"); | 308 | "use gnulib module socket for portability"); |
| @@ -336,7 +334,6 @@ _GL_CXXALIASWARN (connect); | |||
| 336 | # define connect connect_used_without_requesting_gnulib_module_connect | 334 | # define connect connect_used_without_requesting_gnulib_module_connect |
| 337 | # endif | 335 | # endif |
| 338 | #elif defined GNULIB_POSIXCHECK | 336 | #elif defined GNULIB_POSIXCHECK |
| 339 | # undef connect | ||
| 340 | # if HAVE_RAW_DECL_CONNECT | 337 | # if HAVE_RAW_DECL_CONNECT |
| 341 | _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " | 338 | _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " |
| 342 | "use gnulib module connect for portability"); | 339 | "use gnulib module connect for portability"); |
| @@ -374,7 +371,6 @@ _GL_CXXALIASWARN (accept); | |||
| 374 | # define accept accept_used_without_requesting_gnulib_module_accept | 371 | # define accept accept_used_without_requesting_gnulib_module_accept |
| 375 | # endif | 372 | # endif |
| 376 | #elif defined GNULIB_POSIXCHECK | 373 | #elif defined GNULIB_POSIXCHECK |
| 377 | # undef accept | ||
| 378 | # if HAVE_RAW_DECL_ACCEPT | 374 | # if HAVE_RAW_DECL_ACCEPT |
| 379 | _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " | 375 | _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " |
| 380 | "use gnulib module accept for portability"); | 376 | "use gnulib module accept for portability"); |
| @@ -406,7 +402,6 @@ _GL_CXXALIASWARN (bind); | |||
| 406 | # define bind bind_used_without_requesting_gnulib_module_bind | 402 | # define bind bind_used_without_requesting_gnulib_module_bind |
| 407 | # endif | 403 | # endif |
| 408 | #elif defined GNULIB_POSIXCHECK | 404 | #elif defined GNULIB_POSIXCHECK |
| 409 | # undef bind | ||
| 410 | # if HAVE_RAW_DECL_BIND | 405 | # if HAVE_RAW_DECL_BIND |
| 411 | _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " | 406 | _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " |
| 412 | "use gnulib module bind for portability"); | 407 | "use gnulib module bind for portability"); |
| @@ -442,7 +437,6 @@ _GL_CXXALIASWARN (getpeername); | |||
| 442 | # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername | 437 | # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername |
| 443 | # endif | 438 | # endif |
| 444 | #elif defined GNULIB_POSIXCHECK | 439 | #elif defined GNULIB_POSIXCHECK |
| 445 | # undef getpeername | ||
| 446 | # if HAVE_RAW_DECL_GETPEERNAME | 440 | # if HAVE_RAW_DECL_GETPEERNAME |
| 447 | _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " | 441 | _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " |
| 448 | "use gnulib module getpeername for portability"); | 442 | "use gnulib module getpeername for portability"); |
| @@ -478,7 +472,6 @@ _GL_CXXALIASWARN (getsockname); | |||
| 478 | # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname | 472 | # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname |
| 479 | # endif | 473 | # endif |
| 480 | #elif defined GNULIB_POSIXCHECK | 474 | #elif defined GNULIB_POSIXCHECK |
| 481 | # undef getsockname | ||
| 482 | # if HAVE_RAW_DECL_GETSOCKNAME | 475 | # if HAVE_RAW_DECL_GETSOCKNAME |
| 483 | _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " | 476 | _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " |
| 484 | "use gnulib module getsockname for portability"); | 477 | "use gnulib module getsockname for portability"); |
| @@ -512,7 +505,6 @@ _GL_CXXALIASWARN (getsockopt); | |||
| 512 | # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt | 505 | # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt |
| 513 | # endif | 506 | # endif |
| 514 | #elif defined GNULIB_POSIXCHECK | 507 | #elif defined GNULIB_POSIXCHECK |
| 515 | # undef getsockopt | ||
| 516 | # if HAVE_RAW_DECL_GETSOCKOPT | 508 | # if HAVE_RAW_DECL_GETSOCKOPT |
| 517 | _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " | 509 | _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " |
| 518 | "use gnulib module getsockopt for portability"); | 510 | "use gnulib module getsockopt for portability"); |
| @@ -537,7 +529,6 @@ _GL_CXXALIASWARN (listen); | |||
| 537 | # define listen listen_used_without_requesting_gnulib_module_listen | 529 | # define listen listen_used_without_requesting_gnulib_module_listen |
| 538 | # endif | 530 | # endif |
| 539 | #elif defined GNULIB_POSIXCHECK | 531 | #elif defined GNULIB_POSIXCHECK |
| 540 | # undef listen | ||
| 541 | # if HAVE_RAW_DECL_LISTEN | 532 | # if HAVE_RAW_DECL_LISTEN |
| 542 | _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " | 533 | _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " |
| 543 | "use gnulib module listen for portability"); | 534 | "use gnulib module listen for portability"); |
| @@ -566,7 +557,6 @@ _GL_CXXALIASWARN (recv); | |||
| 566 | # define recv recv_used_without_requesting_gnulib_module_recv | 557 | # define recv recv_used_without_requesting_gnulib_module_recv |
| 567 | # endif | 558 | # endif |
| 568 | #elif defined GNULIB_POSIXCHECK | 559 | #elif defined GNULIB_POSIXCHECK |
| 569 | # undef recv | ||
| 570 | # if HAVE_RAW_DECL_RECV | 560 | # if HAVE_RAW_DECL_RECV |
| 571 | _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " | 561 | _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " |
| 572 | "use gnulib module recv for portability"); | 562 | "use gnulib module recv for portability"); |
| @@ -598,7 +588,6 @@ _GL_CXXALIASWARN (send); | |||
| 598 | # define send send_used_without_requesting_gnulib_module_send | 588 | # define send send_used_without_requesting_gnulib_module_send |
| 599 | # endif | 589 | # endif |
| 600 | #elif defined GNULIB_POSIXCHECK | 590 | #elif defined GNULIB_POSIXCHECK |
| 601 | # undef send | ||
| 602 | # if HAVE_RAW_DECL_SEND | 591 | # if HAVE_RAW_DECL_SEND |
| 603 | _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " | 592 | _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " |
| 604 | "use gnulib module send for portability"); | 593 | "use gnulib module send for portability"); |
| @@ -637,7 +626,6 @@ _GL_CXXALIASWARN (recvfrom); | |||
| 637 | # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom | 626 | # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom |
| 638 | # endif | 627 | # endif |
| 639 | #elif defined GNULIB_POSIXCHECK | 628 | #elif defined GNULIB_POSIXCHECK |
| 640 | # undef recvfrom | ||
| 641 | # if HAVE_RAW_DECL_RECVFROM | 629 | # if HAVE_RAW_DECL_RECVFROM |
| 642 | _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " | 630 | _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " |
| 643 | "use gnulib module recvfrom for portability"); | 631 | "use gnulib module recvfrom for portability"); |
| @@ -671,7 +659,6 @@ _GL_CXXALIASWARN (sendto); | |||
| 671 | # define sendto sendto_used_without_requesting_gnulib_module_sendto | 659 | # define sendto sendto_used_without_requesting_gnulib_module_sendto |
| 672 | # endif | 660 | # endif |
| 673 | #elif defined GNULIB_POSIXCHECK | 661 | #elif defined GNULIB_POSIXCHECK |
| 674 | # undef sendto | ||
| 675 | # if HAVE_RAW_DECL_SENDTO | 662 | # if HAVE_RAW_DECL_SENDTO |
| 676 | _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " | 663 | _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " |
| 677 | "use gnulib module sendto for portability"); | 664 | "use gnulib module sendto for portability"); |
| @@ -703,7 +690,6 @@ _GL_CXXALIASWARN (setsockopt); | |||
| 703 | # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt | 690 | # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt |
| 704 | # endif | 691 | # endif |
| 705 | #elif defined GNULIB_POSIXCHECK | 692 | #elif defined GNULIB_POSIXCHECK |
| 706 | # undef setsockopt | ||
| 707 | # if HAVE_RAW_DECL_SETSOCKOPT | 693 | # if HAVE_RAW_DECL_SETSOCKOPT |
| 708 | _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " | 694 | _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " |
| 709 | "use gnulib module setsockopt for portability"); | 695 | "use gnulib module setsockopt for portability"); |
| @@ -728,7 +714,6 @@ _GL_CXXALIASWARN (shutdown); | |||
| 728 | # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown | 714 | # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown |
| 729 | # endif | 715 | # endif |
| 730 | #elif defined GNULIB_POSIXCHECK | 716 | #elif defined GNULIB_POSIXCHECK |
| 731 | # undef shutdown | ||
| 732 | # if HAVE_RAW_DECL_SHUTDOWN | 717 | # if HAVE_RAW_DECL_SHUTDOWN |
| 733 | _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " | 718 | _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " |
| 734 | "use gnulib module shutdown for portability"); | 719 | "use gnulib module shutdown for portability"); |
| @@ -761,7 +746,6 @@ _GL_CXXALIAS_SYS (accept4, int, | |||
| 761 | # endif | 746 | # endif |
| 762 | _GL_CXXALIASWARN (accept4); | 747 | _GL_CXXALIASWARN (accept4); |
| 763 | #elif defined GNULIB_POSIXCHECK | 748 | #elif defined GNULIB_POSIXCHECK |
| 764 | # undef accept4 | ||
| 765 | # if HAVE_RAW_DECL_ACCEPT4 | 749 | # if HAVE_RAW_DECL_ACCEPT4 |
| 766 | _GL_WARN_ON_USE (accept4, "accept4 is unportable - " | 750 | _GL_WARN_ON_USE (accept4, "accept4 is unportable - " |
| 767 | "use gnulib module accept4 for portability"); | 751 | "use gnulib module accept4 for portability"); |
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index c3c38fd6..deed21cd 100644 --- a/gl/sys_stat.in.h +++ b/gl/sys_stat.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Provide a more complete sys/stat.h header file. | 1 | /* Provide a more complete sys/stat.h header file. |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -451,7 +451,6 @@ _GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); | |||
| 451 | # endif | 451 | # endif |
| 452 | _GL_CXXALIASWARN (chmod); | 452 | _GL_CXXALIASWARN (chmod); |
| 453 | #elif defined GNULIB_POSIXCHECK | 453 | #elif defined GNULIB_POSIXCHECK |
| 454 | # undef chmod | ||
| 455 | # if HAVE_RAW_DECL_CHMOD | 454 | # if HAVE_RAW_DECL_CHMOD |
| 456 | _GL_WARN_ON_USE (chmod, "chmod has portability problems - " | 455 | _GL_WARN_ON_USE (chmod, "chmod has portability problems - " |
| 457 | "use gnulib module chmod for portability"); | 456 | "use gnulib module chmod for portability"); |
| @@ -496,7 +495,6 @@ _GL_CXXALIAS_SYS (fchmodat, int, | |||
| 496 | # endif | 495 | # endif |
| 497 | _GL_CXXALIASWARN (fchmodat); | 496 | _GL_CXXALIASWARN (fchmodat); |
| 498 | #elif defined GNULIB_POSIXCHECK | 497 | #elif defined GNULIB_POSIXCHECK |
| 499 | # undef fchmodat | ||
| 500 | # if HAVE_RAW_DECL_FCHMODAT | 498 | # if HAVE_RAW_DECL_FCHMODAT |
| 501 | _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | 499 | _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " |
| 502 | "use gnulib module openat for portability"); | 500 | "use gnulib module openat for portability"); |
| @@ -528,7 +526,6 @@ _GL_CXXALIASWARN (fstat); | |||
| 528 | /* Above, we define stat to _stati64. */ | 526 | /* Above, we define stat to _stati64. */ |
| 529 | # define fstat _fstati64 | 527 | # define fstat _fstati64 |
| 530 | #elif defined GNULIB_POSIXCHECK | 528 | #elif defined GNULIB_POSIXCHECK |
| 531 | # undef fstat | ||
| 532 | # if HAVE_RAW_DECL_FSTAT | 529 | # if HAVE_RAW_DECL_FSTAT |
| 533 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | 530 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " |
| 534 | "use gnulib module fstat for portability"); | 531 | "use gnulib module fstat for portability"); |
| @@ -567,7 +564,6 @@ _GL_CXXALIASWARN (fstatat); | |||
| 567 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | 564 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat |
| 568 | # endif | 565 | # endif |
| 569 | #elif defined GNULIB_POSIXCHECK | 566 | #elif defined GNULIB_POSIXCHECK |
| 570 | # undef fstatat | ||
| 571 | # if HAVE_RAW_DECL_FSTATAT | 567 | # if HAVE_RAW_DECL_FSTATAT |
| 572 | _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | 568 | _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " |
| 573 | "use gnulib module openat for portability"); | 569 | "use gnulib module openat for portability"); |
| @@ -597,7 +593,6 @@ _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | |||
| 597 | _GL_CXXALIASWARN (futimens); | 593 | _GL_CXXALIASWARN (futimens); |
| 598 | # endif | 594 | # endif |
| 599 | #elif defined GNULIB_POSIXCHECK | 595 | #elif defined GNULIB_POSIXCHECK |
| 600 | # undef futimens | ||
| 601 | # if HAVE_RAW_DECL_FUTIMENS | 596 | # if HAVE_RAW_DECL_FUTIMENS |
| 602 | _GL_WARN_ON_USE (futimens, "futimens is not portable - " | 597 | _GL_WARN_ON_USE (futimens, "futimens is not portable - " |
| 603 | "use gnulib module futimens for portability"); | 598 | "use gnulib module futimens for portability"); |
| @@ -618,7 +613,6 @@ _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | |||
| 618 | _GL_CXXALIASWARN (getumask); | 613 | _GL_CXXALIASWARN (getumask); |
| 619 | # endif | 614 | # endif |
| 620 | #elif defined GNULIB_POSIXCHECK | 615 | #elif defined GNULIB_POSIXCHECK |
| 621 | # undef getumask | ||
| 622 | # if HAVE_RAW_DECL_GETUMASK | 616 | # if HAVE_RAW_DECL_GETUMASK |
| 623 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " | 617 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " |
| 624 | "use gnulib module getumask for portability"); | 618 | "use gnulib module getumask for portability"); |
| @@ -636,7 +630,6 @@ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode), | |||
| 636 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | 630 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); |
| 637 | _GL_CXXALIASWARN (lchmod); | 631 | _GL_CXXALIASWARN (lchmod); |
| 638 | #elif defined GNULIB_POSIXCHECK | 632 | #elif defined GNULIB_POSIXCHECK |
| 639 | # undef lchmod | ||
| 640 | # if HAVE_RAW_DECL_LCHMOD | 633 | # if HAVE_RAW_DECL_LCHMOD |
| 641 | _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | 634 | _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " |
| 642 | "use gnulib module lchmod for portability"); | 635 | "use gnulib module lchmod for portability"); |
| @@ -698,7 +691,6 @@ _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | |||
| 698 | # endif | 691 | # endif |
| 699 | _GL_CXXALIASWARN (mkdir); | 692 | _GL_CXXALIASWARN (mkdir); |
| 700 | #elif defined GNULIB_POSIXCHECK | 693 | #elif defined GNULIB_POSIXCHECK |
| 701 | # undef mkdir | ||
| 702 | # if HAVE_RAW_DECL_MKDIR | 694 | # if HAVE_RAW_DECL_MKDIR |
| 703 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | 695 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " |
| 704 | "use gnulib module mkdir for portability"); | 696 | "use gnulib module mkdir for portability"); |
| @@ -714,7 +706,6 @@ _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode), | |||
| 714 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); | 706 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); |
| 715 | _GL_CXXALIASWARN (mkdirat); | 707 | _GL_CXXALIASWARN (mkdirat); |
| 716 | #elif defined GNULIB_POSIXCHECK | 708 | #elif defined GNULIB_POSIXCHECK |
| 717 | # undef mkdirat | ||
| 718 | # if HAVE_RAW_DECL_MKDIRAT | 709 | # if HAVE_RAW_DECL_MKDIRAT |
| 719 | _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | 710 | _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " |
| 720 | "use gnulib module openat for portability"); | 711 | "use gnulib module openat for portability"); |
| @@ -740,7 +731,6 @@ _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); | |||
| 740 | # endif | 731 | # endif |
| 741 | _GL_CXXALIASWARN (mkfifo); | 732 | _GL_CXXALIASWARN (mkfifo); |
| 742 | #elif defined GNULIB_POSIXCHECK | 733 | #elif defined GNULIB_POSIXCHECK |
| 743 | # undef mkfifo | ||
| 744 | # if HAVE_RAW_DECL_MKFIFO | 734 | # if HAVE_RAW_DECL_MKFIFO |
| 745 | _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | 735 | _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " |
| 746 | "use gnulib module mkfifo for portability"); | 736 | "use gnulib module mkfifo for portability"); |
| @@ -768,7 +758,6 @@ _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | |||
| 768 | _GL_CXXALIASWARN (mkfifoat); | 758 | _GL_CXXALIASWARN (mkfifoat); |
| 769 | # endif | 759 | # endif |
| 770 | #elif defined GNULIB_POSIXCHECK | 760 | #elif defined GNULIB_POSIXCHECK |
| 771 | # undef mkfifoat | ||
| 772 | # if HAVE_RAW_DECL_MKFIFOAT | 761 | # if HAVE_RAW_DECL_MKFIFOAT |
| 773 | _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | 762 | _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " |
| 774 | "use gnulib module mkfifoat for portability"); | 763 | "use gnulib module mkfifoat for portability"); |
| @@ -790,12 +779,10 @@ _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); | |||
| 790 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev), | 779 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev), |
| 791 | _GL_ARG_NONNULL ((1))); | 780 | _GL_ARG_NONNULL ((1))); |
| 792 | # endif | 781 | # endif |
| 793 | /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ | 782 | _GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
| 794 | _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); | ||
| 795 | # endif | 783 | # endif |
| 796 | _GL_CXXALIASWARN (mknod); | 784 | _GL_CXXALIASWARN (mknod); |
| 797 | #elif defined GNULIB_POSIXCHECK | 785 | #elif defined GNULIB_POSIXCHECK |
| 798 | # undef mknod | ||
| 799 | # if HAVE_RAW_DECL_MKNOD | 786 | # if HAVE_RAW_DECL_MKNOD |
| 800 | _GL_WARN_ON_USE (mknod, "mknod is not portable - " | 787 | _GL_WARN_ON_USE (mknod, "mknod is not portable - " |
| 801 | "use gnulib module mknod for portability"); | 788 | "use gnulib module mknod for portability"); |
| @@ -827,7 +814,6 @@ _GL_CXXALIAS_SYS (mknodat, int, | |||
| 827 | _GL_CXXALIASWARN (mknodat); | 814 | _GL_CXXALIASWARN (mknodat); |
| 828 | # endif | 815 | # endif |
| 829 | #elif defined GNULIB_POSIXCHECK | 816 | #elif defined GNULIB_POSIXCHECK |
| 830 | # undef mknodat | ||
| 831 | # if HAVE_RAW_DECL_MKNODAT | 817 | # if HAVE_RAW_DECL_MKNODAT |
| 832 | _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | 818 | _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " |
| 833 | "use gnulib module mkfifoat for portability"); | 819 | "use gnulib module mkfifoat for portability"); |
| @@ -905,7 +891,6 @@ _GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) | |||
| 905 | #define stat stat_used_without_requesting_gnulib_module_stat | 891 | #define stat stat_used_without_requesting_gnulib_module_stat |
| 906 | */ | 892 | */ |
| 907 | #elif defined GNULIB_POSIXCHECK | 893 | #elif defined GNULIB_POSIXCHECK |
| 908 | # undef stat | ||
| 909 | # if HAVE_RAW_DECL_STAT | 894 | # if HAVE_RAW_DECL_STAT |
| 910 | _GL_WARN_ON_USE (stat, "stat is unportable - " | 895 | _GL_WARN_ON_USE (stat, "stat is unportable - " |
| 911 | "use gnulib module stat for portability"); | 896 | "use gnulib module stat for portability"); |
| @@ -945,7 +930,6 @@ _GL_CXXALIASWARN (lstat); | |||
| 945 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | 930 | # define lstat lstat_used_without_requesting_gnulib_module_lstat |
| 946 | # endif | 931 | # endif |
| 947 | #elif defined GNULIB_POSIXCHECK | 932 | #elif defined GNULIB_POSIXCHECK |
| 948 | # undef lstat | ||
| 949 | # if HAVE_RAW_DECL_LSTAT | 933 | # if HAVE_RAW_DECL_LSTAT |
| 950 | _GL_WARN_ON_USE (lstat, "lstat is unportable - " | 934 | _GL_WARN_ON_USE (lstat, "lstat is unportable - " |
| 951 | "use gnulib module lstat for portability"); | 935 | "use gnulib module lstat for portability"); |
| @@ -999,7 +983,6 @@ _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | |||
| 999 | _GL_CXXALIASWARN (utimensat); | 983 | _GL_CXXALIASWARN (utimensat); |
| 1000 | # endif | 984 | # endif |
| 1001 | #elif defined GNULIB_POSIXCHECK | 985 | #elif defined GNULIB_POSIXCHECK |
| 1002 | # undef utimensat | ||
| 1003 | # if HAVE_RAW_DECL_UTIMENSAT | 986 | # if HAVE_RAW_DECL_UTIMENSAT |
| 1004 | _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " | 987 | _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " |
| 1005 | "use gnulib module utimensat for portability"); | 988 | "use gnulib module utimensat for portability"); |
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h index acf9b2f7..733b4ba4 100644 --- a/gl/sys_types.in.h +++ b/gl/sys_types.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide a more complete sys/types.h. | 1 | /* Provide a more complete sys/types.h. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h index fec3a70a..8f7f506f 100644 --- a/gl/sys_uio.in.h +++ b/gl/sys_uio.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for <sys/uio.h>. | 1 | /* Substitute for <sys/uio.h>. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/time.in.h b/gl/time.in.h index 3ff16e3b..5bbccf76 100644 --- a/gl/time.in.h +++ b/gl/time.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A more-standard <time.h>. | 1 | /* A more-standard <time.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -161,7 +161,6 @@ _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); | |||
| 161 | _GL_CXXALIASWARN (timespec_get); | 161 | _GL_CXXALIASWARN (timespec_get); |
| 162 | # endif | 162 | # endif |
| 163 | # elif defined GNULIB_POSIXCHECK | 163 | # elif defined GNULIB_POSIXCHECK |
| 164 | # undef timespec_get | ||
| 165 | # if HAVE_RAW_DECL_TIMESPEC_GET | 164 | # if HAVE_RAW_DECL_TIMESPEC_GET |
| 166 | _GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " | 165 | _GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " |
| 167 | "use gnulib module timespec_get for portability"); | 166 | "use gnulib module timespec_get for portability"); |
| @@ -190,7 +189,6 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); | |||
| 190 | _GL_CXXALIASWARN (timespec_getres); | 189 | _GL_CXXALIASWARN (timespec_getres); |
| 191 | # endif | 190 | # endif |
| 192 | # elif defined GNULIB_POSIXCHECK | 191 | # elif defined GNULIB_POSIXCHECK |
| 193 | # undef timespec_getres | ||
| 194 | # if HAVE_RAW_DECL_TIMESPEC_GETRES | 192 | # if HAVE_RAW_DECL_TIMESPEC_GETRES |
| 195 | _GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " | 193 | _GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " |
| 196 | "use gnulib module timespec_getres for portability"); | 194 | "use gnulib module timespec_getres for portability"); |
| @@ -212,7 +210,6 @@ _GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); | |||
| 212 | _GL_CXXALIASWARN (time); | 210 | _GL_CXXALIASWARN (time); |
| 213 | # endif | 211 | # endif |
| 214 | # elif defined GNULIB_POSIXCHECK | 212 | # elif defined GNULIB_POSIXCHECK |
| 215 | # undef time | ||
| 216 | # if HAVE_RAW_DECL_TIME | 213 | # if HAVE_RAW_DECL_TIME |
| 217 | _GL_WARN_ON_USE (time, "time has consistency problems - " | 214 | _GL_WARN_ON_USE (time, "time has consistency problems - " |
| 218 | "use gnulib module time for portability"); | 215 | "use gnulib module time for portability"); |
| @@ -243,7 +240,6 @@ _GL_CXXALIAS_SYS (nanosleep, int, | |||
| 243 | # endif | 240 | # endif |
| 244 | _GL_CXXALIASWARN (nanosleep); | 241 | _GL_CXXALIASWARN (nanosleep); |
| 245 | # elif defined GNULIB_POSIXCHECK | 242 | # elif defined GNULIB_POSIXCHECK |
| 246 | # undef nanosleep | ||
| 247 | # if HAVE_RAW_DECL_NANOSLEEP | 243 | # if HAVE_RAW_DECL_NANOSLEEP |
| 248 | _GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " | 244 | _GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " |
| 249 | "use gnulib module nanosleep for portability"); | 245 | "use gnulib module nanosleep for portability"); |
| @@ -284,7 +280,6 @@ _GL_CXXALIAS_SYS (tzset, void, (void)); | |||
| 284 | # endif | 280 | # endif |
| 285 | _GL_CXXALIASWARN (tzset); | 281 | _GL_CXXALIASWARN (tzset); |
| 286 | # elif defined GNULIB_POSIXCHECK | 282 | # elif defined GNULIB_POSIXCHECK |
| 287 | # undef tzset | ||
| 288 | # if HAVE_RAW_DECL_TZSET | 283 | # if HAVE_RAW_DECL_TZSET |
| 289 | _GL_WARN_ON_USE (tzset, "tzset has portability problems - " | 284 | _GL_WARN_ON_USE (tzset, "tzset has portability problems - " |
| 290 | "use gnulib module tzset for portability"); | 285 | "use gnulib module tzset for portability"); |
| @@ -306,7 +301,6 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); | |||
| 306 | _GL_CXXALIASWARN (mktime); | 301 | _GL_CXXALIASWARN (mktime); |
| 307 | # endif | 302 | # endif |
| 308 | # elif defined GNULIB_POSIXCHECK | 303 | # elif defined GNULIB_POSIXCHECK |
| 309 | # undef mktime | ||
| 310 | # if HAVE_RAW_DECL_MKTIME | 304 | # if HAVE_RAW_DECL_MKTIME |
| 311 | _GL_WARN_ON_USE (mktime, "mktime has portability problems - " | 305 | _GL_WARN_ON_USE (mktime, "mktime has portability problems - " |
| 312 | "use gnulib module mktime for portability"); | 306 | "use gnulib module mktime for portability"); |
| @@ -362,12 +356,10 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, | |||
| 362 | _GL_CXXALIASWARN (gmtime_r); | 356 | _GL_CXXALIASWARN (gmtime_r); |
| 363 | # endif | 357 | # endif |
| 364 | # elif defined GNULIB_POSIXCHECK | 358 | # elif defined GNULIB_POSIXCHECK |
| 365 | # undef localtime_r | ||
| 366 | # if HAVE_RAW_DECL_LOCALTIME_R | 359 | # if HAVE_RAW_DECL_LOCALTIME_R |
| 367 | _GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " | 360 | _GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " |
| 368 | "use gnulib module time_r for portability"); | 361 | "use gnulib module time_r for portability"); |
| 369 | # endif | 362 | # endif |
| 370 | # undef gmtime_r | ||
| 371 | # if HAVE_RAW_DECL_GMTIME_R | 363 | # if HAVE_RAW_DECL_GMTIME_R |
| 372 | _GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " | 364 | _GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " |
| 373 | "use gnulib module time_r for portability"); | 365 | "use gnulib module time_r for portability"); |
| @@ -393,7 +385,6 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); | |||
| 393 | _GL_CXXALIASWARN (localtime); | 385 | _GL_CXXALIASWARN (localtime); |
| 394 | # endif | 386 | # endif |
| 395 | # elif defined GNULIB_POSIXCHECK | 387 | # elif defined GNULIB_POSIXCHECK |
| 396 | # undef localtime | ||
| 397 | # if HAVE_RAW_DECL_LOCALTIME | 388 | # if HAVE_RAW_DECL_LOCALTIME |
| 398 | _GL_WARN_ON_USE (localtime, "localtime has portability problems - " | 389 | _GL_WARN_ON_USE (localtime, "localtime has portability problems - " |
| 399 | "use gnulib module localtime for portability"); | 390 | "use gnulib module localtime for portability"); |
| @@ -430,7 +421,6 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, | |||
| 430 | struct tm *restrict __tm)); | 421 | struct tm *restrict __tm)); |
| 431 | _GL_CXXALIASWARN (strptime); | 422 | _GL_CXXALIASWARN (strptime); |
| 432 | # elif defined GNULIB_POSIXCHECK | 423 | # elif defined GNULIB_POSIXCHECK |
| 433 | # undef strptime | ||
| 434 | # if HAVE_RAW_DECL_STRPTIME | 424 | # if HAVE_RAW_DECL_STRPTIME |
| 435 | _GL_WARN_ON_USE (strptime, "strptime is unportable - " | 425 | _GL_WARN_ON_USE (strptime, "strptime is unportable - " |
| 436 | "use gnulib module strptime for portability"); | 426 | "use gnulib module strptime for portability"); |
| @@ -483,7 +473,6 @@ _GL_CXXALIAS_SYS (strftime, size_t, | |||
| 483 | _GL_CXXALIASWARN (strftime); | 473 | _GL_CXXALIASWARN (strftime); |
| 484 | # endif | 474 | # endif |
| 485 | # elif defined GNULIB_POSIXCHECK | 475 | # elif defined GNULIB_POSIXCHECK |
| 486 | # undef strftime | ||
| 487 | # if HAVE_RAW_DECL_STRFTIME | 476 | # if HAVE_RAW_DECL_STRFTIME |
| 488 | _GL_WARN_ON_USE (strftime, "strftime has portability problems - " | 477 | _GL_WARN_ON_USE (strftime, "strftime has portability problems - " |
| 489 | "use gnulib module strftime-fixes for portability"); | 478 | "use gnulib module strftime-fixes for portability"); |
| @@ -523,11 +512,18 @@ _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); | |||
| 523 | # endif | 512 | # endif |
| 524 | 513 | ||
| 525 | /* tzfree (tz) | 514 | /* tzfree (tz) |
| 526 | Frees a time zone object. | 515 | Free a time zone object, preserving errno. |
| 527 | The argument must have been returned by tzalloc(). */ | 516 | The argument must have been returned by tzalloc(). */ |
| 528 | # if !@HAVE_TZALLOC@ | 517 | # if !@HAVE_TZALLOC@ |
| 529 | _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz), ); | 518 | _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz), ); |
| 530 | _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); | 519 | _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); |
| 520 | # else | ||
| 521 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 522 | # undef tzfree | ||
| 523 | # define tzfree rpl_tzfree | ||
| 524 | # endif | ||
| 525 | _GL_FUNCDECL_RPL (tzfree, void, (timezone_t __tz), ); | ||
| 526 | _GL_CXXALIAS_RPL (tzfree, void, (timezone_t __tz)); | ||
| 531 | # endif | 527 | # endif |
| 532 | 528 | ||
| 533 | /* localtime_rz (tz, &t, &result) | 529 | /* localtime_rz (tz, &t, &result) |
| @@ -611,7 +607,6 @@ _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); | |||
| 611 | _GL_CXXALIASWARN (timegm); | 607 | _GL_CXXALIASWARN (timegm); |
| 612 | # endif | 608 | # endif |
| 613 | # elif defined GNULIB_POSIXCHECK | 609 | # elif defined GNULIB_POSIXCHECK |
| 614 | # undef timegm | ||
| 615 | # if HAVE_RAW_DECL_TIMEGM | 610 | # if HAVE_RAW_DECL_TIMEGM |
| 616 | _GL_WARN_ON_USE (timegm, "timegm is unportable - " | 611 | _GL_WARN_ON_USE (timegm, "timegm is unportable - " |
| 617 | "use gnulib module timegm for portability"); | 612 | "use gnulib module timegm for portability"); |
| @@ -622,28 +617,24 @@ _GL_WARN_ON_USE (timegm, "timegm is unportable - " | |||
| 622 | buffers when given outlandish struct tm values. Portable | 617 | buffers when given outlandish struct tm values. Portable |
| 623 | applications should use strftime (or even sprintf) instead. */ | 618 | applications should use strftime (or even sprintf) instead. */ |
| 624 | # if defined GNULIB_POSIXCHECK | 619 | # if defined GNULIB_POSIXCHECK |
| 625 | # undef asctime | ||
| 626 | # if HAVE_RAW_DECL_ASCTIME | 620 | # if HAVE_RAW_DECL_ASCTIME |
| 627 | _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " | 621 | _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " |
| 628 | "better use strftime (or even sprintf) instead"); | 622 | "better use strftime (or even sprintf) instead"); |
| 629 | # endif | 623 | # endif |
| 630 | # endif | 624 | # endif |
| 631 | # if defined GNULIB_POSIXCHECK | 625 | # if defined GNULIB_POSIXCHECK |
| 632 | # undef asctime_r | ||
| 633 | # if HAVE_RAW_DECL_ASCTIME_R | 626 | # if HAVE_RAW_DECL_ASCTIME_R |
| 634 | _GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " | 627 | _GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " |
| 635 | "better use strftime (or even sprintf) instead"); | 628 | "better use strftime (or even sprintf) instead"); |
| 636 | # endif | 629 | # endif |
| 637 | # endif | 630 | # endif |
| 638 | # if defined GNULIB_POSIXCHECK | 631 | # if defined GNULIB_POSIXCHECK |
| 639 | # undef ctime | ||
| 640 | # if HAVE_RAW_DECL_CTIME | 632 | # if HAVE_RAW_DECL_CTIME |
| 641 | _GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " | 633 | _GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " |
| 642 | "better use strftime (or even sprintf) instead"); | 634 | "better use strftime (or even sprintf) instead"); |
| 643 | # endif | 635 | # endif |
| 644 | # endif | 636 | # endif |
| 645 | # if defined GNULIB_POSIXCHECK | 637 | # if defined GNULIB_POSIXCHECK |
| 646 | # undef ctime_r | ||
| 647 | # if HAVE_RAW_DECL_CTIME_R | 638 | # if HAVE_RAW_DECL_CTIME_R |
| 648 | _GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " | 639 | _GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " |
| 649 | "better use strftime (or even sprintf) instead"); | 640 | "better use strftime (or even sprintf) instead"); |
diff --git a/gl/time_r.c b/gl/time_r.c index 15d65d59..dfc427f6 100644 --- a/gl/time_r.c +++ b/gl/time_r.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Reentrant time functions like localtime_r. | 1 | /* Reentrant time functions like localtime_r. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2006-2007, 2010-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2003, 2006-2007, 2010-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/timegm.c b/gl/timegm.c index 4c2615b9..0862b6e9 100644 --- a/gl/timegm.c +++ b/gl/timegm.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. | 1 | /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. |
| 2 | 2 | ||
| 3 | Copyright (C) 1994-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1994-2026 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/gl/uchar.h b/gl/uchar.h deleted file mode 100644 index abc636c5..00000000 --- a/gl/uchar.h +++ /dev/null | |||
| @@ -1,1456 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* <uchar.h> substitute - 16-bit and 32-bit wide character types. | ||
| 3 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | /* Written by Bruno Haible <bruno@clisp.org>, 2019. */ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * ISO C 23 <uchar.h> for platforms that lack it. | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef _GL_UCHAR_H | ||
| 25 | |||
| 26 | #if __GNUC__ >= 3 | ||
| 27 | #pragma GCC system_header | ||
| 28 | #endif | ||
| 29 | |||
| 30 | |||
| 31 | /* The include_next requires a split double-inclusion guard. */ | ||
| 32 | #if (defined __cplusplus ? 0 : 1) | ||
| 33 | # if defined __HAIKU__ | ||
| 34 | /* Work around <https://dev.haiku-os.org/ticket/17040>. */ | ||
| 35 | # include <stdint.h> | ||
| 36 | # endif | ||
| 37 | /* On AIX 7.2 with xlclang++, /usr/include/uchar.h produces compilation errors | ||
| 38 | because it contains typedef definitions of char16_t and char32_t, however | ||
| 39 | char16_t and char32_t are keywords in this situation. To work around it, | ||
| 40 | define char16_t and char32_t as macros. */ | ||
| 41 | # if defined __cplusplus && defined _AIX && defined __ibmxl__ && defined __clang__ | ||
| 42 | # define char16_t gl_char16_t | ||
| 43 | # define char32_t gl_char32_t | ||
| 44 | # endif | ||
| 45 | # include_next <uchar.h> | ||
| 46 | #endif | ||
| 47 | |||
| 48 | #ifndef _GL_UCHAR_H | ||
| 49 | #define _GL_UCHAR_H | ||
| 50 | |||
| 51 | /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_BEGIN_C_LINKAGE, | ||
| 52 | _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | ||
| 53 | #if !_GL_CONFIG_H_INCLUDED | ||
| 54 | #error "Please include config.h first." | ||
| 55 | #endif | ||
| 56 | |||
| 57 | /* Get uint_least16_t, uint_least32_t. */ | ||
| 58 | #include <stdint.h> | ||
| 59 | |||
| 60 | /* Get mbstate_t, size_t. */ | ||
| 61 | #include <wchar.h> | ||
| 62 | |||
| 63 | /* For the inline functions. */ | ||
| 64 | #include <string.h> | ||
| 65 | #include <wctype.h> | ||
| 66 | |||
| 67 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | ||
| 68 | The attribute __pure__ was added in gcc 2.96. */ | ||
| 69 | #ifndef _GL_ATTRIBUTE_PURE | ||
| 70 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ | ||
| 71 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | ||
| 72 | # else | ||
| 73 | # define _GL_ATTRIBUTE_PURE /* empty */ | ||
| 74 | # endif | ||
| 75 | #endif | ||
| 76 | |||
| 77 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
| 78 | /* C++ compatible function declaration macros. | ||
| 79 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 80 | |||
| 81 | This program is free software: you can redistribute it and/or modify it | ||
| 82 | under the terms of the GNU Lesser General Public License as published | ||
| 83 | by the Free Software Foundation; either version 2 of the License, or | ||
| 84 | (at your option) any later version. | ||
| 85 | |||
| 86 | This program is distributed in the hope that it will be useful, | ||
| 87 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 88 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 89 | Lesser General Public License for more details. | ||
| 90 | |||
| 91 | You should have received a copy of the GNU Lesser General Public License | ||
| 92 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 93 | |||
| 94 | #ifndef _GL_CXXDEFS_H | ||
| 95 | #define _GL_CXXDEFS_H | ||
| 96 | |||
| 97 | /* Begin/end the GNULIB_NAMESPACE namespace. */ | ||
| 98 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 99 | # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { | ||
| 100 | # define _GL_END_NAMESPACE } | ||
| 101 | #else | ||
| 102 | # define _GL_BEGIN_NAMESPACE | ||
| 103 | # define _GL_END_NAMESPACE | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /* The three most frequent use cases of these macros are: | ||
| 107 | |||
| 108 | * For providing a substitute for a function that is missing on some | ||
| 109 | platforms, but is declared and works fine on the platforms on which | ||
| 110 | it exists: | ||
| 111 | |||
| 112 | #if @GNULIB_FOO@ | ||
| 113 | # if !@HAVE_FOO@ | ||
| 114 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 115 | # endif | ||
| 116 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 117 | _GL_CXXALIASWARN (foo); | ||
| 118 | #elif defined GNULIB_POSIXCHECK | ||
| 119 | ... | ||
| 120 | #endif | ||
| 121 | |||
| 122 | * For providing a replacement for a function that exists on all platforms, | ||
| 123 | but is broken/insufficient and needs to be replaced on some platforms: | ||
| 124 | |||
| 125 | #if @GNULIB_FOO@ | ||
| 126 | # if @REPLACE_FOO@ | ||
| 127 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 128 | # undef foo | ||
| 129 | # define foo rpl_foo | ||
| 130 | # endif | ||
| 131 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 132 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 133 | # else | ||
| 134 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 135 | # endif | ||
| 136 | _GL_CXXALIASWARN (foo); | ||
| 137 | #elif defined GNULIB_POSIXCHECK | ||
| 138 | ... | ||
| 139 | #endif | ||
| 140 | |||
| 141 | * For providing a replacement for a function that exists on some platforms | ||
| 142 | but is broken/insufficient and needs to be replaced on some of them and | ||
| 143 | is additionally either missing or undeclared on some other platforms: | ||
| 144 | |||
| 145 | #if @GNULIB_FOO@ | ||
| 146 | # if @REPLACE_FOO@ | ||
| 147 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 148 | # undef foo | ||
| 149 | # define foo rpl_foo | ||
| 150 | # endif | ||
| 151 | _GL_FUNCDECL_RPL (foo, ...); | ||
| 152 | _GL_CXXALIAS_RPL (foo, ...); | ||
| 153 | # else | ||
| 154 | # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ | ||
| 155 | _GL_FUNCDECL_SYS (foo, ...); | ||
| 156 | # endif | ||
| 157 | _GL_CXXALIAS_SYS (foo, ...); | ||
| 158 | # endif | ||
| 159 | _GL_CXXALIASWARN (foo); | ||
| 160 | #elif defined GNULIB_POSIXCHECK | ||
| 161 | ... | ||
| 162 | #endif | ||
| 163 | */ | ||
| 164 | |||
| 165 | /* _GL_EXTERN_C declaration; | ||
| 166 | performs the declaration with C linkage. */ | ||
| 167 | #if defined __cplusplus | ||
| 168 | # define _GL_EXTERN_C extern "C" | ||
| 169 | #else | ||
| 170 | # define _GL_EXTERN_C extern | ||
| 171 | #endif | ||
| 172 | |||
| 173 | /* _GL_EXTERN_C_FUNC declaration; | ||
| 174 | performs the declaration of a function with C linkage. */ | ||
| 175 | #if defined __cplusplus | ||
| 176 | # define _GL_EXTERN_C_FUNC extern "C" | ||
| 177 | #else | ||
| 178 | /* In C mode, omit the 'extern' keyword, because attributes in bracket syntax | ||
| 179 | are not allowed between 'extern' and the return type (see gnulib-common.m4). | ||
| 180 | */ | ||
| 181 | # define _GL_EXTERN_C_FUNC | ||
| 182 | #endif | ||
| 183 | |||
| 184 | /* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]); | ||
| 185 | declares a replacement function, named rpl_func, with the given prototype, | ||
| 186 | consisting of return type, parameters, and attributes. | ||
| 187 | Although attributes are optional, the comma before them is required | ||
| 188 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 189 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 190 | at the end of the declaration. | ||
| 191 | Examples: | ||
| 192 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 193 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...), | ||
| 194 | _GL_ARG_NONNULL ((1))); | ||
| 195 | |||
| 196 | Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front | ||
| 197 | of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's | ||
| 198 | because | ||
| 199 | [[...]] extern "C" <declaration>; | ||
| 200 | is invalid syntax in C++.) | ||
| 201 | */ | ||
| 202 | #define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \ | ||
| 203 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__) | ||
| 204 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | ||
| 205 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | ||
| 206 | |||
| 207 | /* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to | ||
| 208 | parenthesized func otherwise. Parenthesization is needed in C23 if | ||
| 209 | the function is like strchr and so is a qualifier-generic macro | ||
| 210 | that expands to something more complicated. */ | ||
| 211 | #ifdef __cplusplus | ||
| 212 | # define _GL_FUNCDECL_SYS_NAME(func) func | ||
| 213 | #else | ||
| 214 | # define _GL_FUNCDECL_SYS_NAME(func) (func) | ||
| 215 | #endif | ||
| 216 | |||
| 217 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); | ||
| 218 | declares the system function, named func, with the given prototype, | ||
| 219 | consisting of return type, parameters, and attributes. | ||
| 220 | Although attributes are optional, the comma before them is required | ||
| 221 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 222 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 223 | at the end of the declaration. | ||
| 224 | Examples: | ||
| 225 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 226 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | ||
| 227 | */ | ||
| 228 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | ||
| 229 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters | ||
| 230 | |||
| 231 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | ||
| 232 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 233 | that redirects to rpl_func, if GNULIB_NAMESPACE is defined. | ||
| 234 | Example: | ||
| 235 | _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); | ||
| 236 | |||
| 237 | Wrapping rpl_func in an object with an inline conversion operator | ||
| 238 | avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is | ||
| 239 | actually used in the program. */ | ||
| 240 | #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ | ||
| 241 | _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) | ||
| 242 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 243 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 244 | namespace GNULIB_NAMESPACE \ | ||
| 245 | { \ | ||
| 246 | static const struct _gl_ ## func ## _wrapper \ | ||
| 247 | { \ | ||
| 248 | typedef rettype (*type) parameters; \ | ||
| 249 | \ | ||
| 250 | inline operator type () const \ | ||
| 251 | { \ | ||
| 252 | return ::rpl_func; \ | ||
| 253 | } \ | ||
| 254 | } func = {}; \ | ||
| 255 | } \ | ||
| 256 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 257 | #else | ||
| 258 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ | ||
| 259 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 260 | #endif | ||
| 261 | |||
| 262 | /* _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 263 | is to be used when func is a Microsoft deprecated alias, on native Windows. | ||
| 264 | It declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 265 | that redirects to _func, if GNULIB_NAMESPACE is defined. | ||
| 266 | Example: | ||
| 267 | _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); | ||
| 268 | */ | ||
| 269 | #define _GL_CXXALIAS_MDA(func,rettype,parameters) \ | ||
| 270 | _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) | ||
| 271 | |||
| 272 | /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); | ||
| 273 | is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); | ||
| 274 | except that the C function rpl_func may have a slightly different | ||
| 275 | declaration. A cast is used to silence the "invalid conversion" error | ||
| 276 | that would otherwise occur. */ | ||
| 277 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 278 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 279 | namespace GNULIB_NAMESPACE \ | ||
| 280 | { \ | ||
| 281 | static const struct _gl_ ## func ## _wrapper \ | ||
| 282 | { \ | ||
| 283 | typedef rettype (*type) parameters; \ | ||
| 284 | \ | ||
| 285 | inline operator type () const \ | ||
| 286 | { \ | ||
| 287 | return reinterpret_cast<type>(::rpl_func); \ | ||
| 288 | } \ | ||
| 289 | } func = {}; \ | ||
| 290 | } \ | ||
| 291 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 292 | #else | ||
| 293 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ | ||
| 294 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 295 | #endif | ||
| 296 | |||
| 297 | /* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); | ||
| 298 | is like _GL_CXXALIAS_MDA (func, rettype, parameters); | ||
| 299 | except that the C function func may have a slightly different declaration. | ||
| 300 | A cast is used to silence the "invalid conversion" error that would | ||
| 301 | otherwise occur. */ | ||
| 302 | #define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ | ||
| 303 | _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) | ||
| 304 | |||
| 305 | /* _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 306 | declares a C++ alias called GNULIB_NAMESPACE::func | ||
| 307 | that redirects to the system provided function func, if GNULIB_NAMESPACE | ||
| 308 | is defined. | ||
| 309 | Example: | ||
| 310 | _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); | ||
| 311 | |||
| 312 | Wrapping func in an object with an inline conversion operator | ||
| 313 | avoids a reference to func unless GNULIB_NAMESPACE::func is | ||
| 314 | actually used in the program. */ | ||
| 315 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 316 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 317 | namespace GNULIB_NAMESPACE \ | ||
| 318 | { \ | ||
| 319 | static const struct _gl_ ## func ## _wrapper \ | ||
| 320 | { \ | ||
| 321 | typedef rettype (*type) parameters; \ | ||
| 322 | \ | ||
| 323 | inline operator type () const \ | ||
| 324 | { \ | ||
| 325 | return ::func; \ | ||
| 326 | } \ | ||
| 327 | } func = {}; \ | ||
| 328 | } \ | ||
| 329 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 330 | #else | ||
| 331 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ | ||
| 332 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 333 | #endif | ||
| 334 | |||
| 335 | /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); | ||
| 336 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 337 | except that the C function func may have a slightly different declaration. | ||
| 338 | A cast is used to silence the "invalid conversion" error that would | ||
| 339 | otherwise occur. */ | ||
| 340 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 341 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 342 | namespace GNULIB_NAMESPACE \ | ||
| 343 | { \ | ||
| 344 | static const struct _gl_ ## func ## _wrapper \ | ||
| 345 | { \ | ||
| 346 | typedef rettype (*type) parameters; \ | ||
| 347 | \ | ||
| 348 | inline operator type () const \ | ||
| 349 | { \ | ||
| 350 | return reinterpret_cast<type>(::func); \ | ||
| 351 | } \ | ||
| 352 | } func = {}; \ | ||
| 353 | } \ | ||
| 354 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 355 | #else | ||
| 356 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ | ||
| 357 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 358 | #endif | ||
| 359 | |||
| 360 | /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); | ||
| 361 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); | ||
| 362 | except that the C function is picked among a set of overloaded functions, | ||
| 363 | namely the one with rettype2 and parameters2. Two consecutive casts | ||
| 364 | are used to silence the "cannot find a match" and "invalid conversion" | ||
| 365 | errors that would otherwise occur. */ | ||
| 366 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 367 | /* The outer cast must be a reinterpret_cast. | ||
| 368 | The inner cast: When the function is defined as a set of overloaded | ||
| 369 | functions, it works as a static_cast<>, choosing the designated variant. | ||
| 370 | When the function is defined as a single variant, it works as a | ||
| 371 | reinterpret_cast<>. The parenthesized cast syntax works both ways. */ | ||
| 372 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 373 | namespace GNULIB_NAMESPACE \ | ||
| 374 | { \ | ||
| 375 | static const struct _gl_ ## func ## _wrapper \ | ||
| 376 | { \ | ||
| 377 | typedef rettype (*type) parameters; \ | ||
| 378 | \ | ||
| 379 | inline operator type () const \ | ||
| 380 | { \ | ||
| 381 | return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ | ||
| 382 | } \ | ||
| 383 | } func = {}; \ | ||
| 384 | } \ | ||
| 385 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 386 | #else | ||
| 387 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ | ||
| 388 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 389 | #endif | ||
| 390 | |||
| 391 | /* _GL_CXXALIASWARN (func); | ||
| 392 | causes a warning to be emitted when ::func is used but not when | ||
| 393 | GNULIB_NAMESPACE::func is used. func must be defined without overloaded | ||
| 394 | variants. */ | ||
| 395 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 396 | # define _GL_CXXALIASWARN(func) \ | ||
| 397 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | ||
| 398 | # define _GL_CXXALIASWARN_1(func,namespace) \ | ||
| 399 | _GL_CXXALIASWARN_2 (func, namespace) | ||
| 400 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 401 | we enable the warning only when not optimizing. */ | ||
| 402 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 403 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 404 | _GL_WARN_ON_USE (func, \ | ||
| 405 | "The symbol ::" #func " refers to the system function. " \ | ||
| 406 | "Use " #namespace "::" #func " instead.") | ||
| 407 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 408 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 409 | extern __typeof__ (func) func | ||
| 410 | # else | ||
| 411 | # define _GL_CXXALIASWARN_2(func,namespace) \ | ||
| 412 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 413 | # endif | ||
| 414 | #else | ||
| 415 | # define _GL_CXXALIASWARN(func) \ | ||
| 416 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 417 | #endif | ||
| 418 | |||
| 419 | /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); | ||
| 420 | causes a warning to be emitted when the given overloaded variant of ::func | ||
| 421 | is used but not when GNULIB_NAMESPACE::func is used. */ | ||
| 422 | #if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 423 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 424 | _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ | ||
| 425 | GNULIB_NAMESPACE) | ||
| 426 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | ||
| 427 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | ||
| 428 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | ||
| 429 | we enable the warning only when not optimizing. */ | ||
| 430 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | ||
| 431 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 432 | _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ | ||
| 433 | "The symbol ::" #func " refers to the system function. " \ | ||
| 434 | "Use " #namespace "::" #func " instead.") | ||
| 435 | # else | ||
| 436 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | ||
| 437 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 438 | # endif | ||
| 439 | #else | ||
| 440 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ | ||
| 441 | _GL_EXTERN_C int _gl_cxxalias_dummy | ||
| 442 | #endif | ||
| 443 | |||
| 444 | #endif /* _GL_CXXDEFS_H */ | ||
| 445 | |||
| 446 | /* The definition of _GL_ARG_NONNULL is copied here. */ | ||
| 447 | /* A C macro for declaring that specific arguments must not be NULL. | ||
| 448 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | ||
| 449 | |||
| 450 | This program is free software: you can redistribute it and/or modify it | ||
| 451 | under the terms of the GNU Lesser General Public License as published | ||
| 452 | by the Free Software Foundation; either version 2 of the License, or | ||
| 453 | (at your option) any later version. | ||
| 454 | |||
| 455 | This program is distributed in the hope that it will be useful, | ||
| 456 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 457 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 458 | Lesser General Public License for more details. | ||
| 459 | |||
| 460 | You should have received a copy of the GNU Lesser General Public License | ||
| 461 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 462 | |||
| 463 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools | ||
| 464 | that the values passed as arguments n, ..., m must be non-NULL pointers. | ||
| 465 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ | ||
| 466 | #ifndef _GL_ARG_NONNULL | ||
| 467 | # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ | ||
| 468 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) | ||
| 469 | # else | ||
| 470 | # define _GL_ARG_NONNULL(params) | ||
| 471 | # endif | ||
| 472 | #endif | ||
| 473 | |||
| 474 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
| 475 | /* A C macro for emitting warnings if a function is used. | ||
| 476 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | ||
| 477 | |||
| 478 | This program is free software: you can redistribute it and/or modify it | ||
| 479 | under the terms of the GNU Lesser General Public License as published | ||
| 480 | by the Free Software Foundation; either version 2 of the License, or | ||
| 481 | (at your option) any later version. | ||
| 482 | |||
| 483 | This program is distributed in the hope that it will be useful, | ||
| 484 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 485 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 486 | Lesser General Public License for more details. | ||
| 487 | |||
| 488 | You should have received a copy of the GNU Lesser General Public License | ||
| 489 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 490 | |||
| 491 | /* _GL_WARN_ON_USE (function, "literal string") issues a declaration | ||
| 492 | for FUNCTION which will then trigger a compiler warning containing | ||
| 493 | the text of "literal string" anywhere that function is called, if | ||
| 494 | supported by the compiler. If the compiler does not support this | ||
| 495 | feature, the macro expands to an unused extern declaration. | ||
| 496 | |||
| 497 | _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the | ||
| 498 | attribute used in _GL_WARN_ON_USE. If the compiler does not support | ||
| 499 | this feature, it expands to empty. | ||
| 500 | |||
| 501 | These macros are useful for marking a function as a potential | ||
| 502 | portability trap, with the intent that "literal string" include | ||
| 503 | instructions on the replacement function that should be used | ||
| 504 | instead. | ||
| 505 | _GL_WARN_ON_USE is for functions with 'extern' linkage. | ||
| 506 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' | ||
| 507 | linkage. | ||
| 508 | |||
| 509 | _GL_WARN_ON_USE should not be used more than once for a given function | ||
| 510 | in a given compilation unit (because this may generate a warning even | ||
| 511 | if the function is never called). | ||
| 512 | |||
| 513 | However, one of the reasons that a function is a portability trap is | ||
| 514 | if it has the wrong signature. Declaring FUNCTION with a different | ||
| 515 | signature in C is a compilation error, so this macro must use the | ||
| 516 | same type as any existing declaration so that programs that avoid | ||
| 517 | the problematic FUNCTION do not fail to compile merely because they | ||
| 518 | included a header that poisoned the function. But this implies that | ||
| 519 | _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already | ||
| 520 | have a declaration. Use of this macro implies that there must not | ||
| 521 | be any other macro hiding the declaration of FUNCTION; but | ||
| 522 | undefining FUNCTION first is part of the poisoning process anyway | ||
| 523 | (although for symbols that are provided only via a macro, the result | ||
| 524 | is a compilation error rather than a warning containing | ||
| 525 | "literal string"). Also note that in C++, it is only safe to use if | ||
| 526 | FUNCTION has no overloads. | ||
| 527 | |||
| 528 | For an example, it is possible to poison 'getline' by: | ||
| 529 | - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], | ||
| 530 | [getline]) in configure.ac, which potentially defines | ||
| 531 | HAVE_RAW_DECL_GETLINE | ||
| 532 | - adding this code to a header that wraps the system <stdio.h>: | ||
| 533 | #undef getline | ||
| 534 | #if HAVE_RAW_DECL_GETLINE | ||
| 535 | _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" | ||
| 536 | "not universally present; use the gnulib module getline"); | ||
| 537 | #endif | ||
| 538 | |||
| 539 | It is not possible to directly poison global variables. But it is | ||
| 540 | possible to write a wrapper accessor function, and poison that | ||
| 541 | (less common usage, like &environ, will cause a compilation error | ||
| 542 | rather than issue the nice warning, but the end result of informing | ||
| 543 | the developer about their portability problem is still achieved): | ||
| 544 | #if HAVE_RAW_DECL_ENVIRON | ||
| 545 | static char *** | ||
| 546 | rpl_environ (void) { return &environ; } | ||
| 547 | _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); | ||
| 548 | # undef environ | ||
| 549 | # define environ (*rpl_environ ()) | ||
| 550 | #endif | ||
| 551 | or better (avoiding contradictory use of 'static' and 'extern'): | ||
| 552 | #if HAVE_RAW_DECL_ENVIRON | ||
| 553 | static char *** | ||
| 554 | _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") | ||
| 555 | rpl_environ (void) { return &environ; } | ||
| 556 | # undef environ | ||
| 557 | # define environ (*rpl_environ ()) | ||
| 558 | #endif | ||
| 559 | */ | ||
| 560 | #ifndef _GL_WARN_ON_USE | ||
| 561 | |||
| 562 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 563 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 564 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 565 | _GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) | ||
| 566 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 567 | __attribute__ ((__warning__ (message))) | ||
| 568 | # elif __clang_major__ >= 4 | ||
| 569 | /* Another compiler attribute is available in clang. */ | ||
| 570 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 571 | _GL_WARN_EXTERN_C __typeof__ (function) function \ | ||
| 572 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 573 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ | ||
| 574 | __attribute__ ((__diagnose_if__ (1, message, "warning"))) | ||
| 575 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 576 | /* Verify the existence of the function. */ | ||
| 577 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 578 | _GL_WARN_EXTERN_C __typeof__ (function) function | ||
| 579 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 580 | # else /* Unsupported. */ | ||
| 581 | # define _GL_WARN_ON_USE(function, message) \ | ||
| 582 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 583 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) | ||
| 584 | # endif | ||
| 585 | #endif | ||
| 586 | |||
| 587 | /* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") | ||
| 588 | is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the | ||
| 589 | function is declared with the given prototype, consisting of return type, | ||
| 590 | parameters, and attributes. | ||
| 591 | This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does | ||
| 592 | not work in this case. */ | ||
| 593 | #ifndef _GL_WARN_ON_USE_CXX | ||
| 594 | # if !defined __cplusplus | ||
| 595 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 596 | _GL_WARN_ON_USE (function, msg) | ||
| 597 | # else | ||
| 598 | # if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__ | ||
| 599 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ | ||
| 600 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 601 | extern rettype_gcc function parameters_and_attributes \ | ||
| 602 | __attribute__ ((__warning__ (msg))) | ||
| 603 | # elif __clang_major__ >= 4 | ||
| 604 | /* Another compiler attribute is available in clang. */ | ||
| 605 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 606 | extern rettype_clang function parameters_and_attributes \ | ||
| 607 | __attribute__ ((__diagnose_if__ (1, msg, "warning"))) | ||
| 608 | # elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING | ||
| 609 | /* Verify the existence of the function. */ | ||
| 610 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 611 | extern rettype_gcc function parameters_and_attributes | ||
| 612 | # else /* Unsupported. */ | ||
| 613 | # define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ | ||
| 614 | _GL_WARN_EXTERN_C int _gl_warn_on_use | ||
| 615 | # endif | ||
| 616 | # endif | ||
| 617 | #endif | ||
| 618 | |||
| 619 | /* _GL_WARN_EXTERN_C declaration; | ||
| 620 | performs the declaration with C linkage. */ | ||
| 621 | #ifndef _GL_WARN_EXTERN_C | ||
| 622 | # if defined __cplusplus | ||
| 623 | # define _GL_WARN_EXTERN_C extern "C" | ||
| 624 | # else | ||
| 625 | # define _GL_WARN_EXTERN_C extern | ||
| 626 | # endif | ||
| 627 | #endif | ||
| 628 | |||
| 629 | |||
| 630 | _GL_INLINE_HEADER_BEGIN | ||
| 631 | |||
| 632 | |||
| 633 | #if !(defined __cplusplus ? 0 || 0 : 1) | ||
| 634 | |||
| 635 | /* An 8-bit variant of wchar_t. | ||
| 636 | Note: This type is only mandated by ISO C 23 or newer, and it does | ||
| 637 | denote UTF-8 units. */ | ||
| 638 | typedef unsigned char char8_t; | ||
| 639 | |||
| 640 | #elif 0 | ||
| 641 | |||
| 642 | typedef unsigned char gl_char8_t; | ||
| 643 | # define char8_t gl_char8_t | ||
| 644 | |||
| 645 | #endif | ||
| 646 | |||
| 647 | #if !(defined __cplusplus ? 0 || 0 : 1) | ||
| 648 | |||
| 649 | /* A 16-bit variant of wchar_t. | ||
| 650 | Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 | ||
| 651 | and newer, it denotes UTF-16 units; in older versions of ISO C it did | ||
| 652 | so only on platforms on which __STDC_UTF_16__ was defined. */ | ||
| 653 | typedef uint_least16_t char16_t; | ||
| 654 | |||
| 655 | #elif 0 | ||
| 656 | |||
| 657 | typedef uint_least16_t gl_char16_t; | ||
| 658 | # define char16_t gl_char16_t | ||
| 659 | |||
| 660 | #endif | ||
| 661 | |||
| 662 | #if !(defined __cplusplus ? 0 || 0 : 1) | ||
| 663 | |||
| 664 | /* A 32-bit variant of wchar_t. | ||
| 665 | Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 | ||
| 666 | and newer, it denotes UTF-32 code points; in older versions of ISO C | ||
| 667 | it did so only on platforms on which __STDC_UTF_32__ was defined. | ||
| 668 | In gnulib, we guarantee that it denotes UTF-32 code points if and | ||
| 669 | only if the module 'uchar-h-c23' is in use. */ | ||
| 670 | typedef uint_least32_t char32_t; | ||
| 671 | |||
| 672 | #elif 0 | ||
| 673 | |||
| 674 | typedef uint_least32_t gl_char32_t; | ||
| 675 | # define char32_t gl_char32_t | ||
| 676 | |||
| 677 | #endif | ||
| 678 | |||
| 679 | /* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */ | ||
| 680 | #if 0 /* 32-bit AIX, Cygwin, native Windows */ | ||
| 681 | # define _GL_SMALL_WCHAR_T 1 | ||
| 682 | #endif | ||
| 683 | |||
| 684 | /* Define if 'wchar_t', like 'char32_t', | ||
| 685 | - is a 32-bit type, and | ||
| 686 | - represents Unicode code points. | ||
| 687 | For this test, we can use __STDC_ISO_10646__ (defined by glibc, musl libc, | ||
| 688 | Cygwin) but need to consider _GL_SMALL_WCHAR_T, so as to exclude Cygwin. | ||
| 689 | We cannot use __STDC_UTF_16__ or __STDC_UTF_32__ | ||
| 690 | - because these macros provide info about char16_t and char32_t (not | ||
| 691 | wchar_t!), and | ||
| 692 | - because GCC >= 4.9 defines these macros on all platforms, even on | ||
| 693 | FreeBSD and Solaris. | ||
| 694 | We should better not use __STD_UTF_16__, __STD_UTF_32__ either, because | ||
| 695 | these macros are misspellings, only defined by Android's <uchar.h>. */ | ||
| 696 | #if defined __STDC_ISO_10646__ && !_GL_SMALL_WCHAR_T | ||
| 697 | /* glibc, musl libc */ | ||
| 698 | # define _GL_WCHAR_T_IS_UCS4 1 | ||
| 699 | #endif | ||
| 700 | #if _GL_WCHAR_T_IS_UCS4 | ||
| 701 | static_assert (sizeof (char32_t) == sizeof (wchar_t)); | ||
| 702 | #endif | ||
| 703 | |||
| 704 | |||
| 705 | /* Convert a single-byte character to a 32-bit wide character. */ | ||
| 706 | #if 0 | ||
| 707 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_BTOC32 | ||
| 708 | _GL_BEGIN_C_LINKAGE | ||
| 709 | _GL_INLINE _GL_ATTRIBUTE_PURE wint_t | ||
| 710 | btoc32 (int c) | ||
| 711 | { | ||
| 712 | return | ||
| 713 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 714 | GNULIB_NAMESPACE:: | ||
| 715 | # endif | ||
| 716 | btowc (c); | ||
| 717 | } | ||
| 718 | _GL_END_C_LINKAGE | ||
| 719 | # else | ||
| 720 | _GL_FUNCDECL_SYS (btoc32, wint_t, (int c), _GL_ATTRIBUTE_PURE); | ||
| 721 | # endif | ||
| 722 | _GL_CXXALIAS_SYS (btoc32, wint_t, (int c)); | ||
| 723 | _GL_CXXALIASWARN (btoc32); | ||
| 724 | #endif | ||
| 725 | |||
| 726 | |||
| 727 | /* Test a specific property of a 32-bit wide character. */ | ||
| 728 | #if 1 | ||
| 729 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALNUM | ||
| 730 | _GL_BEGIN_C_LINKAGE | ||
| 731 | _GL_INLINE int | ||
| 732 | c32isalnum (wint_t wc) | ||
| 733 | { | ||
| 734 | return | ||
| 735 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 736 | GNULIB_NAMESPACE:: | ||
| 737 | # endif | ||
| 738 | iswalnum (wc); | ||
| 739 | } | ||
| 740 | _GL_END_C_LINKAGE | ||
| 741 | # else | ||
| 742 | _GL_FUNCDECL_SYS (c32isalnum, int, (wint_t wc), ); | ||
| 743 | # endif | ||
| 744 | _GL_CXXALIAS_SYS (c32isalnum, int, (wint_t wc)); | ||
| 745 | _GL_CXXALIASWARN (c32isalnum); | ||
| 746 | #endif | ||
| 747 | #if 1 | ||
| 748 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALPHA | ||
| 749 | _GL_BEGIN_C_LINKAGE | ||
| 750 | _GL_INLINE int | ||
| 751 | c32isalpha (wint_t wc) | ||
| 752 | { | ||
| 753 | return | ||
| 754 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 755 | GNULIB_NAMESPACE:: | ||
| 756 | # endif | ||
| 757 | iswalpha (wc); | ||
| 758 | } | ||
| 759 | _GL_END_C_LINKAGE | ||
| 760 | # else | ||
| 761 | _GL_FUNCDECL_SYS (c32isalpha, int, (wint_t wc), ); | ||
| 762 | # endif | ||
| 763 | _GL_CXXALIAS_SYS (c32isalpha, int, (wint_t wc)); | ||
| 764 | _GL_CXXALIASWARN (c32isalpha); | ||
| 765 | #endif | ||
| 766 | #if 1 | ||
| 767 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISBLANK | ||
| 768 | _GL_BEGIN_C_LINKAGE | ||
| 769 | _GL_INLINE int | ||
| 770 | c32isblank (wint_t wc) | ||
| 771 | { | ||
| 772 | return | ||
| 773 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 774 | GNULIB_NAMESPACE:: | ||
| 775 | # endif | ||
| 776 | iswblank (wc); | ||
| 777 | } | ||
| 778 | _GL_END_C_LINKAGE | ||
| 779 | # else | ||
| 780 | _GL_FUNCDECL_SYS (c32isblank, int, (wint_t wc), ); | ||
| 781 | # endif | ||
| 782 | _GL_CXXALIAS_SYS (c32isblank, int, (wint_t wc)); | ||
| 783 | _GL_CXXALIASWARN (c32isblank); | ||
| 784 | #endif | ||
| 785 | #if 1 | ||
| 786 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISCNTRL | ||
| 787 | _GL_BEGIN_C_LINKAGE | ||
| 788 | _GL_INLINE int | ||
| 789 | c32iscntrl (wint_t wc) | ||
| 790 | { | ||
| 791 | return | ||
| 792 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 793 | GNULIB_NAMESPACE:: | ||
| 794 | # endif | ||
| 795 | iswcntrl (wc); | ||
| 796 | } | ||
| 797 | _GL_END_C_LINKAGE | ||
| 798 | # else | ||
| 799 | _GL_FUNCDECL_SYS (c32iscntrl, int, (wint_t wc), ); | ||
| 800 | # endif | ||
| 801 | _GL_CXXALIAS_SYS (c32iscntrl, int, (wint_t wc)); | ||
| 802 | _GL_CXXALIASWARN (c32iscntrl); | ||
| 803 | #endif | ||
| 804 | #if 1 | ||
| 805 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISDIGIT | ||
| 806 | _GL_BEGIN_C_LINKAGE | ||
| 807 | _GL_INLINE int | ||
| 808 | c32isdigit (wint_t wc) | ||
| 809 | { | ||
| 810 | return | ||
| 811 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 812 | GNULIB_NAMESPACE:: | ||
| 813 | # endif | ||
| 814 | iswdigit (wc); | ||
| 815 | } | ||
| 816 | _GL_END_C_LINKAGE | ||
| 817 | # else | ||
| 818 | _GL_FUNCDECL_SYS (c32isdigit, int, (wint_t wc), ); | ||
| 819 | # endif | ||
| 820 | _GL_CXXALIAS_SYS (c32isdigit, int, (wint_t wc)); | ||
| 821 | _GL_CXXALIASWARN (c32isdigit); | ||
| 822 | #endif | ||
| 823 | #if 1 | ||
| 824 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISGRAPH | ||
| 825 | _GL_BEGIN_C_LINKAGE | ||
| 826 | _GL_INLINE int | ||
| 827 | c32isgraph (wint_t wc) | ||
| 828 | { | ||
| 829 | return | ||
| 830 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 831 | GNULIB_NAMESPACE:: | ||
| 832 | # endif | ||
| 833 | iswgraph (wc); | ||
| 834 | } | ||
| 835 | _GL_END_C_LINKAGE | ||
| 836 | # else | ||
| 837 | _GL_FUNCDECL_SYS (c32isgraph, int, (wint_t wc), ); | ||
| 838 | # endif | ||
| 839 | _GL_CXXALIAS_SYS (c32isgraph, int, (wint_t wc)); | ||
| 840 | _GL_CXXALIASWARN (c32isgraph); | ||
| 841 | #endif | ||
| 842 | #if 1 | ||
| 843 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISLOWER | ||
| 844 | _GL_BEGIN_C_LINKAGE | ||
| 845 | _GL_INLINE int | ||
| 846 | c32islower (wint_t wc) | ||
| 847 | { | ||
| 848 | return | ||
| 849 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 850 | GNULIB_NAMESPACE:: | ||
| 851 | # endif | ||
| 852 | iswlower (wc); | ||
| 853 | } | ||
| 854 | _GL_END_C_LINKAGE | ||
| 855 | # else | ||
| 856 | _GL_FUNCDECL_SYS (c32islower, int, (wint_t wc), ); | ||
| 857 | # endif | ||
| 858 | _GL_CXXALIAS_SYS (c32islower, int, (wint_t wc)); | ||
| 859 | _GL_CXXALIASWARN (c32islower); | ||
| 860 | #endif | ||
| 861 | #if 1 | ||
| 862 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPRINT | ||
| 863 | _GL_BEGIN_C_LINKAGE | ||
| 864 | _GL_INLINE int | ||
| 865 | c32isprint (wint_t wc) | ||
| 866 | { | ||
| 867 | return | ||
| 868 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 869 | GNULIB_NAMESPACE:: | ||
| 870 | # endif | ||
| 871 | iswprint (wc); | ||
| 872 | } | ||
| 873 | _GL_END_C_LINKAGE | ||
| 874 | # else | ||
| 875 | _GL_FUNCDECL_SYS (c32isprint, int, (wint_t wc), ); | ||
| 876 | # endif | ||
| 877 | _GL_CXXALIAS_SYS (c32isprint, int, (wint_t wc)); | ||
| 878 | _GL_CXXALIASWARN (c32isprint); | ||
| 879 | #endif | ||
| 880 | #if 1 | ||
| 881 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPUNCT | ||
| 882 | _GL_BEGIN_C_LINKAGE | ||
| 883 | _GL_INLINE int | ||
| 884 | c32ispunct (wint_t wc) | ||
| 885 | { | ||
| 886 | return | ||
| 887 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 888 | GNULIB_NAMESPACE:: | ||
| 889 | # endif | ||
| 890 | iswpunct (wc); | ||
| 891 | } | ||
| 892 | _GL_END_C_LINKAGE | ||
| 893 | # else | ||
| 894 | _GL_FUNCDECL_SYS (c32ispunct, int, (wint_t wc), ); | ||
| 895 | # endif | ||
| 896 | _GL_CXXALIAS_SYS (c32ispunct, int, (wint_t wc)); | ||
| 897 | _GL_CXXALIASWARN (c32ispunct); | ||
| 898 | #endif | ||
| 899 | #if 1 | ||
| 900 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISSPACE | ||
| 901 | _GL_BEGIN_C_LINKAGE | ||
| 902 | _GL_INLINE int | ||
| 903 | c32isspace (wint_t wc) | ||
| 904 | { | ||
| 905 | return | ||
| 906 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 907 | GNULIB_NAMESPACE:: | ||
| 908 | # endif | ||
| 909 | iswspace (wc); | ||
| 910 | } | ||
| 911 | _GL_END_C_LINKAGE | ||
| 912 | # else | ||
| 913 | _GL_FUNCDECL_SYS (c32isspace, int, (wint_t wc), ); | ||
| 914 | # endif | ||
| 915 | _GL_CXXALIAS_SYS (c32isspace, int, (wint_t wc)); | ||
| 916 | _GL_CXXALIASWARN (c32isspace); | ||
| 917 | #endif | ||
| 918 | #if 1 | ||
| 919 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISUPPER | ||
| 920 | _GL_BEGIN_C_LINKAGE | ||
| 921 | _GL_INLINE int | ||
| 922 | c32isupper (wint_t wc) | ||
| 923 | { | ||
| 924 | return | ||
| 925 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 926 | GNULIB_NAMESPACE:: | ||
| 927 | # endif | ||
| 928 | iswupper (wc); | ||
| 929 | } | ||
| 930 | _GL_END_C_LINKAGE | ||
| 931 | # else | ||
| 932 | _GL_FUNCDECL_SYS (c32isupper, int, (wint_t wc), ); | ||
| 933 | # endif | ||
| 934 | _GL_CXXALIAS_SYS (c32isupper, int, (wint_t wc)); | ||
| 935 | _GL_CXXALIASWARN (c32isupper); | ||
| 936 | #endif | ||
| 937 | #if 1 | ||
| 938 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISXDIGIT | ||
| 939 | _GL_BEGIN_C_LINKAGE | ||
| 940 | _GL_INLINE int | ||
| 941 | c32isxdigit (wint_t wc) | ||
| 942 | { | ||
| 943 | return | ||
| 944 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 945 | GNULIB_NAMESPACE:: | ||
| 946 | # endif | ||
| 947 | iswxdigit (wc); | ||
| 948 | } | ||
| 949 | _GL_END_C_LINKAGE | ||
| 950 | # else | ||
| 951 | _GL_FUNCDECL_SYS (c32isxdigit, int, (wint_t wc), ); | ||
| 952 | # endif | ||
| 953 | _GL_CXXALIAS_SYS (c32isxdigit, int, (wint_t wc)); | ||
| 954 | _GL_CXXALIASWARN (c32isxdigit); | ||
| 955 | #endif | ||
| 956 | |||
| 957 | |||
| 958 | /* Case mapping of a 32-bit wide character. */ | ||
| 959 | #if 1 | ||
| 960 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOLOWER | ||
| 961 | _GL_BEGIN_C_LINKAGE | ||
| 962 | _GL_INLINE wint_t | ||
| 963 | c32tolower (wint_t wc) | ||
| 964 | { | ||
| 965 | return | ||
| 966 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 967 | GNULIB_NAMESPACE:: | ||
| 968 | # endif | ||
| 969 | towlower (wc); | ||
| 970 | } | ||
| 971 | _GL_END_C_LINKAGE | ||
| 972 | # else | ||
| 973 | _GL_FUNCDECL_SYS (c32tolower, wint_t, (wint_t wc), ); | ||
| 974 | # endif | ||
| 975 | _GL_CXXALIAS_SYS (c32tolower, wint_t, (wint_t wc)); | ||
| 976 | _GL_CXXALIASWARN (c32tolower); | ||
| 977 | #endif | ||
| 978 | #if 0 | ||
| 979 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOUPPER | ||
| 980 | _GL_BEGIN_C_LINKAGE | ||
| 981 | _GL_INLINE wint_t | ||
| 982 | c32toupper (wint_t wc) | ||
| 983 | { | ||
| 984 | return | ||
| 985 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 986 | GNULIB_NAMESPACE:: | ||
| 987 | # endif | ||
| 988 | towupper (wc); | ||
| 989 | } | ||
| 990 | _GL_END_C_LINKAGE | ||
| 991 | # else | ||
| 992 | _GL_FUNCDECL_SYS (c32toupper, wint_t, (wint_t wc), ); | ||
| 993 | # endif | ||
| 994 | _GL_CXXALIAS_SYS (c32toupper, wint_t, (wint_t wc)); | ||
| 995 | _GL_CXXALIASWARN (c32toupper); | ||
| 996 | #endif | ||
| 997 | |||
| 998 | |||
| 999 | /* Number of screen columns needed for a 32-bit wide character. */ | ||
| 1000 | #if 1 | ||
| 1001 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32WIDTH | ||
| 1002 | _GL_BEGIN_C_LINKAGE | ||
| 1003 | _GL_INLINE int | ||
| 1004 | c32width (char32_t wc) | ||
| 1005 | { | ||
| 1006 | return | ||
| 1007 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1008 | GNULIB_NAMESPACE:: | ||
| 1009 | # endif | ||
| 1010 | wcwidth (wc); | ||
| 1011 | } | ||
| 1012 | _GL_END_C_LINKAGE | ||
| 1013 | # else | ||
| 1014 | _GL_FUNCDECL_SYS (c32width, int, (char32_t wc), ); | ||
| 1015 | # endif | ||
| 1016 | _GL_CXXALIAS_SYS (c32width, int, (char32_t wc)); | ||
| 1017 | _GL_CXXALIASWARN (c32width); | ||
| 1018 | #endif | ||
| 1019 | |||
| 1020 | |||
| 1021 | /* Converts a 32-bit wide character to a multibyte character. */ | ||
| 1022 | #if 0 | ||
| 1023 | # if 0 | ||
| 1024 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1025 | # undef c32rtomb | ||
| 1026 | # define c32rtomb rpl_c32rtomb | ||
| 1027 | # endif | ||
| 1028 | _GL_FUNCDECL_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps), ); | ||
| 1029 | _GL_CXXALIAS_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); | ||
| 1030 | # else | ||
| 1031 | # if !1 | ||
| 1032 | _GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps), ); | ||
| 1033 | # endif | ||
| 1034 | _GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); | ||
| 1035 | # endif | ||
| 1036 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 | ||
| 1037 | _GL_CXXALIASWARN (c32rtomb); | ||
| 1038 | # endif | ||
| 1039 | #elif defined GNULIB_POSIXCHECK | ||
| 1040 | # if HAVE_RAW_DECL_C32RTOMB | ||
| 1041 | _GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " | ||
| 1042 | "use gnulib module c32rtomb for portability"); | ||
| 1043 | # endif | ||
| 1044 | #endif | ||
| 1045 | |||
| 1046 | |||
| 1047 | /* Convert a 32-bit wide string to a string. */ | ||
| 1048 | #if 0 | ||
| 1049 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SNRTOMBS | ||
| 1050 | _GL_BEGIN_C_LINKAGE | ||
| 1051 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1052 | c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len, | ||
| 1053 | mbstate_t *ps) | ||
| 1054 | { | ||
| 1055 | return | ||
| 1056 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1057 | GNULIB_NAMESPACE:: | ||
| 1058 | # endif | ||
| 1059 | wcsnrtombs (dest, (const wchar_t **) srcp, srclen, len, ps); | ||
| 1060 | } | ||
| 1061 | _GL_END_C_LINKAGE | ||
| 1062 | # else | ||
| 1063 | _GL_FUNCDECL_SYS (c32snrtombs, size_t, | ||
| 1064 | (char *dest, const char32_t **srcp, size_t srclen, size_t len, | ||
| 1065 | mbstate_t *ps), | ||
| 1066 | _GL_ARG_NONNULL ((2))); | ||
| 1067 | # endif | ||
| 1068 | _GL_CXXALIAS_SYS (c32snrtombs, size_t, | ||
| 1069 | (char *dest, const char32_t **srcp, size_t srclen, size_t len, | ||
| 1070 | mbstate_t *ps)); | ||
| 1071 | _GL_CXXALIASWARN (c32snrtombs); | ||
| 1072 | #endif | ||
| 1073 | |||
| 1074 | |||
| 1075 | /* Convert a 32-bit wide string to a string. */ | ||
| 1076 | #if 0 | ||
| 1077 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SRTOMBS | ||
| 1078 | _GL_BEGIN_C_LINKAGE | ||
| 1079 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1080 | c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) | ||
| 1081 | { | ||
| 1082 | return | ||
| 1083 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1084 | GNULIB_NAMESPACE:: | ||
| 1085 | # endif | ||
| 1086 | wcsrtombs (dest, (const wchar_t **) srcp, len, ps); | ||
| 1087 | } | ||
| 1088 | _GL_END_C_LINKAGE | ||
| 1089 | # else | ||
| 1090 | _GL_FUNCDECL_SYS (c32srtombs, size_t, | ||
| 1091 | (char *dest, const char32_t **srcp, size_t len, | ||
| 1092 | mbstate_t *ps), | ||
| 1093 | _GL_ARG_NONNULL ((2))); | ||
| 1094 | # endif | ||
| 1095 | _GL_CXXALIAS_SYS (c32srtombs, size_t, | ||
| 1096 | (char *dest, const char32_t **srcp, size_t len, | ||
| 1097 | mbstate_t *ps)); | ||
| 1098 | _GL_CXXALIASWARN (c32srtombs); | ||
| 1099 | #endif | ||
| 1100 | |||
| 1101 | |||
| 1102 | /* Convert a 32-bit wide string to a string. */ | ||
| 1103 | #if 0 | ||
| 1104 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32STOMBS | ||
| 1105 | _GL_BEGIN_C_LINKAGE | ||
| 1106 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1107 | c32stombs (char *dest, const char32_t *src, size_t len) | ||
| 1108 | { | ||
| 1109 | mbstate_t state; | ||
| 1110 | |||
| 1111 | mbszero (&state); | ||
| 1112 | return c32srtombs (dest, &src, len, &state); | ||
| 1113 | } | ||
| 1114 | _GL_END_C_LINKAGE | ||
| 1115 | # else | ||
| 1116 | _GL_FUNCDECL_SYS (c32stombs, size_t, | ||
| 1117 | (char *dest, const char32_t *src, size_t len), | ||
| 1118 | _GL_ARG_NONNULL ((2))); | ||
| 1119 | # endif | ||
| 1120 | _GL_CXXALIAS_SYS (c32stombs, size_t, | ||
| 1121 | (char *dest, const char32_t *src, size_t len)); | ||
| 1122 | _GL_CXXALIASWARN (c32stombs); | ||
| 1123 | #endif | ||
| 1124 | |||
| 1125 | |||
| 1126 | /* Number of screen columns needed for a size-bounded 32-bit wide string. */ | ||
| 1127 | #if 0 | ||
| 1128 | # if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32SWIDTH | ||
| 1129 | _GL_BEGIN_C_LINKAGE | ||
| 1130 | _GL_INLINE _GL_ARG_NONNULL ((1)) int | ||
| 1131 | c32swidth (const char32_t *s, size_t n) | ||
| 1132 | { | ||
| 1133 | return | ||
| 1134 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1135 | GNULIB_NAMESPACE:: | ||
| 1136 | # endif | ||
| 1137 | wcswidth ((const wchar_t *) s, n); | ||
| 1138 | } | ||
| 1139 | _GL_END_C_LINKAGE | ||
| 1140 | # else | ||
| 1141 | _GL_FUNCDECL_SYS (c32swidth, int, (const char32_t *s, size_t n), | ||
| 1142 | _GL_ARG_NONNULL ((1))); | ||
| 1143 | # endif | ||
| 1144 | _GL_CXXALIAS_SYS (c32swidth, int, (const char32_t *s, size_t n)); | ||
| 1145 | _GL_CXXALIASWARN (c32swidth); | ||
| 1146 | #endif | ||
| 1147 | |||
| 1148 | |||
| 1149 | /* Converts a 32-bit wide character to unibyte character. | ||
| 1150 | Returns the single-byte representation of WC if it exists, | ||
| 1151 | or EOF otherwise. */ | ||
| 1152 | #if 0 | ||
| 1153 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32TOB | ||
| 1154 | _GL_BEGIN_C_LINKAGE | ||
| 1155 | _GL_INLINE int | ||
| 1156 | c32tob (wint_t wc) | ||
| 1157 | { | ||
| 1158 | return | ||
| 1159 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1160 | GNULIB_NAMESPACE:: | ||
| 1161 | # endif | ||
| 1162 | wctob (wc); | ||
| 1163 | } | ||
| 1164 | _GL_END_C_LINKAGE | ||
| 1165 | # else | ||
| 1166 | _GL_FUNCDECL_SYS (c32tob, int, (wint_t wc), ); | ||
| 1167 | # endif | ||
| 1168 | _GL_CXXALIAS_SYS (c32tob, int, (wint_t wc)); | ||
| 1169 | _GL_CXXALIASWARN (c32tob); | ||
| 1170 | #endif | ||
| 1171 | |||
| 1172 | |||
| 1173 | /* Converts a multibyte character to a 32-bit wide character. */ | ||
| 1174 | #if 1 | ||
| 1175 | # if 1 | ||
| 1176 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1177 | # undef mbrtoc32 | ||
| 1178 | # define mbrtoc32 rpl_mbrtoc32 | ||
| 1179 | # endif | ||
| 1180 | _GL_FUNCDECL_RPL (mbrtoc32, size_t, | ||
| 1181 | (char32_t *pc, const char *s, size_t n, mbstate_t *ps), ); | ||
| 1182 | _GL_CXXALIAS_RPL (mbrtoc32, size_t, | ||
| 1183 | (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); | ||
| 1184 | # else | ||
| 1185 | # if !1 | ||
| 1186 | _GL_FUNCDECL_SYS (mbrtoc32, size_t, | ||
| 1187 | (char32_t *pc, const char *s, size_t n, mbstate_t *ps), ); | ||
| 1188 | # endif | ||
| 1189 | _GL_CXXALIAS_SYS (mbrtoc32, size_t, | ||
| 1190 | (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); | ||
| 1191 | # endif | ||
| 1192 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 | ||
| 1193 | _GL_CXXALIASWARN (mbrtoc32); | ||
| 1194 | # endif | ||
| 1195 | #elif defined GNULIB_POSIXCHECK | ||
| 1196 | # if HAVE_RAW_DECL_MBRTOC32 | ||
| 1197 | _GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " | ||
| 1198 | "use gnulib module mbrtoc32 for portability"); | ||
| 1199 | # endif | ||
| 1200 | #endif | ||
| 1201 | |||
| 1202 | |||
| 1203 | /* Converts a multibyte character and returns the next 16-bit wide | ||
| 1204 | character. */ | ||
| 1205 | #if 0 | ||
| 1206 | # if 0 | ||
| 1207 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1208 | # undef mbrtoc16 | ||
| 1209 | # define mbrtoc16 rpl_mbrtoc16 | ||
| 1210 | # endif | ||
| 1211 | _GL_FUNCDECL_RPL (mbrtoc16, size_t, | ||
| 1212 | (char16_t *pc, const char *s, size_t n, mbstate_t *ps), ); | ||
| 1213 | _GL_CXXALIAS_RPL (mbrtoc16, size_t, | ||
| 1214 | (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); | ||
| 1215 | # else | ||
| 1216 | # if !1 | ||
| 1217 | _GL_FUNCDECL_SYS (mbrtoc16, size_t, | ||
| 1218 | (char16_t *pc, const char *s, size_t n, mbstate_t *ps), ); | ||
| 1219 | # endif | ||
| 1220 | _GL_CXXALIAS_SYS (mbrtoc16, size_t, | ||
| 1221 | (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); | ||
| 1222 | # endif | ||
| 1223 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 | ||
| 1224 | _GL_CXXALIASWARN (mbrtoc16); | ||
| 1225 | # endif | ||
| 1226 | #elif defined GNULIB_POSIXCHECK | ||
| 1227 | # if HAVE_RAW_DECL_MBRTOC16 | ||
| 1228 | _GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " | ||
| 1229 | "use gnulib module mbrtoc16 for portability"); | ||
| 1230 | # endif | ||
| 1231 | #endif | ||
| 1232 | |||
| 1233 | |||
| 1234 | /* Convert a string to a 32-bit wide string. */ | ||
| 1235 | #if 0 | ||
| 1236 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSNRTOC32S | ||
| 1237 | _GL_BEGIN_C_LINKAGE | ||
| 1238 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1239 | mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len, | ||
| 1240 | mbstate_t *ps) | ||
| 1241 | { | ||
| 1242 | return | ||
| 1243 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1244 | GNULIB_NAMESPACE:: | ||
| 1245 | # endif | ||
| 1246 | mbsnrtowcs ((wchar_t *) dest, srcp, srclen, len, ps); | ||
| 1247 | } | ||
| 1248 | _GL_END_C_LINKAGE | ||
| 1249 | # else | ||
| 1250 | _GL_FUNCDECL_SYS (mbsnrtoc32s, size_t, | ||
| 1251 | (char32_t *dest, const char **srcp, size_t srclen, size_t len, | ||
| 1252 | mbstate_t *ps), | ||
| 1253 | _GL_ARG_NONNULL ((2))); | ||
| 1254 | # endif | ||
| 1255 | _GL_CXXALIAS_SYS (mbsnrtoc32s, size_t, | ||
| 1256 | (char32_t *dest, const char **srcp, size_t srclen, size_t len, | ||
| 1257 | mbstate_t *ps)); | ||
| 1258 | _GL_CXXALIASWARN (mbsnrtoc32s); | ||
| 1259 | #endif | ||
| 1260 | |||
| 1261 | |||
| 1262 | /* Convert a string to a 32-bit wide string. */ | ||
| 1263 | #if 0 | ||
| 1264 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSRTOC32S | ||
| 1265 | _GL_BEGIN_C_LINKAGE | ||
| 1266 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1267 | mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) | ||
| 1268 | { | ||
| 1269 | return | ||
| 1270 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1271 | GNULIB_NAMESPACE:: | ||
| 1272 | # endif | ||
| 1273 | mbsrtowcs ((wchar_t *) dest, srcp, len, ps); | ||
| 1274 | } | ||
| 1275 | _GL_END_C_LINKAGE | ||
| 1276 | # else | ||
| 1277 | _GL_FUNCDECL_SYS (mbsrtoc32s, size_t, | ||
| 1278 | (char32_t *dest, const char **srcp, size_t len, | ||
| 1279 | mbstate_t *ps), | ||
| 1280 | _GL_ARG_NONNULL ((2))); | ||
| 1281 | # endif | ||
| 1282 | _GL_CXXALIAS_SYS (mbsrtoc32s, size_t, | ||
| 1283 | (char32_t *dest, const char **srcp, size_t len, | ||
| 1284 | mbstate_t *ps)); | ||
| 1285 | _GL_CXXALIASWARN (mbsrtoc32s); | ||
| 1286 | #endif | ||
| 1287 | |||
| 1288 | |||
| 1289 | /* Convert a string to a 32-bit wide string. */ | ||
| 1290 | #if 0 | ||
| 1291 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSTOC32S | ||
| 1292 | _GL_BEGIN_C_LINKAGE | ||
| 1293 | _GL_INLINE _GL_ARG_NONNULL ((2)) size_t | ||
| 1294 | mbstoc32s (char32_t *dest, const char *src, size_t len) | ||
| 1295 | { | ||
| 1296 | mbstate_t state; | ||
| 1297 | |||
| 1298 | mbszero (&state); | ||
| 1299 | return mbsrtoc32s (dest, &src, len, &state); | ||
| 1300 | } | ||
| 1301 | _GL_END_C_LINKAGE | ||
| 1302 | # else | ||
| 1303 | _GL_FUNCDECL_SYS (mbstoc32s, size_t, | ||
| 1304 | (char32_t *dest, const char *src, size_t len), | ||
| 1305 | _GL_ARG_NONNULL ((2))); | ||
| 1306 | # endif | ||
| 1307 | _GL_CXXALIAS_SYS (mbstoc32s, size_t, | ||
| 1308 | (char32_t *dest, const char *src, size_t len)); | ||
| 1309 | _GL_CXXALIASWARN (mbstoc32s); | ||
| 1310 | #endif | ||
| 1311 | |||
| 1312 | |||
| 1313 | #if 0 || 0 | ||
| 1314 | /* A scalar type. Instances of this type, other than (c32_type_test_t) 0, | ||
| 1315 | represent a character property, sometimes also viewed as a "character class". | ||
| 1316 | It can be applied to 32-bit wide characters. It is the counterpart of | ||
| 1317 | type 'wctype_t' for wide characters. | ||
| 1318 | To test whether a given character has a certain property, use the function | ||
| 1319 | 'c32_apply_type_test'. */ | ||
| 1320 | # if _GL_WCHAR_T_IS_UCS4 | ||
| 1321 | typedef wctype_t c32_type_test_t; | ||
| 1322 | # else | ||
| 1323 | typedef /*bool*/int (*c32_type_test_t) (wint_t wc); | ||
| 1324 | # endif | ||
| 1325 | #endif | ||
| 1326 | |||
| 1327 | /* Return a character property with the given name, or (c32_type_test_t) 0 | ||
| 1328 | if the designated property does not exist. | ||
| 1329 | This function is the counterpart of function 'wctype' for wide characters. | ||
| 1330 | */ | ||
| 1331 | #if 0 | ||
| 1332 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_TYPE_TEST | ||
| 1333 | _GL_BEGIN_C_LINKAGE | ||
| 1334 | _GL_INLINE _GL_ARG_NONNULL ((1)) c32_type_test_t | ||
| 1335 | c32_get_type_test (const char *name) | ||
| 1336 | { | ||
| 1337 | return | ||
| 1338 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1339 | GNULIB_NAMESPACE:: | ||
| 1340 | # endif | ||
| 1341 | wctype (name); | ||
| 1342 | } | ||
| 1343 | _GL_END_C_LINKAGE | ||
| 1344 | # else | ||
| 1345 | _GL_FUNCDECL_SYS (c32_get_type_test, c32_type_test_t, (const char *name), | ||
| 1346 | _GL_ARG_NONNULL ((1))); | ||
| 1347 | # endif | ||
| 1348 | _GL_CXXALIAS_SYS (c32_get_type_test, c32_type_test_t, (const char *name)); | ||
| 1349 | _GL_CXXALIASWARN (c32_get_type_test); | ||
| 1350 | #endif | ||
| 1351 | |||
| 1352 | /* Test whether a given 32-bit wide character has the specified character | ||
| 1353 | property. | ||
| 1354 | Return non-zero if true, zero if false or if the argument is WEOF. | ||
| 1355 | This function is the counterpart of function 'iswctype' for wide characters. | ||
| 1356 | */ | ||
| 1357 | #if 0 | ||
| 1358 | # if _GL_WCHAR_T_IS_UCS4 | ||
| 1359 | # if !defined IN_C32_APPLY_TYPE_TEST | ||
| 1360 | _GL_BEGIN_C_LINKAGE | ||
| 1361 | _GL_INLINE int | ||
| 1362 | c32_apply_type_test (wint_t wc, c32_type_test_t property) | ||
| 1363 | { | ||
| 1364 | return | ||
| 1365 | # if 1 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1366 | GNULIB_NAMESPACE:: | ||
| 1367 | # endif | ||
| 1368 | iswctype (wc, property); | ||
| 1369 | } | ||
| 1370 | _GL_END_C_LINKAGE | ||
| 1371 | # else | ||
| 1372 | _GL_FUNCDECL_SYS (c32_apply_type_test, int, | ||
| 1373 | (wint_t wc, c32_type_test_t property), ); | ||
| 1374 | # endif | ||
| 1375 | # else | ||
| 1376 | _GL_FUNCDECL_SYS (c32_apply_type_test, int, | ||
| 1377 | (wint_t wc, c32_type_test_t property), | ||
| 1378 | _GL_ARG_NONNULL ((2))); | ||
| 1379 | # endif | ||
| 1380 | _GL_CXXALIAS_SYS (c32_apply_type_test, int, | ||
| 1381 | (wint_t wc, c32_type_test_t property)); | ||
| 1382 | _GL_CXXALIASWARN (c32_apply_type_test); | ||
| 1383 | #endif | ||
| 1384 | |||
| 1385 | |||
| 1386 | #if 0 || 0 | ||
| 1387 | /* A scalar type. Instances of this type, other than (c32_mapping_t) 0, | ||
| 1388 | represent a character mapping. It can be applied to 32-bit wide characters. | ||
| 1389 | It is the counterpart of type 'wctrans_t' for wide characters. | ||
| 1390 | To apply a certain mapping to a given character, use the function | ||
| 1391 | 'c32_apply_mapping'. */ | ||
| 1392 | # if _GL_WCHAR_T_IS_UCS4 | ||
| 1393 | typedef wctrans_t c32_mapping_t; | ||
| 1394 | # else | ||
| 1395 | typedef wint_t (*c32_mapping_t) (wint_t wc); | ||
| 1396 | # endif | ||
| 1397 | #endif | ||
| 1398 | |||
| 1399 | /* Return a character mapping with the given name, or (c32_mapping_t) 0 | ||
| 1400 | if the designated mapping does not exist. | ||
| 1401 | This function is the counterpart of function 'wctrans' for wide characters. | ||
| 1402 | */ | ||
| 1403 | #if 0 | ||
| 1404 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_MAPPING | ||
| 1405 | _GL_BEGIN_C_LINKAGE | ||
| 1406 | _GL_INLINE _GL_ARG_NONNULL ((1)) c32_mapping_t | ||
| 1407 | c32_get_mapping (const char *name) | ||
| 1408 | { | ||
| 1409 | return | ||
| 1410 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1411 | GNULIB_NAMESPACE:: | ||
| 1412 | # endif | ||
| 1413 | wctrans (name); | ||
| 1414 | } | ||
| 1415 | _GL_END_C_LINKAGE | ||
| 1416 | # else | ||
| 1417 | _GL_FUNCDECL_SYS (c32_get_mapping, c32_mapping_t, (const char *name), | ||
| 1418 | _GL_ARG_NONNULL ((1))); | ||
| 1419 | # endif | ||
| 1420 | _GL_CXXALIAS_SYS (c32_get_mapping, c32_mapping_t, (const char *name)); | ||
| 1421 | _GL_CXXALIASWARN (c32_get_mapping); | ||
| 1422 | #endif | ||
| 1423 | |||
| 1424 | /* Apply the specified character mapping to a given 32-bit wide character. | ||
| 1425 | Return the result of this mapping. Return the WC argument unchanged if it is | ||
| 1426 | WEOF. | ||
| 1427 | This function is the counterpart of function 'towctrans' for wide characters. | ||
| 1428 | */ | ||
| 1429 | #if 0 | ||
| 1430 | # if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_MAPPING | ||
| 1431 | _GL_BEGIN_C_LINKAGE | ||
| 1432 | _GL_INLINE _GL_ARG_NONNULL ((2)) wint_t | ||
| 1433 | c32_apply_mapping (wint_t wc, c32_mapping_t mapping) | ||
| 1434 | { | ||
| 1435 | return | ||
| 1436 | # if 0 && defined __cplusplus && defined GNULIB_NAMESPACE | ||
| 1437 | GNULIB_NAMESPACE:: | ||
| 1438 | # endif | ||
| 1439 | towctrans (wc, mapping); | ||
| 1440 | } | ||
| 1441 | _GL_END_C_LINKAGE | ||
| 1442 | # else | ||
| 1443 | _GL_FUNCDECL_SYS (c32_apply_mapping, wint_t, | ||
| 1444 | (wint_t wc, c32_mapping_t mapping), | ||
| 1445 | _GL_ARG_NONNULL ((2))); | ||
| 1446 | # endif | ||
| 1447 | _GL_CXXALIAS_SYS (c32_apply_mapping, wint_t, | ||
| 1448 | (wint_t wc, c32_mapping_t mapping)); | ||
| 1449 | _GL_CXXALIASWARN (c32_apply_mapping); | ||
| 1450 | #endif | ||
| 1451 | |||
| 1452 | |||
| 1453 | _GL_INLINE_HEADER_END | ||
| 1454 | |||
| 1455 | #endif /* _GL_UCHAR_H */ | ||
| 1456 | #endif /* _GL_UCHAR_H */ | ||
diff --git a/gl/uchar.in.h b/gl/uchar.in.h index 9a65ac37..300f7b5f 100644 --- a/gl/uchar.in.h +++ b/gl/uchar.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* <uchar.h> substitute - 16-bit and 32-bit wide character types. | 1 | /* <uchar.h> substitute - 16-bit and 32-bit wide character types. |
| 2 | Copyright (C) 2019-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -490,7 +490,6 @@ _GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); | |||
| 490 | _GL_CXXALIASWARN (c32rtomb); | 490 | _GL_CXXALIASWARN (c32rtomb); |
| 491 | # endif | 491 | # endif |
| 492 | #elif defined GNULIB_POSIXCHECK | 492 | #elif defined GNULIB_POSIXCHECK |
| 493 | # undef c32rtomb | ||
| 494 | # if HAVE_RAW_DECL_C32RTOMB | 493 | # if HAVE_RAW_DECL_C32RTOMB |
| 495 | _GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " | 494 | _GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " |
| 496 | "use gnulib module c32rtomb for portability"); | 495 | "use gnulib module c32rtomb for portability"); |
| @@ -647,7 +646,6 @@ _GL_CXXALIAS_SYS (mbrtoc32, size_t, | |||
| 647 | _GL_CXXALIASWARN (mbrtoc32); | 646 | _GL_CXXALIASWARN (mbrtoc32); |
| 648 | # endif | 647 | # endif |
| 649 | #elif defined GNULIB_POSIXCHECK | 648 | #elif defined GNULIB_POSIXCHECK |
| 650 | # undef mbrtoc32 | ||
| 651 | # if HAVE_RAW_DECL_MBRTOC32 | 649 | # if HAVE_RAW_DECL_MBRTOC32 |
| 652 | _GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " | 650 | _GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " |
| 653 | "use gnulib module mbrtoc32 for portability"); | 651 | "use gnulib module mbrtoc32 for portability"); |
| @@ -679,7 +677,6 @@ _GL_CXXALIAS_SYS (mbrtoc16, size_t, | |||
| 679 | _GL_CXXALIASWARN (mbrtoc16); | 677 | _GL_CXXALIASWARN (mbrtoc16); |
| 680 | # endif | 678 | # endif |
| 681 | #elif defined GNULIB_POSIXCHECK | 679 | #elif defined GNULIB_POSIXCHECK |
| 682 | # undef mbrtoc16 | ||
| 683 | # if HAVE_RAW_DECL_MBRTOC16 | 680 | # if HAVE_RAW_DECL_MBRTOC16 |
| 684 | _GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " | 681 | _GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " |
| 685 | "use gnulib module mbrtoc16 for portability"); | 682 | "use gnulib module mbrtoc16 for portability"); |
diff --git a/gl/unicase.h b/gl/unicase.h deleted file mode 100644 index 507a83d0..00000000 --- a/gl/unicase.h +++ /dev/null | |||
| @@ -1,472 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Unicode character case mappings. | ||
| 3 | Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #ifndef _UNICASE_H | ||
| 19 | #define _UNICASE_H | ||
| 20 | |||
| 21 | #include "unitypes.h" | ||
| 22 | |||
| 23 | /* Get bool. */ | ||
| 24 | #include <stdbool.h> | ||
| 25 | |||
| 26 | /* Get size_t. */ | ||
| 27 | #include <stddef.h> | ||
| 28 | |||
| 29 | /* Get uninorm_t. */ | ||
| 30 | #include "uninorm.h" | ||
| 31 | |||
| 32 | #if 0 | ||
| 33 | # include <unistring/woe32dll.h> | ||
| 34 | #else | ||
| 35 | # define LIBUNISTRING_DLL_VARIABLE | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #ifdef __cplusplus | ||
| 39 | extern "C" { | ||
| 40 | #endif | ||
| 41 | |||
| 42 | /* ========================================================================= */ | ||
| 43 | |||
| 44 | /* Character case mappings. | ||
| 45 | These mappings are locale and context independent. | ||
| 46 | WARNING! These functions are not sufficient for languages such as German. | ||
| 47 | Better use the functions below that treat an entire string at once and are | ||
| 48 | language aware. */ | ||
| 49 | |||
| 50 | /* Return the uppercase mapping of a Unicode character. */ | ||
| 51 | extern ucs4_t | ||
| 52 | uc_toupper (ucs4_t uc) | ||
| 53 | _UC_ATTRIBUTE_CONST; | ||
| 54 | |||
| 55 | /* Return the lowercase mapping of a Unicode character. */ | ||
| 56 | extern ucs4_t | ||
| 57 | uc_tolower (ucs4_t uc) | ||
| 58 | _UC_ATTRIBUTE_CONST; | ||
| 59 | |||
| 60 | /* Return the titlecase mapping of a Unicode character. */ | ||
| 61 | extern ucs4_t | ||
| 62 | uc_totitle (ucs4_t uc) | ||
| 63 | _UC_ATTRIBUTE_CONST; | ||
| 64 | |||
| 65 | /* ========================================================================= */ | ||
| 66 | |||
| 67 | /* String case mappings. */ | ||
| 68 | |||
| 69 | /* These functions are locale dependent. The iso639_language argument | ||
| 70 | identifies the language (e.g. "tr" for Turkish). NULL means to use | ||
| 71 | locale independent case mappings. */ | ||
| 72 | |||
| 73 | /* Return the ISO 639 language code of the current locale. | ||
| 74 | Return "" if it is unknown, or in the "C" locale. */ | ||
| 75 | extern const char * | ||
| 76 | uc_locale_language (void) | ||
| 77 | _UC_ATTRIBUTE_PURE; | ||
| 78 | |||
| 79 | /* Conventions: | ||
| 80 | |||
| 81 | All functions prefixed with u8_ operate on UTF-8 encoded strings. | ||
| 82 | Their unit is an uint8_t (1 byte). | ||
| 83 | |||
| 84 | All functions prefixed with u16_ operate on UTF-16 encoded strings. | ||
| 85 | Their unit is an uint16_t (a 2-byte word). | ||
| 86 | |||
| 87 | All functions prefixed with u32_ operate on UCS-4 encoded strings. | ||
| 88 | Their unit is an uint32_t (a 4-byte word). | ||
| 89 | |||
| 90 | All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly | ||
| 91 | n units. | ||
| 92 | |||
| 93 | Functions returning a string result take a (resultbuf, lengthp) argument | ||
| 94 | pair. If resultbuf is not NULL and the result fits into *lengthp units, | ||
| 95 | it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly | ||
| 96 | allocated string is returned. In both cases, *lengthp is set to the | ||
| 97 | length (number of units) of the returned string. In case of error, | ||
| 98 | NULL is returned and errno is set. */ | ||
| 99 | |||
| 100 | /* Return the uppercase mapping of a string. | ||
| 101 | The nf argument identifies the normalization form to apply after the | ||
| 102 | case-mapping. It can also be NULL, for no normalization. */ | ||
| 103 | extern uint8_t * | ||
| 104 | u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, | ||
| 105 | uninorm_t nf, | ||
| 106 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 107 | extern uint16_t * | ||
| 108 | u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, | ||
| 109 | uninorm_t nf, | ||
| 110 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 111 | extern uint32_t * | ||
| 112 | u32_toupper (const uint32_t *s, size_t n, const char *iso639_language, | ||
| 113 | uninorm_t nf, | ||
| 114 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 115 | |||
| 116 | /* Return the lowercase mapping of a string. | ||
| 117 | The nf argument identifies the normalization form to apply after the | ||
| 118 | case-mapping. It can also be NULL, for no normalization. */ | ||
| 119 | extern uint8_t * | ||
| 120 | u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, | ||
| 121 | uninorm_t nf, | ||
| 122 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 123 | extern uint16_t * | ||
| 124 | u16_tolower (const uint16_t *s, size_t n, const char *iso639_language, | ||
| 125 | uninorm_t nf, | ||
| 126 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 127 | extern uint32_t * | ||
| 128 | u32_tolower (const uint32_t *s, size_t n, const char *iso639_language, | ||
| 129 | uninorm_t nf, | ||
| 130 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 131 | |||
| 132 | /* Return the titlecase mapping of a string. | ||
| 133 | The nf argument identifies the normalization form to apply after the | ||
| 134 | case-mapping. It can also be NULL, for no normalization. */ | ||
| 135 | extern uint8_t * | ||
| 136 | u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, | ||
| 137 | uninorm_t nf, | ||
| 138 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 139 | extern uint16_t * | ||
| 140 | u16_totitle (const uint16_t *s, size_t n, const char *iso639_language, | ||
| 141 | uninorm_t nf, | ||
| 142 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 143 | extern uint32_t * | ||
| 144 | u32_totitle (const uint32_t *s, size_t n, const char *iso639_language, | ||
| 145 | uninorm_t nf, | ||
| 146 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 147 | |||
| 148 | /* The case-mapping context given by a prefix string. */ | ||
| 149 | typedef struct casing_prefix_context | ||
| 150 | { | ||
| 151 | /* These fields are private, undocumented. */ | ||
| 152 | uint32_t last_char_except_ignorable; | ||
| 153 | uint32_t last_char_normal_or_above; | ||
| 154 | } | ||
| 155 | casing_prefix_context_t; | ||
| 156 | /* The case-mapping context of the empty prefix string. */ | ||
| 157 | extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empty_prefix_context; | ||
| 158 | /* Return the case-mapping context of a given prefix string. */ | ||
| 159 | extern casing_prefix_context_t | ||
| 160 | u8_casing_prefix_context (const uint8_t *s, size_t n); | ||
| 161 | extern casing_prefix_context_t | ||
| 162 | u16_casing_prefix_context (const uint16_t *s, size_t n); | ||
| 163 | extern casing_prefix_context_t | ||
| 164 | u32_casing_prefix_context (const uint32_t *s, size_t n); | ||
| 165 | /* Return the case-mapping context of the prefix concat(A, S), given the | ||
| 166 | case-mapping context of the prefix A. */ | ||
| 167 | extern casing_prefix_context_t | ||
| 168 | u8_casing_prefixes_context (const uint8_t *s, size_t n, | ||
| 169 | casing_prefix_context_t a_context); | ||
| 170 | extern casing_prefix_context_t | ||
| 171 | u16_casing_prefixes_context (const uint16_t *s, size_t n, | ||
| 172 | casing_prefix_context_t a_context); | ||
| 173 | extern casing_prefix_context_t | ||
| 174 | u32_casing_prefixes_context (const uint32_t *s, size_t n, | ||
| 175 | casing_prefix_context_t a_context); | ||
| 176 | |||
| 177 | /* The case-mapping context given by a suffix string. */ | ||
| 178 | typedef struct casing_suffix_context | ||
| 179 | { | ||
| 180 | /* These fields are private, undocumented. */ | ||
| 181 | uint32_t first_char_except_ignorable; | ||
| 182 | uint32_t bits; | ||
| 183 | } | ||
| 184 | casing_suffix_context_t; | ||
| 185 | /* The case-mapping context of the empty suffix string. */ | ||
| 186 | extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empty_suffix_context; | ||
| 187 | /* Return the case-mapping context of a given suffix string. */ | ||
| 188 | extern casing_suffix_context_t | ||
| 189 | u8_casing_suffix_context (const uint8_t *s, size_t n); | ||
| 190 | extern casing_suffix_context_t | ||
| 191 | u16_casing_suffix_context (const uint16_t *s, size_t n); | ||
| 192 | extern casing_suffix_context_t | ||
| 193 | u32_casing_suffix_context (const uint32_t *s, size_t n); | ||
| 194 | /* Return the case-mapping context of the suffix concat(S, A), given the | ||
| 195 | case-mapping context of the suffix A. */ | ||
| 196 | extern casing_suffix_context_t | ||
| 197 | u8_casing_suffixes_context (const uint8_t *s, size_t n, | ||
| 198 | casing_suffix_context_t a_context); | ||
| 199 | extern casing_suffix_context_t | ||
| 200 | u16_casing_suffixes_context (const uint16_t *s, size_t n, | ||
| 201 | casing_suffix_context_t a_context); | ||
| 202 | extern casing_suffix_context_t | ||
| 203 | u32_casing_suffixes_context (const uint32_t *s, size_t n, | ||
| 204 | casing_suffix_context_t a_context); | ||
| 205 | |||
| 206 | /* Return the uppercase mapping of a string that is surrounded by a prefix | ||
| 207 | and a suffix. */ | ||
| 208 | extern uint8_t * | ||
| 209 | u8_ct_toupper (const uint8_t *s, size_t n, | ||
| 210 | casing_prefix_context_t prefix_context, | ||
| 211 | casing_suffix_context_t suffix_context, | ||
| 212 | const char *iso639_language, | ||
| 213 | uninorm_t nf, | ||
| 214 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 215 | extern uint16_t * | ||
| 216 | u16_ct_toupper (const uint16_t *s, size_t n, | ||
| 217 | casing_prefix_context_t prefix_context, | ||
| 218 | casing_suffix_context_t suffix_context, | ||
| 219 | const char *iso639_language, | ||
| 220 | uninorm_t nf, | ||
| 221 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 222 | extern uint32_t * | ||
| 223 | u32_ct_toupper (const uint32_t *s, size_t n, | ||
| 224 | casing_prefix_context_t prefix_context, | ||
| 225 | casing_suffix_context_t suffix_context, | ||
| 226 | const char *iso639_language, | ||
| 227 | uninorm_t nf, | ||
| 228 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 229 | |||
| 230 | /* Return the lowercase mapping of a string that is surrounded by a prefix | ||
| 231 | and a suffix. */ | ||
| 232 | extern uint8_t * | ||
| 233 | u8_ct_tolower (const uint8_t *s, size_t n, | ||
| 234 | casing_prefix_context_t prefix_context, | ||
| 235 | casing_suffix_context_t suffix_context, | ||
| 236 | const char *iso639_language, | ||
| 237 | uninorm_t nf, | ||
| 238 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 239 | extern uint16_t * | ||
| 240 | u16_ct_tolower (const uint16_t *s, size_t n, | ||
| 241 | casing_prefix_context_t prefix_context, | ||
| 242 | casing_suffix_context_t suffix_context, | ||
| 243 | const char *iso639_language, | ||
| 244 | uninorm_t nf, | ||
| 245 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 246 | extern uint32_t * | ||
| 247 | u32_ct_tolower (const uint32_t *s, size_t n, | ||
| 248 | casing_prefix_context_t prefix_context, | ||
| 249 | casing_suffix_context_t suffix_context, | ||
| 250 | const char *iso639_language, | ||
| 251 | uninorm_t nf, | ||
| 252 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 253 | |||
| 254 | /* Return the titlecase mapping of a string that is surrounded by a prefix | ||
| 255 | and a suffix. */ | ||
| 256 | extern uint8_t * | ||
| 257 | u8_ct_totitle (const uint8_t *s, size_t n, | ||
| 258 | casing_prefix_context_t prefix_context, | ||
| 259 | casing_suffix_context_t suffix_context, | ||
| 260 | const char *iso639_language, | ||
| 261 | uninorm_t nf, | ||
| 262 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 263 | extern uint16_t * | ||
| 264 | u16_ct_totitle (const uint16_t *s, size_t n, | ||
| 265 | casing_prefix_context_t prefix_context, | ||
| 266 | casing_suffix_context_t suffix_context, | ||
| 267 | const char *iso639_language, | ||
| 268 | uninorm_t nf, | ||
| 269 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 270 | extern uint32_t * | ||
| 271 | u32_ct_totitle (const uint32_t *s, size_t n, | ||
| 272 | casing_prefix_context_t prefix_context, | ||
| 273 | casing_suffix_context_t suffix_context, | ||
| 274 | const char *iso639_language, | ||
| 275 | uninorm_t nf, | ||
| 276 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 277 | |||
| 278 | /* Return the case folded string. | ||
| 279 | Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent | ||
| 280 | to comparing S1 and S2 with uN_casecmp(). | ||
| 281 | The nf argument identifies the normalization form to apply after the | ||
| 282 | case-mapping. It can also be NULL, for no normalization. */ | ||
| 283 | extern uint8_t * | ||
| 284 | u8_casefold (const uint8_t *s, size_t n, const char *iso639_language, | ||
| 285 | uninorm_t nf, | ||
| 286 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 287 | extern uint16_t * | ||
| 288 | u16_casefold (const uint16_t *s, size_t n, const char *iso639_language, | ||
| 289 | uninorm_t nf, | ||
| 290 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 291 | extern uint32_t * | ||
| 292 | u32_casefold (const uint32_t *s, size_t n, const char *iso639_language, | ||
| 293 | uninorm_t nf, | ||
| 294 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 295 | /* Likewise, for a string that is surrounded by a prefix and a suffix. */ | ||
| 296 | extern uint8_t * | ||
| 297 | u8_ct_casefold (const uint8_t *s, size_t n, | ||
| 298 | casing_prefix_context_t prefix_context, | ||
| 299 | casing_suffix_context_t suffix_context, | ||
| 300 | const char *iso639_language, | ||
| 301 | uninorm_t nf, | ||
| 302 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 303 | extern uint16_t * | ||
| 304 | u16_ct_casefold (const uint16_t *s, size_t n, | ||
| 305 | casing_prefix_context_t prefix_context, | ||
| 306 | casing_suffix_context_t suffix_context, | ||
| 307 | const char *iso639_language, | ||
| 308 | uninorm_t nf, | ||
| 309 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 310 | extern uint32_t * | ||
| 311 | u32_ct_casefold (const uint32_t *s, size_t n, | ||
| 312 | casing_prefix_context_t prefix_context, | ||
| 313 | casing_suffix_context_t suffix_context, | ||
| 314 | const char *iso639_language, | ||
| 315 | uninorm_t nf, | ||
| 316 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 317 | |||
| 318 | /* Compare S1 and S2, ignoring differences in case and normalization. | ||
| 319 | The nf argument identifies the normalization form to apply after the | ||
| 320 | case-mapping. It can also be NULL, for no normalization. | ||
| 321 | If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and | ||
| 322 | return 0. Upon failure, return -1 with errno set. */ | ||
| 323 | extern int | ||
| 324 | u8_casecmp (const uint8_t *s1, size_t n1, | ||
| 325 | const uint8_t *s2, size_t n2, | ||
| 326 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 327 | extern int | ||
| 328 | u16_casecmp (const uint16_t *s1, size_t n1, | ||
| 329 | const uint16_t *s2, size_t n2, | ||
| 330 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 331 | extern int | ||
| 332 | u32_casecmp (const uint32_t *s1, size_t n1, | ||
| 333 | const uint32_t *s2, size_t n2, | ||
| 334 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 335 | extern int | ||
| 336 | ulc_casecmp (const char *s1, size_t n1, | ||
| 337 | const char *s2, size_t n2, | ||
| 338 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 339 | |||
| 340 | /* Convert the string S of length N to a NUL-terminated byte sequence, in such | ||
| 341 | a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib | ||
| 342 | function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll(). | ||
| 343 | NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */ | ||
| 344 | extern char * | ||
| 345 | u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language, | ||
| 346 | uninorm_t nf, | ||
| 347 | char *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 348 | extern char * | ||
| 349 | u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language, | ||
| 350 | uninorm_t nf, | ||
| 351 | char *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 352 | extern char * | ||
| 353 | u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language, | ||
| 354 | uninorm_t nf, | ||
| 355 | char *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 356 | extern char * | ||
| 357 | ulc_casexfrm (const char *s, size_t n, const char *iso639_language, | ||
| 358 | uninorm_t nf, | ||
| 359 | char *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 360 | |||
| 361 | /* Compare S1 and S2, ignoring differences in case and normalization, using the | ||
| 362 | collation rules of the current locale. | ||
| 363 | The nf argument identifies the normalization form to apply after the | ||
| 364 | case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can also | ||
| 365 | be NULL, for no normalization. | ||
| 366 | If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and | ||
| 367 | return 0. Upon failure, return -1 with errno set. */ | ||
| 368 | extern int | ||
| 369 | u8_casecoll (const uint8_t *s1, size_t n1, | ||
| 370 | const uint8_t *s2, size_t n2, | ||
| 371 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 372 | extern int | ||
| 373 | u16_casecoll (const uint16_t *s1, size_t n1, | ||
| 374 | const uint16_t *s2, size_t n2, | ||
| 375 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 376 | extern int | ||
| 377 | u32_casecoll (const uint32_t *s1, size_t n1, | ||
| 378 | const uint32_t *s2, size_t n2, | ||
| 379 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 380 | extern int | ||
| 381 | ulc_casecoll (const char *s1, size_t n1, | ||
| 382 | const char *s2, size_t n2, | ||
| 383 | const char *iso639_language, uninorm_t nf, int *resultp); | ||
| 384 | |||
| 385 | |||
| 386 | /* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false | ||
| 387 | otherwise, and return 0. Upon failure, return -1 with errno set. */ | ||
| 388 | extern int | ||
| 389 | u8_is_uppercase (const uint8_t *s, size_t n, | ||
| 390 | const char *iso639_language, | ||
| 391 | bool *resultp); | ||
| 392 | extern int | ||
| 393 | u16_is_uppercase (const uint16_t *s, size_t n, | ||
| 394 | const char *iso639_language, | ||
| 395 | bool *resultp); | ||
| 396 | extern int | ||
| 397 | u32_is_uppercase (const uint32_t *s, size_t n, | ||
| 398 | const char *iso639_language, | ||
| 399 | bool *resultp); | ||
| 400 | |||
| 401 | /* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false | ||
| 402 | otherwise, and return 0. Upon failure, return -1 with errno set. */ | ||
| 403 | extern int | ||
| 404 | u8_is_lowercase (const uint8_t *s, size_t n, | ||
| 405 | const char *iso639_language, | ||
| 406 | bool *resultp); | ||
| 407 | extern int | ||
| 408 | u16_is_lowercase (const uint16_t *s, size_t n, | ||
| 409 | const char *iso639_language, | ||
| 410 | bool *resultp); | ||
| 411 | extern int | ||
| 412 | u32_is_lowercase (const uint32_t *s, size_t n, | ||
| 413 | const char *iso639_language, | ||
| 414 | bool *resultp); | ||
| 415 | |||
| 416 | /* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false | ||
| 417 | otherwise, and return 0. Upon failure, return -1 with errno set. */ | ||
| 418 | extern int | ||
| 419 | u8_is_titlecase (const uint8_t *s, size_t n, | ||
| 420 | const char *iso639_language, | ||
| 421 | bool *resultp); | ||
| 422 | extern int | ||
| 423 | u16_is_titlecase (const uint16_t *s, size_t n, | ||
| 424 | const char *iso639_language, | ||
| 425 | bool *resultp); | ||
| 426 | extern int | ||
| 427 | u32_is_titlecase (const uint32_t *s, size_t n, | ||
| 428 | const char *iso639_language, | ||
| 429 | bool *resultp); | ||
| 430 | |||
| 431 | /* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to | ||
| 432 | false otherwise, and return 0. Upon failure, return -1 with errno set. */ | ||
| 433 | extern int | ||
| 434 | u8_is_casefolded (const uint8_t *s, size_t n, | ||
| 435 | const char *iso639_language, | ||
| 436 | bool *resultp); | ||
| 437 | extern int | ||
| 438 | u16_is_casefolded (const uint16_t *s, size_t n, | ||
| 439 | const char *iso639_language, | ||
| 440 | bool *resultp); | ||
| 441 | extern int | ||
| 442 | u32_is_casefolded (const uint32_t *s, size_t n, | ||
| 443 | const char *iso639_language, | ||
| 444 | bool *resultp); | ||
| 445 | |||
| 446 | /* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to | ||
| 447 | either upper case or lower case or title case is not a no-op. | ||
| 448 | Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping, | ||
| 449 | under the lower case mapping, and under the title case mapping; in other | ||
| 450 | words, when NFD(S) consists entirely of caseless characters. | ||
| 451 | Upon failure, return -1 with errno set. */ | ||
| 452 | extern int | ||
| 453 | u8_is_cased (const uint8_t *s, size_t n, | ||
| 454 | const char *iso639_language, | ||
| 455 | bool *resultp); | ||
| 456 | extern int | ||
| 457 | u16_is_cased (const uint16_t *s, size_t n, | ||
| 458 | const char *iso639_language, | ||
| 459 | bool *resultp); | ||
| 460 | extern int | ||
| 461 | u32_is_cased (const uint32_t *s, size_t n, | ||
| 462 | const char *iso639_language, | ||
| 463 | bool *resultp); | ||
| 464 | |||
| 465 | |||
| 466 | /* ========================================================================= */ | ||
| 467 | |||
| 468 | #ifdef __cplusplus | ||
| 469 | } | ||
| 470 | #endif | ||
| 471 | |||
| 472 | #endif /* _UNICASE_H */ | ||
diff --git a/gl/unicase.in.h b/gl/unicase.in.h index c6df04b3..e1615aff 100644 --- a/gl/unicase.in.h +++ b/gl/unicase.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Unicode character case mappings. | 1 | /* Unicode character case mappings. |
| 2 | Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unicase/simple-mapping.h b/gl/unicase/simple-mapping.h index 0c4c75b3..2b3d21d6 100644 --- a/gl/unicase/simple-mapping.h +++ b/gl/unicase/simple-mapping.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Simple case mapping for Unicode characters. | 1 | /* Simple case mapping for Unicode characters. |
| 2 | Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unicase/tolower.c b/gl/unicase/tolower.c index a1c898ef..89676ad6 100644 --- a/gl/unicase/tolower.c +++ b/gl/unicase/tolower.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Lowercase mapping for Unicode characters (locale and context independent). | 1 | /* Lowercase mapping for Unicode characters (locale and context independent). |
| 2 | Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unicase/tolower.h b/gl/unicase/tolower.h index 794f4c0c..f06dacf5 100644 --- a/gl/unicase/tolower.h +++ b/gl/unicase/tolower.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* Simple character mapping of Unicode characters. */ | 2 | /* Simple character mapping of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | { | 27 | { |
| 28 | int level1[2]; | 28 | int level1[2]; |
| 29 | short level2[2 << 9]; | 29 | short level2[2 << 9]; |
| 30 | int level3[36 << 7]; | 30 | int level3[37 << 7]; |
| 31 | } | 31 | } |
| 32 | u_mapping = | 32 | u_mapping = |
| 33 | { | 33 | { |
| @@ -124,7 +124,7 @@ u_mapping = | |||
| 124 | -1, -1, -1, -1, -1, -1, -1, -1, | 124 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 125 | -1, -1, -1, -1, -1, -1, -1, -1, | 125 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 126 | -1, -1, -1, -1, -1, -1, -1, -1, | 126 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 127 | -1, -1, -1, -1, 4352, -1, -1, -1, | 127 | -1, -1, -1, -1, 4352, 4480, -1, -1, |
| 128 | -1, -1, -1, -1, -1, -1, -1, -1, | 128 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 129 | -1, -1, -1, -1, -1, -1, -1, -1, | 129 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 130 | -1, -1, -1, -1, -1, -1, -1, -1, | 130 | -1, -1, -1, -1, -1, -1, -1, -1, |
| @@ -155,7 +155,7 @@ u_mapping = | |||
| 155 | -1, -1, -1, -1, -1, -1, -1, -1, | 155 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 156 | -1, -1, -1, -1, -1, -1, -1, -1, | 156 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 157 | -1, -1, -1, -1, -1, -1, -1, -1, | 157 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 158 | -1, -1, 4480, -1, -1, -1, -1, -1, | 158 | -1, -1, 4608, -1, -1, -1, -1, -1, |
| 159 | -1, -1, -1, -1, -1, -1, -1, -1, | 159 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 160 | -1, -1, -1, -1, -1, -1, -1, -1, | 160 | -1, -1, -1, -1, -1, -1, -1, -1, |
| 161 | -1, -1, -1, -1, -1, -1, -1, -1, | 161 | -1, -1, -1, -1, -1, -1, -1, -1, |
| @@ -572,8 +572,8 @@ u_mapping = | |||
| 572 | -42258, -42282, -42261, 928, 1, 0, 1, 0, | 572 | -42258, -42282, -42261, 928, 1, 0, 1, 0, |
| 573 | 1, 0, 1, 0, 1, 0, 1, 0, | 573 | 1, 0, 1, 0, 1, 0, 1, 0, |
| 574 | 1, 0, 1, 0, -48, -42307, -35384, 1, | 574 | 1, 0, 1, 0, -48, -42307, -35384, 1, |
| 575 | 0, 1, 0, -42343, 1, 0, 0, 0, | 575 | 0, 1, 0, -42343, 1, 0, 1, 0, |
| 576 | 1, 0, 0, 0, 0, 0, 1, 0, | 576 | 1, 0, 1, 0, 1, 0, 1, 0, |
| 577 | 1, 0, 1, 0, -42561, 0, 0, 0, | 577 | 1, 0, 1, 0, -42561, 0, 0, 0, |
| 578 | 0, 0, 0, 0, 0, 0, 0, 0, | 578 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 579 | 0, 0, 0, 0, 0, 0, 0, 0, | 579 | 0, 0, 0, 0, 0, 0, 0, 0, |
| @@ -723,6 +723,22 @@ u_mapping = | |||
| 723 | 0, 0, 0, 0, 0, 0, 0, 0, | 723 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 724 | 0, 0, 0, 0, 0, 0, 0, 0, | 724 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 725 | 0, 0, 0, 0, 0, 0, 0, 0, | 725 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 726 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 727 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 728 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 729 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 730 | 27, 27, 27, 27, 27, 27, 27, 27, | ||
| 731 | 27, 27, 27, 27, 27, 27, 27, 27, | ||
| 732 | 27, 27, 27, 27, 27, 27, 27, 27, | ||
| 733 | 27, 0, 0, 0, 0, 0, 0, 0, | ||
| 734 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 735 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 736 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 737 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 738 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 739 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 740 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 741 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 726 | 34, 34, 34, 34, 34, 34, 34, 34, | 742 | 34, 34, 34, 34, 34, 34, 34, 34, |
| 727 | 34, 34, 34, 34, 34, 34, 34, 34, | 743 | 34, 34, 34, 34, 34, 34, 34, 34, |
| 728 | 34, 34, 34, 34, 34, 34, 34, 34, | 744 | 34, 34, 34, 34, 34, 34, 34, 34, |
diff --git a/gl/unictype.h b/gl/unictype.h deleted file mode 100644 index 78072c2a..00000000 --- a/gl/unictype.h +++ /dev/null | |||
| @@ -1,1148 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Unicode character classification and properties. | ||
| 3 | Copyright (C) 2002, 2005-2025 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #ifndef _UNICTYPE_H | ||
| 19 | #define _UNICTYPE_H | ||
| 20 | |||
| 21 | #include "unitypes.h" | ||
| 22 | |||
| 23 | /* Get bool. */ | ||
| 24 | #include <stdbool.h> | ||
| 25 | |||
| 26 | /* Get size_t. */ | ||
| 27 | #include <stddef.h> | ||
| 28 | |||
| 29 | #if 0 | ||
| 30 | # include <unistring/woe32dll.h> | ||
| 31 | #else | ||
| 32 | # define LIBUNISTRING_DLL_VARIABLE | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef __cplusplus | ||
| 36 | extern "C" { | ||
| 37 | #endif | ||
| 38 | |||
| 39 | /* ========================================================================= */ | ||
| 40 | |||
| 41 | /* Field 1 of Unicode Character Database: Character name. | ||
| 42 | See "uniname.h". */ | ||
| 43 | |||
| 44 | /* ========================================================================= */ | ||
| 45 | |||
| 46 | /* Field 2 of Unicode Character Database: General category. */ | ||
| 47 | |||
| 48 | /* Data type denoting a General category value. This is not just a bitmask, | ||
| 49 | but rather a bitmask and a pointer to the lookup table, so that programs | ||
| 50 | that use only the predefined bitmasks (i.e. don't combine bitmasks with & | ||
| 51 | and |) don't have a link-time dependency towards the big general table. */ | ||
| 52 | typedef struct | ||
| 53 | { | ||
| 54 | uint32_t bitmask : 31; | ||
| 55 | /*bool*/ unsigned int generic : 1; | ||
| 56 | union | ||
| 57 | { | ||
| 58 | const void *table; /* when generic is 0 */ | ||
| 59 | bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */ | ||
| 60 | } lookup; | ||
| 61 | } | ||
| 62 | uc_general_category_t; | ||
| 63 | |||
| 64 | /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html | ||
| 65 | says a 32-bit integer will always suffice to represent them. | ||
| 66 | These bit masks can only be used with the uc_is_general_category_withtable | ||
| 67 | function. */ | ||
| 68 | enum | ||
| 69 | { | ||
| 70 | UC_CATEGORY_MASK_L = 0x0000001f, | ||
| 71 | UC_CATEGORY_MASK_LC = 0x00000007, | ||
| 72 | UC_CATEGORY_MASK_Lu = 0x00000001, | ||
| 73 | UC_CATEGORY_MASK_Ll = 0x00000002, | ||
| 74 | UC_CATEGORY_MASK_Lt = 0x00000004, | ||
| 75 | UC_CATEGORY_MASK_Lm = 0x00000008, | ||
| 76 | UC_CATEGORY_MASK_Lo = 0x00000010, | ||
| 77 | UC_CATEGORY_MASK_M = 0x000000e0, | ||
| 78 | UC_CATEGORY_MASK_Mn = 0x00000020, | ||
| 79 | UC_CATEGORY_MASK_Mc = 0x00000040, | ||
| 80 | UC_CATEGORY_MASK_Me = 0x00000080, | ||
| 81 | UC_CATEGORY_MASK_N = 0x00000700, | ||
| 82 | UC_CATEGORY_MASK_Nd = 0x00000100, | ||
| 83 | UC_CATEGORY_MASK_Nl = 0x00000200, | ||
| 84 | UC_CATEGORY_MASK_No = 0x00000400, | ||
| 85 | UC_CATEGORY_MASK_P = 0x0003f800, | ||
| 86 | UC_CATEGORY_MASK_Pc = 0x00000800, | ||
| 87 | UC_CATEGORY_MASK_Pd = 0x00001000, | ||
| 88 | UC_CATEGORY_MASK_Ps = 0x00002000, | ||
| 89 | UC_CATEGORY_MASK_Pe = 0x00004000, | ||
| 90 | UC_CATEGORY_MASK_Pi = 0x00008000, | ||
| 91 | UC_CATEGORY_MASK_Pf = 0x00010000, | ||
| 92 | UC_CATEGORY_MASK_Po = 0x00020000, | ||
| 93 | UC_CATEGORY_MASK_S = 0x003c0000, | ||
| 94 | UC_CATEGORY_MASK_Sm = 0x00040000, | ||
| 95 | UC_CATEGORY_MASK_Sc = 0x00080000, | ||
| 96 | UC_CATEGORY_MASK_Sk = 0x00100000, | ||
| 97 | UC_CATEGORY_MASK_So = 0x00200000, | ||
| 98 | UC_CATEGORY_MASK_Z = 0x01c00000, | ||
| 99 | UC_CATEGORY_MASK_Zs = 0x00400000, | ||
| 100 | UC_CATEGORY_MASK_Zl = 0x00800000, | ||
| 101 | UC_CATEGORY_MASK_Zp = 0x01000000, | ||
| 102 | UC_CATEGORY_MASK_C = 0x3e000000, | ||
| 103 | UC_CATEGORY_MASK_Cc = 0x02000000, | ||
| 104 | UC_CATEGORY_MASK_Cf = 0x04000000, | ||
| 105 | UC_CATEGORY_MASK_Cs = 0x08000000, | ||
| 106 | UC_CATEGORY_MASK_Co = 0x10000000, | ||
| 107 | UC_CATEGORY_MASK_Cn = 0x20000000 | ||
| 108 | }; | ||
| 109 | |||
| 110 | /* Predefined General category values. */ | ||
| 111 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; | ||
| 112 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC; | ||
| 113 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu; | ||
| 114 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll; | ||
| 115 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt; | ||
| 116 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm; | ||
| 117 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo; | ||
| 118 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; | ||
| 119 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn; | ||
| 120 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc; | ||
| 121 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me; | ||
| 122 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; | ||
| 123 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nd; | ||
| 124 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nl; | ||
| 125 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_No; | ||
| 126 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_P; | ||
| 127 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pc; | ||
| 128 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pd; | ||
| 129 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ps; | ||
| 130 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pe; | ||
| 131 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pi; | ||
| 132 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pf; | ||
| 133 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Po; | ||
| 134 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_S; | ||
| 135 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sm; | ||
| 136 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sc; | ||
| 137 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sk; | ||
| 138 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_So; | ||
| 139 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Z; | ||
| 140 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zs; | ||
| 141 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zl; | ||
| 142 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zp; | ||
| 143 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_C; | ||
| 144 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc; | ||
| 145 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf; | ||
| 146 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs; | ||
| 147 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co; | ||
| 148 | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn; | ||
| 149 | /* Non-public. */ | ||
| 150 | extern const uc_general_category_t _UC_CATEGORY_NONE; | ||
| 151 | |||
| 152 | /* Alias names for predefined General category values. */ | ||
| 153 | #define UC_LETTER UC_CATEGORY_L | ||
| 154 | #define UC_CASED_LETTER UC_CATEGORY_LC | ||
| 155 | #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu | ||
| 156 | #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll | ||
| 157 | #define UC_TITLECASE_LETTER UC_CATEGORY_Lt | ||
| 158 | #define UC_MODIFIER_LETTER UC_CATEGORY_Lm | ||
| 159 | #define UC_OTHER_LETTER UC_CATEGORY_Lo | ||
| 160 | #define UC_MARK UC_CATEGORY_M | ||
| 161 | #define UC_NON_SPACING_MARK UC_CATEGORY_Mn | ||
| 162 | #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc | ||
| 163 | #define UC_ENCLOSING_MARK UC_CATEGORY_Me | ||
| 164 | #define UC_NUMBER UC_CATEGORY_N | ||
| 165 | #define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd | ||
| 166 | #define UC_LETTER_NUMBER UC_CATEGORY_Nl | ||
| 167 | #define UC_OTHER_NUMBER UC_CATEGORY_No | ||
| 168 | #define UC_PUNCTUATION UC_CATEGORY_P | ||
| 169 | #define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc | ||
| 170 | #define UC_DASH_PUNCTUATION UC_CATEGORY_Pd | ||
| 171 | #define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */ | ||
| 172 | #define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */ | ||
| 173 | #define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi | ||
| 174 | #define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf | ||
| 175 | #define UC_OTHER_PUNCTUATION UC_CATEGORY_Po | ||
| 176 | #define UC_SYMBOL UC_CATEGORY_S | ||
| 177 | #define UC_MATH_SYMBOL UC_CATEGORY_Sm | ||
| 178 | #define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc | ||
| 179 | #define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk | ||
| 180 | #define UC_OTHER_SYMBOL UC_CATEGORY_So | ||
| 181 | #define UC_SEPARATOR UC_CATEGORY_Z | ||
| 182 | #define UC_SPACE_SEPARATOR UC_CATEGORY_Zs | ||
| 183 | #define UC_LINE_SEPARATOR UC_CATEGORY_Zl | ||
| 184 | #define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp | ||
| 185 | #define UC_OTHER UC_CATEGORY_C | ||
| 186 | #define UC_CONTROL UC_CATEGORY_Cc | ||
| 187 | #define UC_FORMAT UC_CATEGORY_Cf | ||
| 188 | #define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */ | ||
| 189 | #define UC_PRIVATE_USE UC_CATEGORY_Co | ||
| 190 | #define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */ | ||
| 191 | |||
| 192 | /* Return the union of two general categories. | ||
| 193 | This corresponds to the unions of the two sets of characters. */ | ||
| 194 | extern uc_general_category_t | ||
| 195 | uc_general_category_or (uc_general_category_t category1, | ||
| 196 | uc_general_category_t category2); | ||
| 197 | |||
| 198 | /* Return the intersection of two general categories as bit masks. | ||
| 199 | This *does*not* correspond to the intersection of the two sets of | ||
| 200 | characters. */ | ||
| 201 | extern uc_general_category_t | ||
| 202 | uc_general_category_and (uc_general_category_t category1, | ||
| 203 | uc_general_category_t category2); | ||
| 204 | |||
| 205 | /* Return the intersection of a general category with the complement of a | ||
| 206 | second general category, as bit masks. | ||
| 207 | This *does*not* correspond to the intersection with complement, when | ||
| 208 | viewing the categories as sets of characters. */ | ||
| 209 | extern uc_general_category_t | ||
| 210 | uc_general_category_and_not (uc_general_category_t category1, | ||
| 211 | uc_general_category_t category2); | ||
| 212 | |||
| 213 | /* Return the name of a general category. */ | ||
| 214 | extern const char * | ||
| 215 | uc_general_category_name (uc_general_category_t category) | ||
| 216 | _UC_ATTRIBUTE_PURE; | ||
| 217 | |||
| 218 | /* Return the long name of a general category. */ | ||
| 219 | extern const char * | ||
| 220 | uc_general_category_long_name (uc_general_category_t category) | ||
| 221 | _UC_ATTRIBUTE_PURE; | ||
| 222 | |||
| 223 | /* Return the general category given by name, e.g. "Lu", or by long name, | ||
| 224 | e.g. "Uppercase Letter". */ | ||
| 225 | extern uc_general_category_t | ||
| 226 | uc_general_category_byname (const char *category_name) | ||
| 227 | _UC_ATTRIBUTE_PURE; | ||
| 228 | |||
| 229 | /* Return the general category of a Unicode character. */ | ||
| 230 | extern uc_general_category_t | ||
| 231 | uc_general_category (ucs4_t uc) | ||
| 232 | _UC_ATTRIBUTE_PURE; | ||
| 233 | |||
| 234 | /* Test whether a Unicode character belongs to a given category. | ||
| 235 | The CATEGORY argument can be the combination of several predefined | ||
| 236 | general categories. */ | ||
| 237 | extern bool | ||
| 238 | uc_is_general_category (ucs4_t uc, uc_general_category_t category) | ||
| 239 | _UC_ATTRIBUTE_PURE; | ||
| 240 | /* Likewise. This function uses a big table comprising all categories. */ | ||
| 241 | extern bool | ||
| 242 | uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) | ||
| 243 | _UC_ATTRIBUTE_CONST; | ||
| 244 | |||
| 245 | /* ========================================================================= */ | ||
| 246 | |||
| 247 | /* Field 3 of Unicode Character Database: Canonical combining class. */ | ||
| 248 | |||
| 249 | /* The possible results of uc_combining_class (0..255) are described in | ||
| 250 | UCD.html. The list here is not definitive; more values can be added | ||
| 251 | in future versions. */ | ||
| 252 | enum | ||
| 253 | { | ||
| 254 | UC_CCC_NR = 0, /* Not Reordered */ | ||
| 255 | UC_CCC_OV = 1, /* Overlay */ | ||
| 256 | UC_CCC_NK = 7, /* Nukta */ | ||
| 257 | UC_CCC_KV = 8, /* Kana Voicing */ | ||
| 258 | UC_CCC_VR = 9, /* Virama */ | ||
| 259 | UC_CCC_ATBL = 200, /* Attached Below Left */ | ||
| 260 | UC_CCC_ATB = 202, /* Attached Below */ | ||
| 261 | UC_CCC_ATA = 214, /* Attached Above */ | ||
| 262 | UC_CCC_ATAR = 216, /* Attached Above Right */ | ||
| 263 | UC_CCC_BL = 218, /* Below Left */ | ||
| 264 | UC_CCC_B = 220, /* Below */ | ||
| 265 | UC_CCC_BR = 222, /* Below Right */ | ||
| 266 | UC_CCC_L = 224, /* Left */ | ||
| 267 | UC_CCC_R = 226, /* Right */ | ||
| 268 | UC_CCC_AL = 228, /* Above Left */ | ||
| 269 | UC_CCC_A = 230, /* Above */ | ||
| 270 | UC_CCC_AR = 232, /* Above Right */ | ||
| 271 | UC_CCC_DB = 233, /* Double Below */ | ||
| 272 | UC_CCC_DA = 234, /* Double Above */ | ||
| 273 | UC_CCC_IS = 240 /* Iota Subscript */ | ||
| 274 | }; | ||
| 275 | |||
| 276 | /* Return the canonical combining class of a Unicode character. */ | ||
| 277 | extern int | ||
| 278 | uc_combining_class (ucs4_t uc) | ||
| 279 | _UC_ATTRIBUTE_CONST; | ||
| 280 | |||
| 281 | /* Return the name of a canonical combining class. */ | ||
| 282 | extern const char * | ||
| 283 | uc_combining_class_name (int ccc) | ||
| 284 | _UC_ATTRIBUTE_CONST; | ||
| 285 | |||
| 286 | /* Return the long name of a canonical combining class. */ | ||
| 287 | extern const char * | ||
| 288 | uc_combining_class_long_name (int ccc) | ||
| 289 | _UC_ATTRIBUTE_CONST; | ||
| 290 | |||
| 291 | /* Return the canonical combining class given by name, e.g. "BL", or by long | ||
| 292 | name, e.g. "Below Left". */ | ||
| 293 | extern int | ||
| 294 | uc_combining_class_byname (const char *ccc_name) | ||
| 295 | _UC_ATTRIBUTE_PURE; | ||
| 296 | |||
| 297 | /* ========================================================================= */ | ||
| 298 | |||
| 299 | /* Field 4 of Unicode Character Database: Bidi class. | ||
| 300 | Before Unicode 4.0, this field was called "Bidirectional category". */ | ||
| 301 | |||
| 302 | enum | ||
| 303 | { | ||
| 304 | UC_BIDI_L, /* Left-to-Right */ | ||
| 305 | UC_BIDI_LRE, /* Left-to-Right Embedding */ | ||
| 306 | UC_BIDI_LRO, /* Left-to-Right Override */ | ||
| 307 | UC_BIDI_R, /* Right-to-Left */ | ||
| 308 | UC_BIDI_AL, /* Right-to-Left Arabic */ | ||
| 309 | UC_BIDI_RLE, /* Right-to-Left Embedding */ | ||
| 310 | UC_BIDI_RLO, /* Right-to-Left Override */ | ||
| 311 | UC_BIDI_PDF, /* Pop Directional Format */ | ||
| 312 | UC_BIDI_EN, /* European Number */ | ||
| 313 | UC_BIDI_ES, /* European Number Separator */ | ||
| 314 | UC_BIDI_ET, /* European Number Terminator */ | ||
| 315 | UC_BIDI_AN, /* Arabic Number */ | ||
| 316 | UC_BIDI_CS, /* Common Number Separator */ | ||
| 317 | UC_BIDI_NSM, /* Non-Spacing Mark */ | ||
| 318 | UC_BIDI_BN, /* Boundary Neutral */ | ||
| 319 | UC_BIDI_B, /* Paragraph Separator */ | ||
| 320 | UC_BIDI_S, /* Segment Separator */ | ||
| 321 | UC_BIDI_WS, /* Whitespace */ | ||
| 322 | UC_BIDI_ON, /* Other Neutral */ | ||
| 323 | UC_BIDI_LRI, /* Left-to-Right Isolate */ | ||
| 324 | UC_BIDI_RLI, /* Right-to-Left Isolate */ | ||
| 325 | UC_BIDI_FSI, /* First Strong Isolate */ | ||
| 326 | UC_BIDI_PDI /* Pop Directional Isolate */ | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* Return the name of a bidi class. */ | ||
| 330 | extern const char * | ||
| 331 | uc_bidi_class_name (int bidi_class) | ||
| 332 | _UC_ATTRIBUTE_CONST; | ||
| 333 | /* Same; obsolete function name. */ | ||
| 334 | extern const char * | ||
| 335 | uc_bidi_category_name (int category) | ||
| 336 | _UC_ATTRIBUTE_CONST; | ||
| 337 | |||
| 338 | /* Return the long name of a bidi class. */ | ||
| 339 | extern const char * | ||
| 340 | uc_bidi_class_long_name (int bidi_class) | ||
| 341 | _UC_ATTRIBUTE_CONST; | ||
| 342 | |||
| 343 | /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g. | ||
| 344 | "Left-to-Right Embedding". */ | ||
| 345 | extern int | ||
| 346 | uc_bidi_class_byname (const char *bidi_class_name) | ||
| 347 | _UC_ATTRIBUTE_PURE; | ||
| 348 | /* Same; obsolete function name. */ | ||
| 349 | extern int | ||
| 350 | uc_bidi_category_byname (const char *category_name) | ||
| 351 | _UC_ATTRIBUTE_PURE; | ||
| 352 | |||
| 353 | /* Return the bidi class of a Unicode character. */ | ||
| 354 | extern int | ||
| 355 | uc_bidi_class (ucs4_t uc) | ||
| 356 | _UC_ATTRIBUTE_CONST; | ||
| 357 | /* Same; obsolete function name. */ | ||
| 358 | extern int | ||
| 359 | uc_bidi_category (ucs4_t uc) | ||
| 360 | _UC_ATTRIBUTE_CONST; | ||
| 361 | |||
| 362 | /* Test whether a Unicode character belongs to a given bidi class. */ | ||
| 363 | extern bool | ||
| 364 | uc_is_bidi_class (ucs4_t uc, int bidi_class) | ||
| 365 | _UC_ATTRIBUTE_CONST; | ||
| 366 | /* Same; obsolete function name. */ | ||
| 367 | extern bool | ||
| 368 | uc_is_bidi_category (ucs4_t uc, int category) | ||
| 369 | _UC_ATTRIBUTE_CONST; | ||
| 370 | |||
| 371 | /* ========================================================================= */ | ||
| 372 | |||
| 373 | /* Field 5 of Unicode Character Database: Character decomposition mapping. | ||
| 374 | See "uninorm.h". */ | ||
| 375 | |||
| 376 | /* ========================================================================= */ | ||
| 377 | |||
| 378 | /* Field 6 of Unicode Character Database: Decimal digit value. */ | ||
| 379 | |||
| 380 | /* Return the decimal digit value of a Unicode character. */ | ||
| 381 | extern int | ||
| 382 | uc_decimal_value (ucs4_t uc) | ||
| 383 | _UC_ATTRIBUTE_CONST; | ||
| 384 | |||
| 385 | /* ========================================================================= */ | ||
| 386 | |||
| 387 | /* Field 7 of Unicode Character Database: Digit value. */ | ||
| 388 | |||
| 389 | /* Return the digit value of a Unicode character. */ | ||
| 390 | extern int | ||
| 391 | uc_digit_value (ucs4_t uc) | ||
| 392 | _UC_ATTRIBUTE_CONST; | ||
| 393 | |||
| 394 | /* ========================================================================= */ | ||
| 395 | |||
| 396 | /* Field 8 of Unicode Character Database: Numeric value. */ | ||
| 397 | |||
| 398 | /* Return the numeric value of a Unicode character. */ | ||
| 399 | typedef struct | ||
| 400 | { | ||
| 401 | int numerator; | ||
| 402 | int denominator; | ||
| 403 | } | ||
| 404 | uc_fraction_t; | ||
| 405 | extern uc_fraction_t | ||
| 406 | uc_numeric_value (ucs4_t uc) | ||
| 407 | _UC_ATTRIBUTE_CONST; | ||
| 408 | |||
| 409 | /* ========================================================================= */ | ||
| 410 | |||
| 411 | /* Field 9 of Unicode Character Database: Mirrored. */ | ||
| 412 | |||
| 413 | /* Return the mirrored character of a Unicode character UC in *PUC. */ | ||
| 414 | extern bool | ||
| 415 | uc_mirror_char (ucs4_t uc, ucs4_t *puc); | ||
| 416 | |||
| 417 | /* ========================================================================= */ | ||
| 418 | |||
| 419 | /* Field 10 of Unicode Character Database: Unicode 1.0 Name. | ||
| 420 | Not available in this library. */ | ||
| 421 | |||
| 422 | /* ========================================================================= */ | ||
| 423 | |||
| 424 | /* Field 11 of Unicode Character Database: ISO 10646 comment. | ||
| 425 | Not available in this library. */ | ||
| 426 | |||
| 427 | /* ========================================================================= */ | ||
| 428 | |||
| 429 | /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, | ||
| 430 | lowercase mapping, titlecase mapping. See "unicase.h". */ | ||
| 431 | |||
| 432 | /* ========================================================================= */ | ||
| 433 | |||
| 434 | /* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */ | ||
| 435 | |||
| 436 | /* Possible joining types. */ | ||
| 437 | enum | ||
| 438 | { | ||
| 439 | UC_JOINING_TYPE_U, /* Non_Joining */ | ||
| 440 | UC_JOINING_TYPE_T, /* Transparent */ | ||
| 441 | UC_JOINING_TYPE_C, /* Join_Causing */ | ||
| 442 | UC_JOINING_TYPE_L, /* Left_Joining */ | ||
| 443 | UC_JOINING_TYPE_R, /* Right_Joining */ | ||
| 444 | UC_JOINING_TYPE_D /* Dual_Joining */ | ||
| 445 | }; | ||
| 446 | |||
| 447 | /* Return the name of a joining type. */ | ||
| 448 | extern const char * | ||
| 449 | uc_joining_type_name (int joining_type) | ||
| 450 | _UC_ATTRIBUTE_CONST; | ||
| 451 | |||
| 452 | /* Return the long name of a joining type. */ | ||
| 453 | extern const char * | ||
| 454 | uc_joining_type_long_name (int joining_type) | ||
| 455 | _UC_ATTRIBUTE_CONST; | ||
| 456 | |||
| 457 | /* Return the joining type given by name, e.g. "D", or by long name, e.g. | ||
| 458 | "Dual Joining". */ | ||
| 459 | extern int | ||
| 460 | uc_joining_type_byname (const char *joining_type_name) | ||
| 461 | _UC_ATTRIBUTE_PURE; | ||
| 462 | |||
| 463 | /* Return the joining type of a Unicode character. */ | ||
| 464 | extern int | ||
| 465 | uc_joining_type (ucs4_t uc) | ||
| 466 | _UC_ATTRIBUTE_CONST; | ||
| 467 | |||
| 468 | /* ========================================================================= */ | ||
| 469 | |||
| 470 | /* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */ | ||
| 471 | |||
| 472 | /* Possible joining groups. | ||
| 473 | This enumeration may be extended in the future. */ | ||
| 474 | enum | ||
| 475 | { | ||
| 476 | UC_JOINING_GROUP_NONE, /* No_Joining_Group */ | ||
| 477 | UC_JOINING_GROUP_AIN, /* Ain */ | ||
| 478 | UC_JOINING_GROUP_ALAPH, /* Alaph */ | ||
| 479 | UC_JOINING_GROUP_ALEF, /* Alef */ | ||
| 480 | UC_JOINING_GROUP_BEH, /* Beh */ | ||
| 481 | UC_JOINING_GROUP_BETH, /* Beth */ | ||
| 482 | UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ | ||
| 483 | UC_JOINING_GROUP_DAL, /* Dal */ | ||
| 484 | UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ | ||
| 485 | UC_JOINING_GROUP_E, /* E */ | ||
| 486 | UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ | ||
| 487 | UC_JOINING_GROUP_FE, /* Fe */ | ||
| 488 | UC_JOINING_GROUP_FEH, /* Feh */ | ||
| 489 | UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ | ||
| 490 | UC_JOINING_GROUP_GAF, /* Gaf */ | ||
| 491 | UC_JOINING_GROUP_GAMAL, /* Gamal */ | ||
| 492 | UC_JOINING_GROUP_HAH, /* Hah */ | ||
| 493 | UC_JOINING_GROUP_HE, /* He */ | ||
| 494 | UC_JOINING_GROUP_HEH, /* Heh */ | ||
| 495 | UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ | ||
| 496 | UC_JOINING_GROUP_HETH, /* Heth */ | ||
| 497 | UC_JOINING_GROUP_KAF, /* Kaf */ | ||
| 498 | UC_JOINING_GROUP_KAPH, /* Kaph */ | ||
| 499 | UC_JOINING_GROUP_KHAPH, /* Khaph */ | ||
| 500 | UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ | ||
| 501 | UC_JOINING_GROUP_LAM, /* Lam */ | ||
| 502 | UC_JOINING_GROUP_LAMADH, /* Lamadh */ | ||
| 503 | UC_JOINING_GROUP_MEEM, /* Meem */ | ||
| 504 | UC_JOINING_GROUP_MIM, /* Mim */ | ||
| 505 | UC_JOINING_GROUP_NOON, /* Noon */ | ||
| 506 | UC_JOINING_GROUP_NUN, /* Nun */ | ||
| 507 | UC_JOINING_GROUP_NYA, /* Nya */ | ||
| 508 | UC_JOINING_GROUP_PE, /* Pe */ | ||
| 509 | UC_JOINING_GROUP_QAF, /* Qaf */ | ||
| 510 | UC_JOINING_GROUP_QAPH, /* Qaph */ | ||
| 511 | UC_JOINING_GROUP_REH, /* Reh */ | ||
| 512 | UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ | ||
| 513 | UC_JOINING_GROUP_SAD, /* Sad */ | ||
| 514 | UC_JOINING_GROUP_SADHE, /* Sadhe */ | ||
| 515 | UC_JOINING_GROUP_SEEN, /* Seen */ | ||
| 516 | UC_JOINING_GROUP_SEMKATH, /* Semkath */ | ||
| 517 | UC_JOINING_GROUP_SHIN, /* Shin */ | ||
| 518 | UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ | ||
| 519 | UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ | ||
| 520 | UC_JOINING_GROUP_TAH, /* Tah */ | ||
| 521 | UC_JOINING_GROUP_TAW, /* Taw */ | ||
| 522 | UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ | ||
| 523 | UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ | ||
| 524 | UC_JOINING_GROUP_TETH, /* Teth */ | ||
| 525 | UC_JOINING_GROUP_WAW, /* Waw */ | ||
| 526 | UC_JOINING_GROUP_YEH, /* Yeh */ | ||
| 527 | UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ | ||
| 528 | UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ | ||
| 529 | UC_JOINING_GROUP_YUDH, /* Yudh */ | ||
| 530 | UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ | ||
| 531 | UC_JOINING_GROUP_ZAIN, /* Zain */ | ||
| 532 | UC_JOINING_GROUP_ZHAIN, /* Zhain */ | ||
| 533 | UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ | ||
| 534 | UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ | ||
| 535 | UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ | ||
| 536 | UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ | ||
| 537 | UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ | ||
| 538 | UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ | ||
| 539 | UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ | ||
| 540 | UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ | ||
| 541 | UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ | ||
| 542 | UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ | ||
| 543 | UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ | ||
| 544 | UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ | ||
| 545 | UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ | ||
| 546 | UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ | ||
| 547 | UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ | ||
| 548 | UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ | ||
| 549 | UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ | ||
| 550 | UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ | ||
| 551 | UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ | ||
| 552 | UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ | ||
| 553 | UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ | ||
| 554 | UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ | ||
| 555 | UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ | ||
| 556 | UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ | ||
| 557 | UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ | ||
| 558 | UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ | ||
| 559 | UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ | ||
| 560 | UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ | ||
| 561 | UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ | ||
| 562 | UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ | ||
| 563 | UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ | ||
| 564 | UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */ | ||
| 565 | UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */ | ||
| 566 | UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */ | ||
| 567 | UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */ | ||
| 568 | UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */ | ||
| 569 | UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */ | ||
| 570 | UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */ | ||
| 571 | UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */ | ||
| 572 | UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */ | ||
| 573 | UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */ | ||
| 574 | UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */ | ||
| 575 | UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */ | ||
| 576 | UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */ | ||
| 577 | UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ | ||
| 578 | UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ | ||
| 579 | UC_JOINING_GROUP_VERTICAL_TAIL, /* Vertical_Tail */ | ||
| 580 | UC_JOINING_GROUP_KASHMIRI_YEH, /* Kashmiri_Yeh */ | ||
| 581 | UC_JOINING_GROUP_THIN_NOON /* Thin_Noon */ | ||
| 582 | }; | ||
| 583 | |||
| 584 | /* Return the name of a joining group. */ | ||
| 585 | extern const char * | ||
| 586 | uc_joining_group_name (int joining_group) | ||
| 587 | _UC_ATTRIBUTE_CONST; | ||
| 588 | |||
| 589 | /* Return the joining group given by name, e.g. "Teh_Marbuta". */ | ||
| 590 | extern int | ||
| 591 | uc_joining_group_byname (const char *joining_group_name) | ||
| 592 | _UC_ATTRIBUTE_PURE; | ||
| 593 | |||
| 594 | /* Return the joining group of a Unicode character. */ | ||
| 595 | extern int | ||
| 596 | uc_joining_group (ucs4_t uc) | ||
| 597 | _UC_ATTRIBUTE_CONST; | ||
| 598 | |||
| 599 | /* ========================================================================= */ | ||
| 600 | |||
| 601 | /* Common API for properties. */ | ||
| 602 | |||
| 603 | /* Data type denoting a property. This is not just a number, but rather a | ||
| 604 | pointer to the test functions, so that programs that use only few of the | ||
| 605 | properties don't have a link-time dependency towards all the tables. */ | ||
| 606 | typedef struct | ||
| 607 | { | ||
| 608 | bool (*test_fn) (ucs4_t uc); | ||
| 609 | } | ||
| 610 | uc_property_t; | ||
| 611 | |||
| 612 | /* Predefined properties. */ | ||
| 613 | /* General. */ | ||
| 614 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_WHITE_SPACE; | ||
| 615 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ALPHABETIC; | ||
| 616 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; | ||
| 617 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; | ||
| 618 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; | ||
| 619 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; | ||
| 620 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEPRECATED; | ||
| 621 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; | ||
| 622 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; | ||
| 623 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_USE; | ||
| 624 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; | ||
| 625 | /* Case. */ | ||
| 626 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; | ||
| 627 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; | ||
| 628 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; | ||
| 629 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; | ||
| 630 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; | ||
| 631 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; | ||
| 632 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNORABLE; | ||
| 633 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; | ||
| 634 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; | ||
| 635 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; | ||
| 636 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; | ||
| 637 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; | ||
| 638 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTED; | ||
| 639 | /* Identifiers. */ | ||
| 640 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; | ||
| 641 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_START; | ||
| 642 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINUE; | ||
| 643 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; | ||
| 644 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; | ||
| 645 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTINUE; | ||
| 646 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_START; | ||
| 647 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_CONTINUE; | ||
| 648 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; | ||
| 649 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; | ||
| 650 | /* Shaping and rendering. */ | ||
| 651 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_JOIN_CONTROL; | ||
| 652 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_BASE; | ||
| 653 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; | ||
| 654 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; | ||
| 655 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_LINK; | ||
| 656 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK; | ||
| 657 | /* Bidi. */ | ||
| 658 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_CONTROL; | ||
| 659 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; | ||
| 660 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; | ||
| 661 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; | ||
| 662 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; | ||
| 663 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; | ||
| 664 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; | ||
| 665 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; | ||
| 666 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; | ||
| 667 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; | ||
| 668 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; | ||
| 669 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; | ||
| 670 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; | ||
| 671 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; | ||
| 672 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_PDF; | ||
| 673 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; | ||
| 674 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; | ||
| 675 | /* Numeric. */ | ||
| 676 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HEX_DIGIT; | ||
| 677 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; | ||
| 678 | /* CJK. */ | ||
| 679 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDEOGRAPHIC; | ||
| 680 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; | ||
| 681 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_RADICAL; | ||
| 682 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_UNARY_OPERATOR; | ||
| 683 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; | ||
| 684 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; | ||
| 685 | /* Emoji. */ | ||
| 686 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI; | ||
| 687 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION; | ||
| 688 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER; | ||
| 689 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE; | ||
| 690 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_COMPONENT; | ||
| 691 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC; | ||
| 692 | /* Misc. */ | ||
| 693 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ZERO_WIDTH; | ||
| 694 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SPACE; | ||
| 695 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NON_BREAK; | ||
| 696 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ISO_CONTROL; | ||
| 697 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_FORMAT_CONTROL; | ||
| 698 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PREPENDED_CONCATENATION_MARK; | ||
| 699 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DASH; | ||
| 700 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HYPHEN; | ||
| 701 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PUNCTUATION; | ||
| 702 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LINE_SEPARATOR; | ||
| 703 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; | ||
| 704 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_QUOTATION_MARK; | ||
| 705 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; | ||
| 706 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; | ||
| 707 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; | ||
| 708 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MATH; | ||
| 709 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_MATH; | ||
| 710 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; | ||
| 711 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; | ||
| 712 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMBINING; | ||
| 713 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMPOSITE; | ||
| 714 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; | ||
| 715 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NUMERIC; | ||
| 716 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DIACRITIC; | ||
| 717 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDER; | ||
| 718 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; | ||
| 719 | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR; | ||
| 720 | |||
| 721 | /* Return the property given by name, e.g. "White space". */ | ||
| 722 | extern uc_property_t | ||
| 723 | uc_property_byname (const char *property_name); | ||
| 724 | |||
| 725 | /* Test whether a property is valid. */ | ||
| 726 | #define uc_property_is_valid(property) ((property).test_fn != NULL) | ||
| 727 | |||
| 728 | /* Test whether a Unicode character has a given property. */ | ||
| 729 | extern bool | ||
| 730 | uc_is_property (ucs4_t uc, uc_property_t property); | ||
| 731 | extern bool uc_is_property_white_space (ucs4_t uc) | ||
| 732 | _UC_ATTRIBUTE_CONST; | ||
| 733 | extern bool uc_is_property_alphabetic (ucs4_t uc) | ||
| 734 | _UC_ATTRIBUTE_CONST; | ||
| 735 | extern bool uc_is_property_other_alphabetic (ucs4_t uc) | ||
| 736 | _UC_ATTRIBUTE_CONST; | ||
| 737 | extern bool uc_is_property_not_a_character (ucs4_t uc) | ||
| 738 | _UC_ATTRIBUTE_CONST; | ||
| 739 | extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc) | ||
| 740 | _UC_ATTRIBUTE_CONST; | ||
| 741 | extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc) | ||
| 742 | _UC_ATTRIBUTE_CONST; | ||
| 743 | extern bool uc_is_property_deprecated (ucs4_t uc) | ||
| 744 | _UC_ATTRIBUTE_CONST; | ||
| 745 | extern bool uc_is_property_logical_order_exception (ucs4_t uc) | ||
| 746 | _UC_ATTRIBUTE_CONST; | ||
| 747 | extern bool uc_is_property_variation_selector (ucs4_t uc) | ||
| 748 | _UC_ATTRIBUTE_CONST; | ||
| 749 | extern bool uc_is_property_private_use (ucs4_t uc) | ||
| 750 | _UC_ATTRIBUTE_CONST; | ||
| 751 | extern bool uc_is_property_unassigned_code_value (ucs4_t uc) | ||
| 752 | _UC_ATTRIBUTE_CONST; | ||
| 753 | extern bool uc_is_property_uppercase (ucs4_t uc) | ||
| 754 | _UC_ATTRIBUTE_CONST; | ||
| 755 | extern bool uc_is_property_other_uppercase (ucs4_t uc) | ||
| 756 | _UC_ATTRIBUTE_CONST; | ||
| 757 | extern bool uc_is_property_lowercase (ucs4_t uc) | ||
| 758 | _UC_ATTRIBUTE_CONST; | ||
| 759 | extern bool uc_is_property_other_lowercase (ucs4_t uc) | ||
| 760 | _UC_ATTRIBUTE_CONST; | ||
| 761 | extern bool uc_is_property_titlecase (ucs4_t uc) | ||
| 762 | _UC_ATTRIBUTE_CONST; | ||
| 763 | extern bool uc_is_property_cased (ucs4_t uc) | ||
| 764 | _UC_ATTRIBUTE_CONST; | ||
| 765 | extern bool uc_is_property_case_ignorable (ucs4_t uc) | ||
| 766 | _UC_ATTRIBUTE_CONST; | ||
| 767 | extern bool uc_is_property_changes_when_lowercased (ucs4_t uc) | ||
| 768 | _UC_ATTRIBUTE_CONST; | ||
| 769 | extern bool uc_is_property_changes_when_uppercased (ucs4_t uc) | ||
| 770 | _UC_ATTRIBUTE_CONST; | ||
| 771 | extern bool uc_is_property_changes_when_titlecased (ucs4_t uc) | ||
| 772 | _UC_ATTRIBUTE_CONST; | ||
| 773 | extern bool uc_is_property_changes_when_casefolded (ucs4_t uc) | ||
| 774 | _UC_ATTRIBUTE_CONST; | ||
| 775 | extern bool uc_is_property_changes_when_casemapped (ucs4_t uc) | ||
| 776 | _UC_ATTRIBUTE_CONST; | ||
| 777 | extern bool uc_is_property_soft_dotted (ucs4_t uc) | ||
| 778 | _UC_ATTRIBUTE_CONST; | ||
| 779 | extern bool uc_is_property_id_start (ucs4_t uc) | ||
| 780 | _UC_ATTRIBUTE_CONST; | ||
| 781 | extern bool uc_is_property_other_id_start (ucs4_t uc) | ||
| 782 | _UC_ATTRIBUTE_CONST; | ||
| 783 | extern bool uc_is_property_id_continue (ucs4_t uc) | ||
| 784 | _UC_ATTRIBUTE_CONST; | ||
| 785 | extern bool uc_is_property_other_id_continue (ucs4_t uc) | ||
| 786 | _UC_ATTRIBUTE_CONST; | ||
| 787 | extern bool uc_is_property_xid_start (ucs4_t uc) | ||
| 788 | _UC_ATTRIBUTE_CONST; | ||
| 789 | extern bool uc_is_property_xid_continue (ucs4_t uc) | ||
| 790 | _UC_ATTRIBUTE_CONST; | ||
| 791 | extern bool uc_is_property_id_compat_math_start (ucs4_t uc) | ||
| 792 | _UC_ATTRIBUTE_CONST; | ||
| 793 | extern bool uc_is_property_id_compat_math_continue (ucs4_t uc) | ||
| 794 | _UC_ATTRIBUTE_CONST; | ||
| 795 | extern bool uc_is_property_pattern_white_space (ucs4_t uc) | ||
| 796 | _UC_ATTRIBUTE_CONST; | ||
| 797 | extern bool uc_is_property_pattern_syntax (ucs4_t uc) | ||
| 798 | _UC_ATTRIBUTE_CONST; | ||
| 799 | extern bool uc_is_property_join_control (ucs4_t uc) | ||
| 800 | _UC_ATTRIBUTE_CONST; | ||
| 801 | extern bool uc_is_property_grapheme_base (ucs4_t uc) | ||
| 802 | _UC_ATTRIBUTE_CONST; | ||
| 803 | extern bool uc_is_property_grapheme_extend (ucs4_t uc) | ||
| 804 | _UC_ATTRIBUTE_CONST; | ||
| 805 | extern bool uc_is_property_other_grapheme_extend (ucs4_t uc) | ||
| 806 | _UC_ATTRIBUTE_CONST; | ||
| 807 | extern bool uc_is_property_grapheme_link (ucs4_t uc) | ||
| 808 | _UC_ATTRIBUTE_CONST; | ||
| 809 | extern bool uc_is_property_modifier_combining_mark (ucs4_t uc) | ||
| 810 | _UC_ATTRIBUTE_CONST; | ||
| 811 | extern bool uc_is_property_bidi_control (ucs4_t uc) | ||
| 812 | _UC_ATTRIBUTE_CONST; | ||
| 813 | extern bool uc_is_property_bidi_left_to_right (ucs4_t uc) | ||
| 814 | _UC_ATTRIBUTE_CONST; | ||
| 815 | extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc) | ||
| 816 | _UC_ATTRIBUTE_CONST; | ||
| 817 | extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc) | ||
| 818 | _UC_ATTRIBUTE_CONST; | ||
| 819 | extern bool uc_is_property_bidi_european_digit (ucs4_t uc) | ||
| 820 | _UC_ATTRIBUTE_CONST; | ||
| 821 | extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc) | ||
| 822 | _UC_ATTRIBUTE_CONST; | ||
| 823 | extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc) | ||
| 824 | _UC_ATTRIBUTE_CONST; | ||
| 825 | extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc) | ||
| 826 | _UC_ATTRIBUTE_CONST; | ||
| 827 | extern bool uc_is_property_bidi_common_separator (ucs4_t uc) | ||
| 828 | _UC_ATTRIBUTE_CONST; | ||
| 829 | extern bool uc_is_property_bidi_block_separator (ucs4_t uc) | ||
| 830 | _UC_ATTRIBUTE_CONST; | ||
| 831 | extern bool uc_is_property_bidi_segment_separator (ucs4_t uc) | ||
| 832 | _UC_ATTRIBUTE_CONST; | ||
| 833 | extern bool uc_is_property_bidi_whitespace (ucs4_t uc) | ||
| 834 | _UC_ATTRIBUTE_CONST; | ||
| 835 | extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc) | ||
| 836 | _UC_ATTRIBUTE_CONST; | ||
| 837 | extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc) | ||
| 838 | _UC_ATTRIBUTE_CONST; | ||
| 839 | extern bool uc_is_property_bidi_pdf (ucs4_t uc) | ||
| 840 | _UC_ATTRIBUTE_CONST; | ||
| 841 | extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc) | ||
| 842 | _UC_ATTRIBUTE_CONST; | ||
| 843 | extern bool uc_is_property_bidi_other_neutral (ucs4_t uc) | ||
| 844 | _UC_ATTRIBUTE_CONST; | ||
| 845 | extern bool uc_is_property_hex_digit (ucs4_t uc) | ||
| 846 | _UC_ATTRIBUTE_CONST; | ||
| 847 | extern bool uc_is_property_ascii_hex_digit (ucs4_t uc) | ||
| 848 | _UC_ATTRIBUTE_CONST; | ||
| 849 | extern bool uc_is_property_ideographic (ucs4_t uc) | ||
| 850 | _UC_ATTRIBUTE_CONST; | ||
| 851 | extern bool uc_is_property_unified_ideograph (ucs4_t uc) | ||
| 852 | _UC_ATTRIBUTE_CONST; | ||
| 853 | extern bool uc_is_property_radical (ucs4_t uc) | ||
| 854 | _UC_ATTRIBUTE_CONST; | ||
| 855 | extern bool uc_is_property_ids_unary_operator (ucs4_t uc) | ||
| 856 | _UC_ATTRIBUTE_CONST; | ||
| 857 | extern bool uc_is_property_ids_binary_operator (ucs4_t uc) | ||
| 858 | _UC_ATTRIBUTE_CONST; | ||
| 859 | extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) | ||
| 860 | _UC_ATTRIBUTE_CONST; | ||
| 861 | extern bool uc_is_property_emoji (ucs4_t uc) | ||
| 862 | _UC_ATTRIBUTE_CONST; | ||
| 863 | extern bool uc_is_property_emoji_presentation (ucs4_t uc) | ||
| 864 | _UC_ATTRIBUTE_CONST; | ||
| 865 | extern bool uc_is_property_emoji_modifier (ucs4_t uc) | ||
| 866 | _UC_ATTRIBUTE_CONST; | ||
| 867 | extern bool uc_is_property_emoji_modifier_base (ucs4_t uc) | ||
| 868 | _UC_ATTRIBUTE_CONST; | ||
| 869 | extern bool uc_is_property_emoji_component (ucs4_t uc) | ||
| 870 | _UC_ATTRIBUTE_CONST; | ||
| 871 | extern bool uc_is_property_extended_pictographic (ucs4_t uc) | ||
| 872 | _UC_ATTRIBUTE_CONST; | ||
| 873 | extern bool uc_is_property_zero_width (ucs4_t uc) | ||
| 874 | _UC_ATTRIBUTE_CONST; | ||
| 875 | extern bool uc_is_property_space (ucs4_t uc) | ||
| 876 | _UC_ATTRIBUTE_CONST; | ||
| 877 | extern bool uc_is_property_non_break (ucs4_t uc) | ||
| 878 | _UC_ATTRIBUTE_CONST; | ||
| 879 | extern bool uc_is_property_iso_control (ucs4_t uc) | ||
| 880 | _UC_ATTRIBUTE_CONST; | ||
| 881 | extern bool uc_is_property_format_control (ucs4_t uc) | ||
| 882 | _UC_ATTRIBUTE_CONST; | ||
| 883 | extern bool uc_is_property_prepended_concatenation_mark (ucs4_t uc) | ||
| 884 | _UC_ATTRIBUTE_CONST; | ||
| 885 | extern bool uc_is_property_dash (ucs4_t uc) | ||
| 886 | _UC_ATTRIBUTE_CONST; | ||
| 887 | extern bool uc_is_property_hyphen (ucs4_t uc) | ||
| 888 | _UC_ATTRIBUTE_CONST; | ||
| 889 | extern bool uc_is_property_punctuation (ucs4_t uc) | ||
| 890 | _UC_ATTRIBUTE_CONST; | ||
| 891 | extern bool uc_is_property_line_separator (ucs4_t uc) | ||
| 892 | _UC_ATTRIBUTE_CONST; | ||
| 893 | extern bool uc_is_property_paragraph_separator (ucs4_t uc) | ||
| 894 | _UC_ATTRIBUTE_CONST; | ||
| 895 | extern bool uc_is_property_quotation_mark (ucs4_t uc) | ||
| 896 | _UC_ATTRIBUTE_CONST; | ||
| 897 | extern bool uc_is_property_sentence_terminal (ucs4_t uc) | ||
| 898 | _UC_ATTRIBUTE_CONST; | ||
| 899 | extern bool uc_is_property_terminal_punctuation (ucs4_t uc) | ||
| 900 | _UC_ATTRIBUTE_CONST; | ||
| 901 | extern bool uc_is_property_currency_symbol (ucs4_t uc) | ||
| 902 | _UC_ATTRIBUTE_CONST; | ||
| 903 | extern bool uc_is_property_math (ucs4_t uc) | ||
| 904 | _UC_ATTRIBUTE_CONST; | ||
| 905 | extern bool uc_is_property_other_math (ucs4_t uc) | ||
| 906 | _UC_ATTRIBUTE_CONST; | ||
| 907 | extern bool uc_is_property_paired_punctuation (ucs4_t uc) | ||
| 908 | _UC_ATTRIBUTE_CONST; | ||
| 909 | extern bool uc_is_property_left_of_pair (ucs4_t uc) | ||
| 910 | _UC_ATTRIBUTE_CONST; | ||
| 911 | extern bool uc_is_property_combining (ucs4_t uc) | ||
| 912 | _UC_ATTRIBUTE_CONST; | ||
| 913 | extern bool uc_is_property_composite (ucs4_t uc) | ||
| 914 | _UC_ATTRIBUTE_CONST; | ||
| 915 | extern bool uc_is_property_decimal_digit (ucs4_t uc) | ||
| 916 | _UC_ATTRIBUTE_CONST; | ||
| 917 | extern bool uc_is_property_numeric (ucs4_t uc) | ||
| 918 | _UC_ATTRIBUTE_CONST; | ||
| 919 | extern bool uc_is_property_diacritic (ucs4_t uc) | ||
| 920 | _UC_ATTRIBUTE_CONST; | ||
| 921 | extern bool uc_is_property_extender (ucs4_t uc) | ||
| 922 | _UC_ATTRIBUTE_CONST; | ||
| 923 | extern bool uc_is_property_ignorable_control (ucs4_t uc) | ||
| 924 | _UC_ATTRIBUTE_CONST; | ||
| 925 | extern bool uc_is_property_regional_indicator (ucs4_t uc) | ||
| 926 | _UC_ATTRIBUTE_CONST; | ||
| 927 | |||
| 928 | /* ========================================================================= */ | ||
| 929 | |||
| 930 | /* Other attributes. */ | ||
| 931 | |||
| 932 | /* ------------------------------------------------------------------------- */ | ||
| 933 | |||
| 934 | /* Indic_Conjunct_Break (InCB): from the file DerivedCoreProperties.txt | ||
| 935 | in the Unicode Character Database. */ | ||
| 936 | |||
| 937 | /* Possible values of the Indic_Conjunct_Break attribute. | ||
| 938 | This enumeration may be extended in the future. */ | ||
| 939 | enum | ||
| 940 | { | ||
| 941 | UC_INDIC_CONJUNCT_BREAK_NONE, /* None */ | ||
| 942 | UC_INDIC_CONJUNCT_BREAK_CONSONANT, /* Consonant */ | ||
| 943 | UC_INDIC_CONJUNCT_BREAK_LINKER, /* Linker */ | ||
| 944 | UC_INDIC_CONJUNCT_BREAK_EXTEND /* Extend */ | ||
| 945 | }; | ||
| 946 | |||
| 947 | /* Return the name of an Indic_Conjunct_Break value. */ | ||
| 948 | extern const char * | ||
| 949 | uc_indic_conjunct_break_name (int indic_conjunct_break) | ||
| 950 | _UC_ATTRIBUTE_CONST; | ||
| 951 | |||
| 952 | /* Return the Indic_Conjunct_Break value given by name, e.g. "Consonant". */ | ||
| 953 | extern int | ||
| 954 | uc_indic_conjunct_break_byname (const char *indic_conjunct_break_name) | ||
| 955 | _UC_ATTRIBUTE_PURE; | ||
| 956 | |||
| 957 | /* Return the Indic_Conjunct_Break attribute of a Unicode character. */ | ||
| 958 | extern int | ||
| 959 | uc_indic_conjunct_break (ucs4_t uc) | ||
| 960 | _UC_ATTRIBUTE_CONST; | ||
| 961 | |||
| 962 | /* ========================================================================= */ | ||
| 963 | |||
| 964 | /* Subdivision of the Unicode characters into scripts. */ | ||
| 965 | |||
| 966 | typedef struct | ||
| 967 | { | ||
| 968 | unsigned int code : 21; | ||
| 969 | unsigned int start : 1; | ||
| 970 | unsigned int end : 1; | ||
| 971 | } | ||
| 972 | uc_interval_t; | ||
| 973 | typedef struct | ||
| 974 | { | ||
| 975 | unsigned int nintervals; | ||
| 976 | const uc_interval_t *intervals; | ||
| 977 | const char *name; | ||
| 978 | } | ||
| 979 | uc_script_t; | ||
| 980 | |||
| 981 | /* Return the script of a Unicode character. */ | ||
| 982 | extern const uc_script_t * | ||
| 983 | uc_script (ucs4_t uc) | ||
| 984 | _UC_ATTRIBUTE_CONST; | ||
| 985 | |||
| 986 | /* Return the script given by name, e.g. "HAN". */ | ||
| 987 | extern const uc_script_t * | ||
| 988 | uc_script_byname (const char *script_name) | ||
| 989 | _UC_ATTRIBUTE_PURE; | ||
| 990 | |||
| 991 | /* Test whether a Unicode character belongs to a given script. */ | ||
| 992 | extern bool | ||
| 993 | uc_is_script (ucs4_t uc, const uc_script_t *script) | ||
| 994 | _UC_ATTRIBUTE_PURE; | ||
| 995 | |||
| 996 | /* Get the list of all scripts. */ | ||
| 997 | extern void | ||
| 998 | uc_all_scripts (const uc_script_t **scripts, size_t *count); | ||
| 999 | |||
| 1000 | /* ========================================================================= */ | ||
| 1001 | |||
| 1002 | /* Subdivision of the Unicode character range into blocks. */ | ||
| 1003 | |||
| 1004 | typedef struct | ||
| 1005 | { | ||
| 1006 | ucs4_t start; | ||
| 1007 | ucs4_t end; | ||
| 1008 | const char *name; | ||
| 1009 | } | ||
| 1010 | uc_block_t; | ||
| 1011 | |||
| 1012 | /* Return the block a character belongs to. */ | ||
| 1013 | extern const uc_block_t * | ||
| 1014 | uc_block (ucs4_t uc) | ||
| 1015 | _UC_ATTRIBUTE_CONST; | ||
| 1016 | |||
| 1017 | /* Test whether a Unicode character belongs to a given block. */ | ||
| 1018 | extern bool | ||
| 1019 | uc_is_block (ucs4_t uc, const uc_block_t *block) | ||
| 1020 | _UC_ATTRIBUTE_PURE; | ||
| 1021 | |||
| 1022 | /* Get the list of all blocks. */ | ||
| 1023 | extern void | ||
| 1024 | uc_all_blocks (const uc_block_t **blocks, size_t *count); | ||
| 1025 | |||
| 1026 | /* ========================================================================= */ | ||
| 1027 | |||
| 1028 | /* Properties taken from language standards. */ | ||
| 1029 | |||
| 1030 | /* Test whether a Unicode character is considered whitespace in ISO C 99. */ | ||
| 1031 | extern bool | ||
| 1032 | uc_is_c_whitespace (ucs4_t uc) | ||
| 1033 | _UC_ATTRIBUTE_CONST; | ||
| 1034 | |||
| 1035 | /* Test whether a Unicode character is considered whitespace in Java. */ | ||
| 1036 | extern bool | ||
| 1037 | uc_is_java_whitespace (ucs4_t uc) | ||
| 1038 | _UC_ATTRIBUTE_CONST; | ||
| 1039 | |||
| 1040 | enum | ||
| 1041 | { | ||
| 1042 | UC_IDENTIFIER_START, /* valid as first or subsequent character */ | ||
| 1043 | UC_IDENTIFIER_VALID, /* valid as subsequent character only */ | ||
| 1044 | UC_IDENTIFIER_INVALID, /* not valid */ | ||
| 1045 | UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ | ||
| 1046 | }; | ||
| 1047 | |||
| 1048 | /* Return the categorization of a Unicode character w.r.t. the ISO C 99 | ||
| 1049 | identifier syntax. */ | ||
| 1050 | extern int | ||
| 1051 | uc_c_ident_category (ucs4_t uc) | ||
| 1052 | _UC_ATTRIBUTE_CONST; | ||
| 1053 | |||
| 1054 | /* Return the categorization of a Unicode character w.r.t. the Java | ||
| 1055 | identifier syntax. */ | ||
| 1056 | extern int | ||
| 1057 | uc_java_ident_category (ucs4_t uc) | ||
| 1058 | _UC_ATTRIBUTE_CONST; | ||
| 1059 | |||
| 1060 | /* ========================================================================= */ | ||
| 1061 | |||
| 1062 | /* Like ISO C <ctype.h> and <wctype.h>. These functions are deprecated, | ||
| 1063 | because this set of functions was designed with ASCII in mind and cannot | ||
| 1064 | reflect the more diverse reality of the Unicode character set. But they | ||
| 1065 | can be a quick-and-dirty porting aid when migrating from wchar_t APIs | ||
| 1066 | to Unicode strings. */ | ||
| 1067 | |||
| 1068 | /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */ | ||
| 1069 | extern bool | ||
| 1070 | uc_is_alnum (ucs4_t uc) | ||
| 1071 | _UC_ATTRIBUTE_CONST; | ||
| 1072 | |||
| 1073 | /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, | ||
| 1074 | or any character that is one of a locale-specific set of characters for | ||
| 1075 | which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' | ||
| 1076 | is true. */ | ||
| 1077 | extern bool | ||
| 1078 | uc_is_alpha (ucs4_t uc) | ||
| 1079 | _UC_ATTRIBUTE_CONST; | ||
| 1080 | |||
| 1081 | /* Test for any control character. */ | ||
| 1082 | extern bool | ||
| 1083 | uc_is_cntrl (ucs4_t uc) | ||
| 1084 | _UC_ATTRIBUTE_CONST; | ||
| 1085 | |||
| 1086 | /* Test for any character that corresponds to a decimal-digit character. */ | ||
| 1087 | extern bool | ||
| 1088 | uc_is_digit (ucs4_t uc) | ||
| 1089 | _UC_ATTRIBUTE_CONST; | ||
| 1090 | |||
| 1091 | /* Test for any character for which 'uc_is_print' is true and 'uc_is_space' | ||
| 1092 | is false. */ | ||
| 1093 | extern bool | ||
| 1094 | uc_is_graph (ucs4_t uc) | ||
| 1095 | _UC_ATTRIBUTE_CONST; | ||
| 1096 | |||
| 1097 | /* Test for any character that corresponds to a lowercase letter or is one | ||
| 1098 | of a locale-specific set of characters for which none of 'uc_is_cntrl', | ||
| 1099 | 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | ||
| 1100 | extern bool | ||
| 1101 | uc_is_lower (ucs4_t uc) | ||
| 1102 | _UC_ATTRIBUTE_CONST; | ||
| 1103 | |||
| 1104 | /* Test for any printing character. */ | ||
| 1105 | extern bool | ||
| 1106 | uc_is_print (ucs4_t uc) | ||
| 1107 | _UC_ATTRIBUTE_CONST; | ||
| 1108 | |||
| 1109 | /* Test for any printing character that is one of a locale-specific set of | ||
| 1110 | characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */ | ||
| 1111 | extern bool | ||
| 1112 | uc_is_punct (ucs4_t uc) | ||
| 1113 | _UC_ATTRIBUTE_CONST; | ||
| 1114 | |||
| 1115 | /* Test for any character that corresponds to a locale-specific set of | ||
| 1116 | characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct' | ||
| 1117 | is true. */ | ||
| 1118 | extern bool | ||
| 1119 | uc_is_space (ucs4_t uc) | ||
| 1120 | _UC_ATTRIBUTE_CONST; | ||
| 1121 | |||
| 1122 | /* Test for any character that corresponds to an uppercase letter or is one | ||
| 1123 | of a locale-specific set of character for which none of 'uc_is_cntrl', | ||
| 1124 | 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | ||
| 1125 | extern bool | ||
| 1126 | uc_is_upper (ucs4_t uc) | ||
| 1127 | _UC_ATTRIBUTE_CONST; | ||
| 1128 | |||
| 1129 | /* Test for any character that corresponds to a hexadecimal-digit | ||
| 1130 | character. */ | ||
| 1131 | extern bool | ||
| 1132 | uc_is_xdigit (ucs4_t uc) | ||
| 1133 | _UC_ATTRIBUTE_CONST; | ||
| 1134 | |||
| 1135 | /* GNU extension. */ | ||
| 1136 | /* Test for any character that corresponds to a standard blank character or | ||
| 1137 | a locale-specific set of characters for which 'uc_is_alnum' is false. */ | ||
| 1138 | extern bool | ||
| 1139 | uc_is_blank (ucs4_t uc) | ||
| 1140 | _UC_ATTRIBUTE_CONST; | ||
| 1141 | |||
| 1142 | /* ========================================================================= */ | ||
| 1143 | |||
| 1144 | #ifdef __cplusplus | ||
| 1145 | } | ||
| 1146 | #endif | ||
| 1147 | |||
| 1148 | #endif /* _UNICTYPE_H */ | ||
diff --git a/gl/unictype.in.h b/gl/unictype.in.h index 3818da91..c3b9ecaf 100644 --- a/gl/unictype.in.h +++ b/gl/unictype.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Unicode character classification and properties. | 1 | /* Unicode character classification and properties. |
| 2 | Copyright (C) 2002, 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -576,7 +576,8 @@ enum | |||
| 576 | UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ | 576 | UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ |
| 577 | UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ | 577 | UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ |
| 578 | UC_JOINING_GROUP_VERTICAL_TAIL, /* Vertical_Tail */ | 578 | UC_JOINING_GROUP_VERTICAL_TAIL, /* Vertical_Tail */ |
| 579 | UC_JOINING_GROUP_KASHMIRI_YEH /* Kashmiri_Yeh */ | 579 | UC_JOINING_GROUP_KASHMIRI_YEH, /* Kashmiri_Yeh */ |
| 580 | UC_JOINING_GROUP_THIN_NOON /* Thin_Noon */ | ||
| 580 | }; | 581 | }; |
| 581 | 582 | ||
| 582 | /* Return the name of a joining group. */ | 583 | /* Return the name of a joining group. */ |
diff --git a/gl/unictype/bitmap.h b/gl/unictype/bitmap.h index 869ac066..621861da 100644 --- a/gl/unictype/bitmap.h +++ b/gl/unictype/bitmap.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Three-level bitmap lookup. | 1 | /* Three-level bitmap lookup. |
| 2 | Copyright (C) 2000-2002, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2000-2002, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2000-2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2000-2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_alnum.c b/gl/unictype/ctype_alnum.c index f58f4310..7cd9157a 100644 --- a/gl/unictype/ctype_alnum.c +++ b/gl/unictype/ctype_alnum.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_alnum.h b/gl/unictype/ctype_alnum.h index 3ee771ab..0530175e 100644 --- a/gl/unictype/ctype_alnum.h +++ b/gl/unictype/ctype_alnum.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | int header[1]; | 27 | int header[1]; |
| 28 | int level1[4]; | 28 | int level1[4]; |
| 29 | short level2[4 << 7]; | 29 | short level2[4 << 7]; |
| 30 | unsigned int level3[85 << 4]; | 30 | unsigned int level3[83 << 4]; |
| 31 | } | 31 | } |
| 32 | u_is_alnum = | 32 | u_is_alnum = |
| 33 | { | 33 | { |
| @@ -234,10 +234,10 @@ u_is_alnum = | |||
| 234 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 234 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 235 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 235 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 236 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 236 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 237 | 5 + 512 * sizeof (short) / sizeof (int) + 928, | ||
| 238 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 237 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 239 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 238 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 240 | 5 + 512 * sizeof (short) / sizeof (int) + 944, | 239 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 240 | 5 + 512 * sizeof (short) / sizeof (int) + 928, | ||
| 241 | -1, | 241 | -1, |
| 242 | -1, | 242 | -1, |
| 243 | -1, | 243 | -1, |
| @@ -254,14 +254,14 @@ u_is_alnum = | |||
| 254 | -1, | 254 | -1, |
| 255 | -1, | 255 | -1, |
| 256 | -1, | 256 | -1, |
| 257 | 5 + 512 * sizeof (short) / sizeof (int) + 944, | ||
| 257 | 5 + 512 * sizeof (short) / sizeof (int) + 960, | 258 | 5 + 512 * sizeof (short) / sizeof (int) + 960, |
| 258 | 5 + 512 * sizeof (short) / sizeof (int) + 976, | 259 | 5 + 512 * sizeof (short) / sizeof (int) + 976, |
| 259 | 5 + 512 * sizeof (short) / sizeof (int) + 992, | ||
| 260 | -1, | 260 | -1, |
| 261 | -1, | 261 | -1, |
| 262 | -1, | 262 | -1, |
| 263 | -1, | 263 | -1, |
| 264 | 5 + 512 * sizeof (short) / sizeof (int) + 1008, | 264 | 5 + 512 * sizeof (short) / sizeof (int) + 992, |
| 265 | -1, | 265 | -1, |
| 266 | -1, | 266 | -1, |
| 267 | -1, | 267 | -1, |
| @@ -269,30 +269,30 @@ u_is_alnum = | |||
| 269 | -1, | 269 | -1, |
| 270 | -1, | 270 | -1, |
| 271 | -1, | 271 | -1, |
| 272 | 5 + 512 * sizeof (short) / sizeof (int) + 1024, | 272 | 5 + 512 * sizeof (short) / sizeof (int) + 1008, |
| 273 | -1, | 273 | -1, |
| 274 | -1, | 274 | -1, |
| 275 | -1, | 275 | -1, |
| 276 | 5 + 512 * sizeof (short) / sizeof (int) + 1024, | ||
| 276 | 5 + 512 * sizeof (short) / sizeof (int) + 1040, | 277 | 5 + 512 * sizeof (short) / sizeof (int) + 1040, |
| 277 | 5 + 512 * sizeof (short) / sizeof (int) + 1056, | ||
| 278 | -1, | 278 | -1, |
| 279 | -1, | 279 | -1, |
| 280 | -1, | 280 | -1, |
| 281 | 5 + 512 * sizeof (short) / sizeof (int) + 1056, | ||
| 281 | 5 + 512 * sizeof (short) / sizeof (int) + 1072, | 282 | 5 + 512 * sizeof (short) / sizeof (int) + 1072, |
| 282 | 5 + 512 * sizeof (short) / sizeof (int) + 1088, | 283 | 5 + 512 * sizeof (short) / sizeof (int) + 1088, |
| 283 | 5 + 512 * sizeof (short) / sizeof (int) + 1104, | 284 | 5 + 512 * sizeof (short) / sizeof (int) + 1104, |
| 284 | 5 + 512 * sizeof (short) / sizeof (int) + 1120, | 285 | 5 + 512 * sizeof (short) / sizeof (int) + 1120, |
| 285 | 5 + 512 * sizeof (short) / sizeof (int) + 1136, | 286 | 5 + 512 * sizeof (short) / sizeof (int) + 1136, |
| 286 | 5 + 512 * sizeof (short) / sizeof (int) + 1152, | ||
| 287 | -1, | 287 | -1, |
| 288 | -1, | 288 | -1, |
| 289 | 5 + 512 * sizeof (short) / sizeof (int) + 1152, | ||
| 289 | 5 + 512 * sizeof (short) / sizeof (int) + 1168, | 290 | 5 + 512 * sizeof (short) / sizeof (int) + 1168, |
| 290 | 5 + 512 * sizeof (short) / sizeof (int) + 1184, | ||
| 291 | -1, | 291 | -1, |
| 292 | -1, | 292 | -1, |
| 293 | -1, | 293 | -1, |
| 294 | -1, | 294 | -1, |
| 295 | 5 + 512 * sizeof (short) / sizeof (int) + 1200, | 295 | 5 + 512 * sizeof (short) / sizeof (int) + 1184, |
| 296 | -1, | 296 | -1, |
| 297 | -1, | 297 | -1, |
| 298 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 298 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -378,7 +378,7 @@ u_is_alnum = | |||
| 378 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 378 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 379 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 379 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 380 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 380 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 381 | 5 + 512 * sizeof (short) / sizeof (int) + 1216, | 381 | 5 + 512 * sizeof (short) / sizeof (int) + 1200, |
| 382 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 382 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 383 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 383 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 384 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 384 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -386,9 +386,8 @@ u_is_alnum = | |||
| 386 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 386 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 387 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 387 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 388 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 388 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 389 | 5 + 512 * sizeof (short) / sizeof (int) + 1232, | ||
| 390 | 5 + 512 * sizeof (short) / sizeof (int) + 1248, | ||
| 391 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 389 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 390 | 5 + 512 * sizeof (short) / sizeof (int) + 1216, | ||
| 392 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 391 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 393 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 392 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 394 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 393 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -398,8 +397,8 @@ u_is_alnum = | |||
| 398 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 397 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 399 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 398 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 400 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 399 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 401 | 5 + 512 * sizeof (short) / sizeof (int) + 1264, | ||
| 402 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 400 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 401 | 5 + 512 * sizeof (short) / sizeof (int) + 1232, | ||
| 403 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 402 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 404 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 403 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 405 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 404 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -412,15 +411,16 @@ u_is_alnum = | |||
| 412 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 411 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 413 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 412 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 414 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 413 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 415 | 5 + 512 * sizeof (short) / sizeof (int) + 1280, | ||
| 416 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 414 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 417 | 5 + 512 * sizeof (short) / sizeof (int) + 1296, | 415 | 5 + 512 * sizeof (short) / sizeof (int) + 1248, |
| 416 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | ||
| 417 | 5 + 512 * sizeof (short) / sizeof (int) + 1264, | ||
| 418 | -1, | 418 | -1, |
| 419 | -1, | 419 | -1, |
| 420 | -1, | 420 | -1, |
| 421 | -1, | 421 | -1, |
| 422 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 422 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 423 | 5 + 512 * sizeof (short) / sizeof (int) + 1312, | 423 | 5 + 512 * sizeof (short) / sizeof (int) + 1280, |
| 424 | -1, | 424 | -1, |
| 425 | -1, | 425 | -1, |
| 426 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 426 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -432,7 +432,7 @@ u_is_alnum = | |||
| 432 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 432 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 433 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 433 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 434 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 434 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 435 | 5 + 512 * sizeof (short) / sizeof (int) + 1328, | 435 | 5 + 512 * sizeof (short) / sizeof (int) + 1296, |
| 436 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 436 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 437 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 437 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 438 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 438 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -440,16 +440,16 @@ u_is_alnum = | |||
| 440 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 440 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 441 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 441 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 442 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 442 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 443 | 5 + 512 * sizeof (short) / sizeof (int) + 1344, | 443 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 444 | -1, | 444 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 445 | -1, | 445 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 446 | -1, | 446 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 447 | -1, | 447 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 448 | -1, | 448 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 449 | -1, | 449 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 450 | -1, | 450 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 451 | -1, | 451 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 452 | -1, | 452 | 5 + 512 * sizeof (short) / sizeof (int) + 1312, |
| 453 | -1, | 453 | -1, |
| 454 | -1, | 454 | -1, |
| 455 | -1, | 455 | -1, |
| @@ -570,15 +570,15 @@ u_is_alnum = | |||
| 570 | 0xFFFD0000U, 0x0000FFFFU, 0xFFFFE000U, 0xFFFFFFFFU, | 570 | 0xFFFD0000U, 0x0000FFFFU, 0xFFFFE000U, 0xFFFFFFFFU, |
| 571 | 0xFFFFFFFFU, 0x0002003FU, 0xFFFFFFFFU, 0x043007FFU, | 571 | 0xFFFFFFFFU, 0x0002003FU, 0xFFFFFFFFU, 0x043007FFU, |
| 572 | 0x043FFFFFU, 0x00000110U, 0x01FFFFFFU, 0xFFFF07FFU, | 572 | 0x043FFFFFU, 0x00000110U, 0x01FFFFFFU, 0xFFFF07FFU, |
| 573 | 0x00007EFFU, 0xFFFFFFFFU, 0x000003FFU, 0x00000000U, | 573 | 0x0000FEFFU, 0xFFFFFFFFU, 0x000003FFU, 0x00000000U, |
| 574 | 0xFFFFFFF0U, 0x23FFFFFFU, 0xFF010000U, 0xFFFEFFC3U, | 574 | 0xFFFFFFF0U, 0x23FFFFFFU, 0xFF010000U, 0xFFFEFFC3U, |
| 575 | 0xFFF99FE1U, 0x23C5FDFFU, 0xB0004000U, 0x1003FFC3U, | 575 | 0xFFF99FE1U, 0x23C5FDFFU, 0xB0004000U, 0x1003FFC3U, |
| 576 | 0xFFF987E0U, 0x036DFDFFU, 0x5E000000U, 0x001CFFC0U, | 576 | 0xFFF987E0U, 0x036DFDFFU, 0x5E000000U, 0x001CFFC0U, |
| 577 | 0xFFFBBFE0U, 0x23EDFDFFU, 0x00010000U, 0x0200FFC3U, | 577 | 0xFFFBBFE0U, 0x23EDFDFFU, 0x00010000U, 0x0200FFC3U, |
| 578 | 0xFFF99FE0U, 0x23EDFDFFU, 0xB0000000U, 0x0002FFC3U, | 578 | 0xFFF99FE0U, 0x23EDFDFFU, 0xB0000000U, 0x0002FFC3U, |
| 579 | 0xD63DC7E8U, 0x03FFC718U, 0x00010000U, 0x0000FFC0U, | 579 | 0xD63DC7E8U, 0x03FFC718U, 0x00010000U, 0x0000FFC0U, |
| 580 | 0xFFFDDFE0U, 0x23FFFDFFU, 0x27000000U, 0x0000FFC3U, | 580 | 0xFFFDDFE0U, 0x23FFFDFFU, 0x37000000U, 0x0000FFC3U, |
| 581 | 0xFFFDDFE1U, 0x23EFFDFFU, 0x60000000U, 0x0006FFC3U, | 581 | 0xFFFDDFE1U, 0x23EFFDFFU, 0x70000000U, 0x0006FFC3U, |
| 582 | 0xFFFDDFF0U, 0x27FFFFFFU, 0x80704000U, 0xFC00FFC3U, | 582 | 0xFFFDDFF0U, 0x27FFFFFFU, 0x80704000U, 0xFC00FFC3U, |
| 583 | 0xFC7FFFE0U, 0x2FFBFFFFU, 0x0000007FU, 0x0000FFC0U, | 583 | 0xFC7FFFE0U, 0x2FFBFFFFU, 0x0000007FU, 0x0000FFC0U, |
| 584 | 0xFFFFFFFEU, 0x07FF7FFFU, 0x03FF7FBFU, 0x00000000U, | 584 | 0xFFFFFFFEU, 0x07FF7FFFU, 0x03FF7FBFU, 0x00000000U, |
| @@ -652,7 +652,7 @@ u_is_alnum = | |||
| 652 | 0xFFFF1FFFU, 0x00000FFFU, 0xFFFFFFFFU, 0x80007FFFU, | 652 | 0xFFFF1FFFU, 0x00000FFFU, 0xFFFFFFFFU, 0x80007FFFU, |
| 653 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, | 653 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, |
| 654 | 0xFF800000U, 0xFFFFFFFCU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 654 | 0xFF800000U, 0xFFFFFFFCU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 655 | 0xFFFFF9FFU, 0xFFFFFFFFU, 0x1FEB3FFFU, 0xFFFC0000U, | 655 | 0xFFFFF9FFU, 0xFFFFFFFFU, 0x1FFFFFFFU, 0xFFFE0000U, |
| 656 | 0xFFFFF7BBU, 0x00000007U, 0xFFFFFFFFU, 0x000FFFFFU, | 656 | 0xFFFFF7BBU, 0x00000007U, 0xFFFFFFFFU, 0x000FFFFFU, |
| 657 | 0xFFFFFFFCU, 0x000FFFFFU, 0x03FF0000U, 0x68FC0000U, | 657 | 0xFFFFFFFCU, 0x000FFFFFU, 0x03FF0000U, 0x68FC0000U, |
| 658 | 0xFFFFFFFFU, 0xFFFF003FU, 0x0000007FU, 0x1FFFFFFFU, | 658 | 0xFFFFFFFFU, 0xFFFF003FU, 0x0000007FU, 0x1FFFFFFFU, |
| @@ -699,7 +699,7 @@ u_is_alnum = | |||
| 699 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, | 699 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, |
| 700 | 0xFFFFFD3FU, 0x91BFFFFFU, 0x003FFFFFU, 0x007FFFFFU, | 700 | 0xFFFFFD3FU, 0x91BFFFFFU, 0x003FFFFFU, 0x007FFFFFU, |
| 701 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x0037FFFFU, | 701 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x0037FFFFU, |
| 702 | 0x003FFFFFU, 0x03FFFFFFU, 0x00000000U, 0x00000000U, | 702 | 0x003FFFFFU, 0x03FFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 703 | 0xFFFFFFFFU, 0xC0FFFFFFU, 0x00000000U, 0x00000000U, | 703 | 0xFFFFFFFFU, 0xC0FFFFFFU, 0x00000000U, 0x00000000U, |
| 704 | 0xFEEF0001U, 0x003FFFFFU, 0x00000000U, 0x1FFFFFFFU, | 704 | 0xFEEF0001U, 0x003FFFFFU, 0x00000000U, 0x1FFFFFFFU, |
| 705 | 0x1FFFFFFFU, 0x00000000U, 0xFFFFFEFFU, 0x0000001FU, | 705 | 0x1FFFFFFFU, 0x00000000U, 0xFFFFFEFFU, 0x0000001FU, |
| @@ -710,7 +710,7 @@ u_is_alnum = | |||
| 710 | 0xFFFFFFFFU, 0x03FF000FU, 0xFFFFFFFFU, 0xFFFF803FU, | 710 | 0xFFFFFFFFU, 0x03FF000FU, 0xFFFFFFFFU, 0xFFFF803FU, |
| 711 | 0x0000003FU, 0x00000000U, 0x00000000U, 0x00000000U, | 711 | 0x0000003FU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 712 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 712 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 713 | 0xFFFFFFFFU, 0x000303FFU, 0x0000001CU, 0x00000000U, | 713 | 0xFFFFFFFFU, 0x000303FFU, 0x000000FCU, 0x00000000U, |
| 714 | 0x1FFFFFFFU, 0xFFFF0080U, 0x0000003FU, 0xFFFF0000U, | 714 | 0x1FFFFFFFU, 0xFFFF0080U, 0x0000003FU, 0xFFFF0000U, |
| 715 | 0x00000003U, 0xFFFF0000U, 0x0000001FU, 0x007FFFFFU, | 715 | 0x00000003U, 0xFFFF0000U, 0x0000001FU, 0x007FFFFFU, |
| 716 | 0xFFFFFFF8U, 0x00FFFFFFU, 0x00000000U, 0x0026FFC0U, | 716 | 0xFFFFFFF8U, 0x00FFFFFFU, 0x00000000U, 0x0026FFC0U, |
| @@ -740,7 +740,7 @@ u_is_alnum = | |||
| 740 | 0xFFFFFDFFU, 0x00007FFFU, 0x03FF0001U, 0xFFFC0000U, | 740 | 0xFFFFFDFFU, 0x00007FFFU, 0x03FF0001U, 0xFFFC0000U, |
| 741 | 0x0000FFFFU, 0x00000000U, 0x00000000U, 0x00000000U, | 741 | 0x0000FFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 742 | 0xFFFFFB7FU, 0x0001FFFFU, 0x03FF0040U, 0xFFFFFDBFU, | 742 | 0xFFFFFB7FU, 0x0001FFFFU, 0x03FF0040U, 0xFFFFFDBFU, |
| 743 | 0x010003FFU, 0x000003FFU, 0x00000000U, 0x00000000U, | 743 | 0x010003FFU, 0xFFFF03FFU, 0x0FFFFFFFU, 0x000003FFU, |
| 744 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 744 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 745 | 0x00000000U, 0x00000000U, 0x00000000U, 0x0007FFFFU, | 745 | 0x00000000U, 0x00000000U, 0x00000000U, 0x0007FFFFU, |
| 746 | 0xFFFDFFF4U, 0x000FFFFFU, 0x03FF0000U, 0x00000000U, | 746 | 0xFFFDFFF4U, 0x000FFFFFU, 0x03FF0000U, 0x00000000U, |
| @@ -782,17 +782,13 @@ u_is_alnum = | |||
| 782 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF1FFFU, | 782 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF1FFFU, |
| 783 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 783 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 784 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 784 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 785 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 785 | 0x00000000U, 0xF9FFFFFFU, 0x000FFFFFU, 0x00000000U, |
| 786 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000107FFU, 0x00000000U, | 786 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000107FFU, 0x00000000U, |
| 787 | 0xFFF80000U, 0x00000000U, 0x00000000U, 0x0000000BU, | 787 | 0xFFF80000U, 0x00000000U, 0x00000000U, 0x007C000BU, |
| 788 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 789 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 790 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 791 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | ||
| 792 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 788 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 793 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, | 789 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, |
| 794 | 0x000001FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 790 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 795 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 791 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0007FFFFU, |
| 796 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 792 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 797 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 793 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 798 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 794 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| @@ -838,7 +834,7 @@ u_is_alnum = | |||
| 838 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 834 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 839 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x07FF3FFFU, | 835 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x07FF3FFFU, |
| 840 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 836 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 841 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 837 | 0x00000000U, 0x00000000U, 0x7FFFFFFFU, 0xC01F3FB7U, |
| 842 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 838 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 843 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, | 839 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, |
| 844 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 840 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -861,16 +857,12 @@ u_is_alnum = | |||
| 861 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, | 857 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, |
| 862 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 858 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 859 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 864 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 865 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 866 | 0xFFFFFFFFU, 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 867 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 868 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 860 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 869 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 861 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 870 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 862 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 871 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 872 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 864 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 873 | 0xFFFFFFFFU, 0xFFFF0003U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 865 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 874 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 866 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 875 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 867 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 876 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 868 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -889,9 +881,9 @@ u_is_alnum = | |||
| 889 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 881 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 890 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, | 882 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, |
| 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 883 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 892 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 884 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 893 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 885 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 894 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 886 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 895 | 0xFFFFFFFFU, 0x0000FFFFU, 0x00000000U, 0x00000000U | 887 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U |
| 896 | } | 888 | } |
| 897 | }; | 889 | }; |
diff --git a/gl/unictype/ctype_alpha.c b/gl/unictype/ctype_alpha.c index c422fec6..9beeb03f 100644 --- a/gl/unictype/ctype_alpha.c +++ b/gl/unictype/ctype_alpha.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_alpha.h b/gl/unictype/ctype_alpha.h index cd129cb9..39f2f09a 100644 --- a/gl/unictype/ctype_alpha.h +++ b/gl/unictype/ctype_alpha.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | int header[1]; | 27 | int header[1]; |
| 28 | int level1[4]; | 28 | int level1[4]; |
| 29 | short level2[4 << 7]; | 29 | short level2[4 << 7]; |
| 30 | unsigned int level3[85 << 4]; | 30 | unsigned int level3[83 << 4]; |
| 31 | } | 31 | } |
| 32 | u_is_alpha = | 32 | u_is_alpha = |
| 33 | { | 33 | { |
| @@ -234,10 +234,10 @@ u_is_alpha = | |||
| 234 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 234 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 235 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 235 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 236 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 236 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 237 | 5 + 512 * sizeof (short) / sizeof (int) + 928, | ||
| 238 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 237 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 239 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 238 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 240 | 5 + 512 * sizeof (short) / sizeof (int) + 944, | 239 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 240 | 5 + 512 * sizeof (short) / sizeof (int) + 928, | ||
| 241 | -1, | 241 | -1, |
| 242 | -1, | 242 | -1, |
| 243 | -1, | 243 | -1, |
| @@ -254,14 +254,14 @@ u_is_alpha = | |||
| 254 | -1, | 254 | -1, |
| 255 | -1, | 255 | -1, |
| 256 | -1, | 256 | -1, |
| 257 | 5 + 512 * sizeof (short) / sizeof (int) + 944, | ||
| 257 | 5 + 512 * sizeof (short) / sizeof (int) + 960, | 258 | 5 + 512 * sizeof (short) / sizeof (int) + 960, |
| 258 | 5 + 512 * sizeof (short) / sizeof (int) + 976, | 259 | 5 + 512 * sizeof (short) / sizeof (int) + 976, |
| 259 | 5 + 512 * sizeof (short) / sizeof (int) + 992, | ||
| 260 | -1, | 260 | -1, |
| 261 | -1, | 261 | -1, |
| 262 | -1, | 262 | -1, |
| 263 | -1, | 263 | -1, |
| 264 | 5 + 512 * sizeof (short) / sizeof (int) + 1008, | 264 | 5 + 512 * sizeof (short) / sizeof (int) + 992, |
| 265 | -1, | 265 | -1, |
| 266 | -1, | 266 | -1, |
| 267 | -1, | 267 | -1, |
| @@ -269,30 +269,30 @@ u_is_alpha = | |||
| 269 | -1, | 269 | -1, |
| 270 | -1, | 270 | -1, |
| 271 | -1, | 271 | -1, |
| 272 | 5 + 512 * sizeof (short) / sizeof (int) + 1024, | 272 | 5 + 512 * sizeof (short) / sizeof (int) + 1008, |
| 273 | -1, | 273 | -1, |
| 274 | -1, | 274 | -1, |
| 275 | -1, | 275 | -1, |
| 276 | 5 + 512 * sizeof (short) / sizeof (int) + 1024, | ||
| 276 | 5 + 512 * sizeof (short) / sizeof (int) + 1040, | 277 | 5 + 512 * sizeof (short) / sizeof (int) + 1040, |
| 277 | 5 + 512 * sizeof (short) / sizeof (int) + 1056, | ||
| 278 | -1, | 278 | -1, |
| 279 | -1, | 279 | -1, |
| 280 | -1, | 280 | -1, |
| 281 | 5 + 512 * sizeof (short) / sizeof (int) + 1056, | ||
| 281 | 5 + 512 * sizeof (short) / sizeof (int) + 1072, | 282 | 5 + 512 * sizeof (short) / sizeof (int) + 1072, |
| 282 | 5 + 512 * sizeof (short) / sizeof (int) + 1088, | 283 | 5 + 512 * sizeof (short) / sizeof (int) + 1088, |
| 283 | 5 + 512 * sizeof (short) / sizeof (int) + 1104, | 284 | 5 + 512 * sizeof (short) / sizeof (int) + 1104, |
| 284 | 5 + 512 * sizeof (short) / sizeof (int) + 1120, | 285 | 5 + 512 * sizeof (short) / sizeof (int) + 1120, |
| 285 | 5 + 512 * sizeof (short) / sizeof (int) + 1136, | 286 | 5 + 512 * sizeof (short) / sizeof (int) + 1136, |
| 286 | 5 + 512 * sizeof (short) / sizeof (int) + 1152, | ||
| 287 | -1, | 287 | -1, |
| 288 | -1, | 288 | -1, |
| 289 | 5 + 512 * sizeof (short) / sizeof (int) + 1152, | ||
| 289 | 5 + 512 * sizeof (short) / sizeof (int) + 1168, | 290 | 5 + 512 * sizeof (short) / sizeof (int) + 1168, |
| 290 | 5 + 512 * sizeof (short) / sizeof (int) + 1184, | ||
| 291 | -1, | 291 | -1, |
| 292 | -1, | 292 | -1, |
| 293 | -1, | 293 | -1, |
| 294 | -1, | 294 | -1, |
| 295 | 5 + 512 * sizeof (short) / sizeof (int) + 1200, | 295 | 5 + 512 * sizeof (short) / sizeof (int) + 1184, |
| 296 | -1, | 296 | -1, |
| 297 | -1, | 297 | -1, |
| 298 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 298 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -378,7 +378,7 @@ u_is_alpha = | |||
| 378 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 378 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 379 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 379 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 380 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 380 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 381 | 5 + 512 * sizeof (short) / sizeof (int) + 1216, | 381 | 5 + 512 * sizeof (short) / sizeof (int) + 1200, |
| 382 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 382 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 383 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 383 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 384 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 384 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -386,9 +386,8 @@ u_is_alpha = | |||
| 386 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 386 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 387 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 387 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 388 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 388 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 389 | 5 + 512 * sizeof (short) / sizeof (int) + 1232, | ||
| 390 | 5 + 512 * sizeof (short) / sizeof (int) + 1248, | ||
| 391 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 389 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 390 | 5 + 512 * sizeof (short) / sizeof (int) + 1216, | ||
| 392 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 391 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 393 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 392 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 394 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 393 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -398,8 +397,8 @@ u_is_alpha = | |||
| 398 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 397 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 399 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 398 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 400 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 399 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 401 | 5 + 512 * sizeof (short) / sizeof (int) + 1264, | ||
| 402 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 400 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 401 | 5 + 512 * sizeof (short) / sizeof (int) + 1232, | ||
| 403 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 402 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 404 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 403 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 405 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 404 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -412,15 +411,16 @@ u_is_alpha = | |||
| 412 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 411 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 413 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 412 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 414 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 413 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 415 | 5 + 512 * sizeof (short) / sizeof (int) + 1280, | ||
| 416 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 414 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 417 | 5 + 512 * sizeof (short) / sizeof (int) + 1296, | 415 | 5 + 512 * sizeof (short) / sizeof (int) + 1248, |
| 416 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | ||
| 417 | 5 + 512 * sizeof (short) / sizeof (int) + 1264, | ||
| 418 | -1, | 418 | -1, |
| 419 | -1, | 419 | -1, |
| 420 | -1, | 420 | -1, |
| 421 | -1, | 421 | -1, |
| 422 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 422 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 423 | 5 + 512 * sizeof (short) / sizeof (int) + 1312, | 423 | 5 + 512 * sizeof (short) / sizeof (int) + 1280, |
| 424 | -1, | 424 | -1, |
| 425 | -1, | 425 | -1, |
| 426 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 426 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -432,7 +432,7 @@ u_is_alpha = | |||
| 432 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 432 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 433 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 433 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 434 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 434 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 435 | 5 + 512 * sizeof (short) / sizeof (int) + 1328, | 435 | 5 + 512 * sizeof (short) / sizeof (int) + 1296, |
| 436 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 436 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 437 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 437 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 438 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 438 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| @@ -440,16 +440,16 @@ u_is_alpha = | |||
| 440 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 440 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 441 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 441 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 442 | 5 + 512 * sizeof (short) / sizeof (int) + 336, | 442 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 443 | 5 + 512 * sizeof (short) / sizeof (int) + 1344, | 443 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 444 | -1, | 444 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 445 | -1, | 445 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 446 | -1, | 446 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 447 | -1, | 447 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 448 | -1, | 448 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 449 | -1, | 449 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 450 | -1, | 450 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 451 | -1, | 451 | 5 + 512 * sizeof (short) / sizeof (int) + 336, |
| 452 | -1, | 452 | 5 + 512 * sizeof (short) / sizeof (int) + 1312, |
| 453 | -1, | 453 | -1, |
| 454 | -1, | 454 | -1, |
| 455 | -1, | 455 | -1, |
| @@ -570,15 +570,15 @@ u_is_alpha = | |||
| 570 | 0xFFFD0000U, 0x0000FFFFU, 0xFFFFE000U, 0xFFFFFFFFU, | 570 | 0xFFFD0000U, 0x0000FFFFU, 0xFFFFE000U, 0xFFFFFFFFU, |
| 571 | 0xFFFFFFFFU, 0x0002003FU, 0xFFFFFFFFU, 0x043007FFU, | 571 | 0xFFFFFFFFU, 0x0002003FU, 0xFFFFFFFFU, 0x043007FFU, |
| 572 | 0x043FFFFFU, 0x00000110U, 0x01FFFFFFU, 0xFFFF07FFU, | 572 | 0x043FFFFFU, 0x00000110U, 0x01FFFFFFU, 0xFFFF07FFU, |
| 573 | 0x00007EFFU, 0xFFFFFFFFU, 0x000003FFU, 0x00000000U, | 573 | 0x0000FEFFU, 0xFFFFFFFFU, 0x000003FFU, 0x00000000U, |
| 574 | 0xFFFFFFF0U, 0x23FFFFFFU, 0xFF010000U, 0xFFFEFFC3U, | 574 | 0xFFFFFFF0U, 0x23FFFFFFU, 0xFF010000U, 0xFFFEFFC3U, |
| 575 | 0xFFF99FE1U, 0x23C5FDFFU, 0xB0004000U, 0x1003FFC3U, | 575 | 0xFFF99FE1U, 0x23C5FDFFU, 0xB0004000U, 0x1003FFC3U, |
| 576 | 0xFFF987E0U, 0x036DFDFFU, 0x5E000000U, 0x001CFFC0U, | 576 | 0xFFF987E0U, 0x036DFDFFU, 0x5E000000U, 0x001CFFC0U, |
| 577 | 0xFFFBBFE0U, 0x23EDFDFFU, 0x00010000U, 0x0200FFC3U, | 577 | 0xFFFBBFE0U, 0x23EDFDFFU, 0x00010000U, 0x0200FFC3U, |
| 578 | 0xFFF99FE0U, 0x23EDFDFFU, 0xB0000000U, 0x0002FFC3U, | 578 | 0xFFF99FE0U, 0x23EDFDFFU, 0xB0000000U, 0x0002FFC3U, |
| 579 | 0xD63DC7E8U, 0x03FFC718U, 0x00010000U, 0x0000FFC0U, | 579 | 0xD63DC7E8U, 0x03FFC718U, 0x00010000U, 0x0000FFC0U, |
| 580 | 0xFFFDDFE0U, 0x23FFFDFFU, 0x27000000U, 0x0000FFC3U, | 580 | 0xFFFDDFE0U, 0x23FFFDFFU, 0x37000000U, 0x0000FFC3U, |
| 581 | 0xFFFDDFE1U, 0x23EFFDFFU, 0x60000000U, 0x0006FFC3U, | 581 | 0xFFFDDFE1U, 0x23EFFDFFU, 0x70000000U, 0x0006FFC3U, |
| 582 | 0xFFFDDFF0U, 0x27FFFFFFU, 0x80704000U, 0xFC00FFC3U, | 582 | 0xFFFDDFF0U, 0x27FFFFFFU, 0x80704000U, 0xFC00FFC3U, |
| 583 | 0xFC7FFFE0U, 0x2FFBFFFFU, 0x0000007FU, 0x0000FFC0U, | 583 | 0xFC7FFFE0U, 0x2FFBFFFFU, 0x0000007FU, 0x0000FFC0U, |
| 584 | 0xFFFFFFFEU, 0x07FF7FFFU, 0x03FF7FBFU, 0x00000000U, | 584 | 0xFFFFFFFEU, 0x07FF7FFFU, 0x03FF7FBFU, 0x00000000U, |
| @@ -652,7 +652,7 @@ u_is_alpha = | |||
| 652 | 0xFFFF1FFFU, 0x00000FFFU, 0xFFFFFFFFU, 0x80007FFFU, | 652 | 0xFFFF1FFFU, 0x00000FFFU, 0xFFFFFFFFU, 0x80007FFFU, |
| 653 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, | 653 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, |
| 654 | 0xFF800000U, 0xFFFFFFFCU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 654 | 0xFF800000U, 0xFFFFFFFCU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 655 | 0xFFFFF9FFU, 0xFFFFFFFFU, 0x1FEB3FFFU, 0xFFFC0000U, | 655 | 0xFFFFF9FFU, 0xFFFFFFFFU, 0x1FFFFFFFU, 0xFFFE0000U, |
| 656 | 0xFFFFF7BBU, 0x00000007U, 0xFFFFFFFFU, 0x000FFFFFU, | 656 | 0xFFFFF7BBU, 0x00000007U, 0xFFFFFFFFU, 0x000FFFFFU, |
| 657 | 0xFFFFFFFCU, 0x000FFFFFU, 0x03FF0000U, 0x68FC0000U, | 657 | 0xFFFFFFFCU, 0x000FFFFFU, 0x03FF0000U, 0x68FC0000U, |
| 658 | 0xFFFFFFFFU, 0xFFFF003FU, 0x0000007FU, 0x1FFFFFFFU, | 658 | 0xFFFFFFFFU, 0xFFFF003FU, 0x0000007FU, 0x1FFFFFFFU, |
| @@ -699,7 +699,7 @@ u_is_alpha = | |||
| 699 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, | 699 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, |
| 700 | 0xFFFFFD3FU, 0x91BFFFFFU, 0x003FFFFFU, 0x007FFFFFU, | 700 | 0xFFFFFD3FU, 0x91BFFFFFU, 0x003FFFFFU, 0x007FFFFFU, |
| 701 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x0037FFFFU, | 701 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x0037FFFFU, |
| 702 | 0x003FFFFFU, 0x03FFFFFFU, 0x00000000U, 0x00000000U, | 702 | 0x003FFFFFU, 0x03FFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 703 | 0xFFFFFFFFU, 0xC0FFFFFFU, 0x00000000U, 0x00000000U, | 703 | 0xFFFFFFFFU, 0xC0FFFFFFU, 0x00000000U, 0x00000000U, |
| 704 | 0xFEEF0001U, 0x003FFFFFU, 0x00000000U, 0x1FFFFFFFU, | 704 | 0xFEEF0001U, 0x003FFFFFU, 0x00000000U, 0x1FFFFFFFU, |
| 705 | 0x1FFFFFFFU, 0x00000000U, 0xFFFFFEFFU, 0x0000001FU, | 705 | 0x1FFFFFFFU, 0x00000000U, 0xFFFFFEFFU, 0x0000001FU, |
| @@ -710,7 +710,7 @@ u_is_alpha = | |||
| 710 | 0xFFFFFFFFU, 0x03FF000FU, 0xFFFFFFFFU, 0xFFFF803FU, | 710 | 0xFFFFFFFFU, 0x03FF000FU, 0xFFFFFFFFU, 0xFFFF803FU, |
| 711 | 0x0000003FU, 0x00000000U, 0x00000000U, 0x00000000U, | 711 | 0x0000003FU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 712 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 712 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 713 | 0xFFFFFFFFU, 0x000303FFU, 0x0000001CU, 0x00000000U, | 713 | 0xFFFFFFFFU, 0x000303FFU, 0x000000FCU, 0x00000000U, |
| 714 | 0x1FFFFFFFU, 0xFFFF0080U, 0x0000003FU, 0xFFFF0000U, | 714 | 0x1FFFFFFFU, 0xFFFF0080U, 0x0000003FU, 0xFFFF0000U, |
| 715 | 0x00000003U, 0xFFFF0000U, 0x0000001FU, 0x007FFFFFU, | 715 | 0x00000003U, 0xFFFF0000U, 0x0000001FU, 0x007FFFFFU, |
| 716 | 0xFFFFFFF8U, 0x00FFFFFFU, 0x00000000U, 0x0026FFC0U, | 716 | 0xFFFFFFF8U, 0x00FFFFFFU, 0x00000000U, 0x0026FFC0U, |
| @@ -740,7 +740,7 @@ u_is_alpha = | |||
| 740 | 0xFFFFFDFFU, 0x00007FFFU, 0x03FF0001U, 0xFFFC0000U, | 740 | 0xFFFFFDFFU, 0x00007FFFU, 0x03FF0001U, 0xFFFC0000U, |
| 741 | 0x0000FFFFU, 0x00000000U, 0x00000000U, 0x00000000U, | 741 | 0x0000FFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 742 | 0xFFFFFB7FU, 0x0001FFFFU, 0x03FF0040U, 0xFFFFFDBFU, | 742 | 0xFFFFFB7FU, 0x0001FFFFU, 0x03FF0040U, 0xFFFFFDBFU, |
| 743 | 0x010003FFU, 0x000003FFU, 0x00000000U, 0x00000000U, | 743 | 0x010003FFU, 0xFFFF03FFU, 0x0FFFFFFFU, 0x000003FFU, |
| 744 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 744 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 745 | 0x00000000U, 0x00000000U, 0x00000000U, 0x0007FFFFU, | 745 | 0x00000000U, 0x00000000U, 0x00000000U, 0x0007FFFFU, |
| 746 | 0xFFFDFFF4U, 0x000FFFFFU, 0x03FF0000U, 0x00000000U, | 746 | 0xFFFDFFF4U, 0x000FFFFFU, 0x03FF0000U, 0x00000000U, |
| @@ -782,17 +782,13 @@ u_is_alpha = | |||
| 782 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF1FFFU, | 782 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF1FFFU, |
| 783 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 783 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 784 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 784 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 785 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 785 | 0x00000000U, 0xF9FFFFFFU, 0x000FFFFFU, 0x00000000U, |
| 786 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000107FFU, 0x00000000U, | 786 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000107FFU, 0x00000000U, |
| 787 | 0xFFF80000U, 0x00000000U, 0x00000000U, 0x0000000BU, | 787 | 0xFFF80000U, 0x00000000U, 0x00000000U, 0x007C000BU, |
| 788 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 789 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 790 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 791 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | ||
| 792 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 788 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 793 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, | 789 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, |
| 794 | 0x000001FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 790 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 795 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 791 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0007FFFFU, |
| 796 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 792 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 797 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 793 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 798 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 794 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| @@ -838,7 +834,7 @@ u_is_alpha = | |||
| 838 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 834 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 839 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x07FF3FFFU, | 835 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x07FF3FFFU, |
| 840 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 836 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 841 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 837 | 0x00000000U, 0x00000000U, 0x7FFFFFFFU, 0xC01F3FB7U, |
| 842 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 838 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 843 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, | 839 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, |
| 844 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 840 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -861,16 +857,12 @@ u_is_alpha = | |||
| 861 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, | 857 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, |
| 862 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 858 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 859 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 864 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 865 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 866 | 0xFFFFFFFFU, 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 867 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 868 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 860 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 869 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 861 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 870 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 862 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 871 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 872 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 864 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 873 | 0xFFFFFFFFU, 0xFFFF0003U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 865 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 874 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 866 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 875 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 867 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 876 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 868 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -889,9 +881,9 @@ u_is_alpha = | |||
| 889 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 881 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 890 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, | 882 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, |
| 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 883 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 892 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 884 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 893 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 885 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 894 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 886 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 895 | 0xFFFFFFFFU, 0x0000FFFFU, 0x00000000U, 0x00000000U | 887 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U |
| 896 | } | 888 | } |
| 897 | }; | 889 | }; |
diff --git a/gl/unictype/ctype_blank.c b/gl/unictype/ctype_blank.c index 25a08013..e14cc44e 100644 --- a/gl/unictype/ctype_blank.c +++ b/gl/unictype/ctype_blank.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_blank.h b/gl/unictype/ctype_blank.h index 23fac0f3..d0605c69 100644 --- a/gl/unictype/ctype_blank.h +++ b/gl/unictype/ctype_blank.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unictype/ctype_cntrl.c b/gl/unictype/ctype_cntrl.c index eb7467dd..1c5cefa1 100644 --- a/gl/unictype/ctype_cntrl.c +++ b/gl/unictype/ctype_cntrl.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_cntrl.h b/gl/unictype/ctype_cntrl.h index 58df7e76..ba6bf7ca 100644 --- a/gl/unictype/ctype_cntrl.h +++ b/gl/unictype/ctype_cntrl.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unictype/ctype_digit.c b/gl/unictype/ctype_digit.c index a82b3bb0..71d68807 100644 --- a/gl/unictype/ctype_digit.c +++ b/gl/unictype/ctype_digit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_digit.h b/gl/unictype/ctype_digit.h index 2f7d1822..7322861f 100644 --- a/gl/unictype/ctype_digit.h +++ b/gl/unictype/ctype_digit.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unictype/ctype_graph.c b/gl/unictype/ctype_graph.c index 2c41c794..92701700 100644 --- a/gl/unictype/ctype_graph.c +++ b/gl/unictype/ctype_graph.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_graph.h b/gl/unictype/ctype_graph.h index 5627ad0f..948d21d2 100644 --- a/gl/unictype/ctype_graph.h +++ b/gl/unictype/ctype_graph.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | int header[1]; | 27 | int header[1]; |
| 28 | int level1[17]; | 28 | int level1[17]; |
| 29 | short level2[6 << 7]; | 29 | short level2[6 << 7]; |
| 30 | unsigned int level3[94 << 4]; | 30 | unsigned int level3[92 << 4]; |
| 31 | } | 31 | } |
| 32 | u_is_graph = | 32 | u_is_graph = |
| 33 | { | 33 | { |
| @@ -247,10 +247,10 @@ u_is_graph = | |||
| 247 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 247 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 248 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 248 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 249 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 249 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 250 | 18 + 768 * sizeof (short) / sizeof (int) + 912, | ||
| 251 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 250 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 252 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 251 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 253 | 18 + 768 * sizeof (short) / sizeof (int) + 928, | 252 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 253 | 18 + 768 * sizeof (short) / sizeof (int) + 912, | ||
| 254 | -1, | 254 | -1, |
| 255 | -1, | 255 | -1, |
| 256 | -1, | 256 | -1, |
| @@ -267,14 +267,14 @@ u_is_graph = | |||
| 267 | -1, | 267 | -1, |
| 268 | -1, | 268 | -1, |
| 269 | -1, | 269 | -1, |
| 270 | 18 + 768 * sizeof (short) / sizeof (int) + 928, | ||
| 270 | 18 + 768 * sizeof (short) / sizeof (int) + 944, | 271 | 18 + 768 * sizeof (short) / sizeof (int) + 944, |
| 271 | 18 + 768 * sizeof (short) / sizeof (int) + 960, | 272 | 18 + 768 * sizeof (short) / sizeof (int) + 960, |
| 272 | 18 + 768 * sizeof (short) / sizeof (int) + 976, | ||
| 273 | -1, | 273 | -1, |
| 274 | -1, | 274 | -1, |
| 275 | -1, | 275 | -1, |
| 276 | -1, | 276 | -1, |
| 277 | 18 + 768 * sizeof (short) / sizeof (int) + 992, | 277 | 18 + 768 * sizeof (short) / sizeof (int) + 976, |
| 278 | -1, | 278 | -1, |
| 279 | -1, | 279 | -1, |
| 280 | -1, | 280 | -1, |
| @@ -282,30 +282,30 @@ u_is_graph = | |||
| 282 | -1, | 282 | -1, |
| 283 | -1, | 283 | -1, |
| 284 | -1, | 284 | -1, |
| 285 | 18 + 768 * sizeof (short) / sizeof (int) + 992, | ||
| 285 | 18 + 768 * sizeof (short) / sizeof (int) + 1008, | 286 | 18 + 768 * sizeof (short) / sizeof (int) + 1008, |
| 286 | 18 + 768 * sizeof (short) / sizeof (int) + 1024, | 287 | 18 + 768 * sizeof (short) / sizeof (int) + 1024, |
| 287 | 18 + 768 * sizeof (short) / sizeof (int) + 1040, | 288 | 18 + 768 * sizeof (short) / sizeof (int) + 1040, |
| 288 | 18 + 768 * sizeof (short) / sizeof (int) + 1056, | 289 | 18 + 768 * sizeof (short) / sizeof (int) + 1056, |
| 289 | 18 + 768 * sizeof (short) / sizeof (int) + 1072, | 290 | 18 + 768 * sizeof (short) / sizeof (int) + 1072, |
| 290 | 18 + 768 * sizeof (short) / sizeof (int) + 1088, | ||
| 291 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 291 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 292 | 18 + 768 * sizeof (short) / sizeof (int) + 1104, | 292 | 18 + 768 * sizeof (short) / sizeof (int) + 1088, |
| 293 | -1, | 293 | -1, |
| 294 | 18 + 768 * sizeof (short) / sizeof (int) + 1104, | ||
| 294 | 18 + 768 * sizeof (short) / sizeof (int) + 1120, | 295 | 18 + 768 * sizeof (short) / sizeof (int) + 1120, |
| 295 | 18 + 768 * sizeof (short) / sizeof (int) + 1136, | 296 | 18 + 768 * sizeof (short) / sizeof (int) + 1136, |
| 296 | 18 + 768 * sizeof (short) / sizeof (int) + 1152, | 297 | 18 + 768 * sizeof (short) / sizeof (int) + 1152, |
| 297 | 18 + 768 * sizeof (short) / sizeof (int) + 1168, | 298 | 18 + 768 * sizeof (short) / sizeof (int) + 1168, |
| 298 | 18 + 768 * sizeof (short) / sizeof (int) + 1184, | 299 | 18 + 768 * sizeof (short) / sizeof (int) + 1184, |
| 299 | 18 + 768 * sizeof (short) / sizeof (int) + 1200, | ||
| 300 | -1, | 300 | -1, |
| 301 | 18 + 768 * sizeof (short) / sizeof (int) + 1200, | ||
| 301 | 18 + 768 * sizeof (short) / sizeof (int) + 1216, | 302 | 18 + 768 * sizeof (short) / sizeof (int) + 1216, |
| 302 | 18 + 768 * sizeof (short) / sizeof (int) + 1232, | 303 | 18 + 768 * sizeof (short) / sizeof (int) + 1232, |
| 303 | 18 + 768 * sizeof (short) / sizeof (int) + 1248, | 304 | 18 + 768 * sizeof (short) / sizeof (int) + 1248, |
| 304 | 18 + 768 * sizeof (short) / sizeof (int) + 1264, | ||
| 305 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 305 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 306 | 18 + 768 * sizeof (short) / sizeof (int) + 1264, | ||
| 306 | 18 + 768 * sizeof (short) / sizeof (int) + 1280, | 307 | 18 + 768 * sizeof (short) / sizeof (int) + 1280, |
| 307 | 18 + 768 * sizeof (short) / sizeof (int) + 1296, | 308 | 18 + 768 * sizeof (short) / sizeof (int) + 1296, |
| 308 | 18 + 768 * sizeof (short) / sizeof (int) + 1312, | ||
| 309 | -1, | 309 | -1, |
| 310 | -1, | 310 | -1, |
| 311 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 311 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -391,7 +391,7 @@ u_is_graph = | |||
| 391 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 391 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 392 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 392 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 393 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 393 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 394 | 18 + 768 * sizeof (short) / sizeof (int) + 1328, | 394 | 18 + 768 * sizeof (short) / sizeof (int) + 1312, |
| 395 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 395 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 396 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 396 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 397 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 397 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -399,9 +399,8 @@ u_is_graph = | |||
| 399 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 399 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 400 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 400 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 401 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 401 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 402 | 18 + 768 * sizeof (short) / sizeof (int) + 1344, | ||
| 403 | 18 + 768 * sizeof (short) / sizeof (int) + 1360, | ||
| 404 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 402 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 403 | 18 + 768 * sizeof (short) / sizeof (int) + 1328, | ||
| 405 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 404 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 406 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 405 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 407 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 406 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -411,8 +410,8 @@ u_is_graph = | |||
| 411 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 410 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 412 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 411 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 413 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 412 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 414 | 18 + 768 * sizeof (short) / sizeof (int) + 1376, | ||
| 415 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 413 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 414 | 18 + 768 * sizeof (short) / sizeof (int) + 1344, | ||
| 416 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 415 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 417 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 416 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 418 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 417 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -425,15 +424,16 @@ u_is_graph = | |||
| 425 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 424 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 426 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 425 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 427 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 426 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 428 | 18 + 768 * sizeof (short) / sizeof (int) + 1392, | ||
| 429 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 427 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 430 | 18 + 768 * sizeof (short) / sizeof (int) + 1408, | 428 | 18 + 768 * sizeof (short) / sizeof (int) + 1360, |
| 429 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | ||
| 430 | 18 + 768 * sizeof (short) / sizeof (int) + 1376, | ||
| 431 | -1, | 431 | -1, |
| 432 | -1, | 432 | -1, |
| 433 | -1, | 433 | -1, |
| 434 | -1, | 434 | -1, |
| 435 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 435 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 436 | 18 + 768 * sizeof (short) / sizeof (int) + 1424, | 436 | 18 + 768 * sizeof (short) / sizeof (int) + 1392, |
| 437 | -1, | 437 | -1, |
| 438 | -1, | 438 | -1, |
| 439 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 439 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -445,7 +445,7 @@ u_is_graph = | |||
| 445 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 445 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 446 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 446 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 447 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 447 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 448 | 18 + 768 * sizeof (short) / sizeof (int) + 1440, | 448 | 18 + 768 * sizeof (short) / sizeof (int) + 1408, |
| 449 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 449 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 450 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 450 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 451 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 451 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -453,16 +453,16 @@ u_is_graph = | |||
| 453 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 453 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 454 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 454 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 455 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 455 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 456 | 18 + 768 * sizeof (short) / sizeof (int) + 1456, | 456 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 457 | -1, | 457 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 458 | -1, | 458 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 459 | -1, | 459 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 460 | -1, | 460 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 461 | -1, | 461 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 462 | -1, | 462 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 463 | -1, | 463 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 464 | -1, | 464 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 465 | -1, | 465 | 18 + 768 * sizeof (short) / sizeof (int) + 1424, |
| 466 | -1, | 466 | -1, |
| 467 | -1, | 467 | -1, |
| 468 | -1, | 468 | -1, |
| @@ -564,7 +564,7 @@ u_is_graph = | |||
| 564 | -1, | 564 | -1, |
| 565 | -1, | 565 | -1, |
| 566 | -1, | 566 | -1, |
| 567 | 18 + 768 * sizeof (short) / sizeof (int) + 1472, | 567 | 18 + 768 * sizeof (short) / sizeof (int) + 1440, |
| 568 | -1, | 568 | -1, |
| 569 | -1, | 569 | -1, |
| 570 | -1, | 570 | -1, |
| @@ -819,7 +819,7 @@ u_is_graph = | |||
| 819 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 819 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 820 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 820 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 821 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 821 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 822 | 18 + 768 * sizeof (short) / sizeof (int) + 1488 | 822 | 18 + 768 * sizeof (short) / sizeof (int) + 1456 |
| 823 | }, | 823 | }, |
| 824 | { | 824 | { |
| 825 | 0x00000000U, 0xFFFFFFFEU, 0xFFFFFFFFU, 0x7FFFFFFFU, | 825 | 0x00000000U, 0xFFFFFFFEU, 0xFFFFFFFFU, 0x7FFFFFFFU, |
| @@ -839,15 +839,15 @@ u_is_graph = | |||
| 839 | 0xFFFFBFFFU, 0xFFFFFFFFU, 0xFFFFE7FFU, 0xFFFFFFFFU, | 839 | 0xFFFFBFFFU, 0xFFFFFFFFU, 0xFFFFE7FFU, 0xFFFFFFFFU, |
| 840 | 0xFFFFFFFFU, 0x0003FFFFU, 0xFFFFFFFFU, 0xE7FFFFFFU, | 840 | 0xFFFFFFFFU, 0x0003FFFFU, 0xFFFFFFFFU, 0xE7FFFFFFU, |
| 841 | 0xFFFFFFFFU, 0x7FFF3FFFU, 0x4FFFFFFFU, 0xFFFF07FFU, | 841 | 0xFFFFFFFFU, 0x7FFF3FFFU, 0x4FFFFFFFU, 0xFFFF07FFU, |
| 842 | 0xFF837FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 842 | 0xFF83FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 843 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 843 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 844 | 0xFFF99FEFU, 0xF3C5FDFFU, 0xB080799FU, 0x7FFFFFCFU, | 844 | 0xFFF99FEFU, 0xF3C5FDFFU, 0xB080799FU, 0x7FFFFFCFU, |
| 845 | 0xFFF987EEU, 0xD36DFDFFU, 0x5E023987U, 0x007FFFC0U, | 845 | 0xFFF987EEU, 0xD36DFDFFU, 0x5E023987U, 0x007FFFC0U, |
| 846 | 0xFFFBBFEEU, 0xF3EDFDFFU, 0x00013BBFU, 0xFE03FFCFU, | 846 | 0xFFFBBFEEU, 0xF3EDFDFFU, 0x00013BBFU, 0xFE03FFCFU, |
| 847 | 0xFFF99FEEU, 0xF3EDFDFFU, 0xB0E0399FU, 0x00FFFFCFU, | 847 | 0xFFF99FEEU, 0xF3EDFDFFU, 0xB0E0399FU, 0x00FFFFCFU, |
| 848 | 0xD63DC7ECU, 0xC3FFC718U, 0x00813DC7U, 0x07FFFFC0U, | 848 | 0xD63DC7ECU, 0xC3FFC718U, 0x00813DC7U, 0x07FFFFC0U, |
| 849 | 0xFFFDDFFFU, 0xF3FFFDFFU, 0x27603DDFU, 0xFF80FFCFU, | 849 | 0xFFFDDFFFU, 0xF3FFFDFFU, 0x37603DDFU, 0xFF80FFCFU, |
| 850 | 0xFFFDDFFFU, 0xF3EFFDFFU, 0x60603DDFU, 0x000EFFCFU, | 850 | 0xFFFDDFFFU, 0xF3EFFDFFU, 0x70603DDFU, 0x000EFFCFU, |
| 851 | 0xFFFDDFFFU, 0xFFFFFFFFU, 0xFFF0FDDFU, 0xFFFFFFCFU, | 851 | 0xFFFDDFFFU, 0xFFFFFFFFU, 0xFFF0FDDFU, 0xFFFFFFCFU, |
| 852 | 0xFC7FFFEEU, 0x2FFBFFFFU, 0xFF5F847FU, 0x001CFFC0U, | 852 | 0xFC7FFFEEU, 0x2FFBFFFFU, 0xFF5F847FU, 0x001CFFC0U, |
| 853 | 0xFFFFFFFEU, 0x87FFFFFFU, 0x0FFFFFFFU, 0x00000000U, | 853 | 0xFFFFFFFEU, 0x87FFFFFFU, 0x0FFFFFFFU, 0x00000000U, |
| @@ -875,7 +875,7 @@ u_is_graph = | |||
| 875 | 0x7FFFFFFFU, 0x0FFF0FFFU, 0xFFFFFFF1U, 0x001F3FFFU, | 875 | 0x7FFFFFFFU, 0x0FFF0FFFU, 0xFFFFFFF1U, 0x001F3FFFU, |
| 876 | 0xFFFFFFFFU, 0xFFFF0FFFU, 0xC7FF03FFU, 0xFFFFFFFFU, | 876 | 0xFFFFFFFFU, 0xFFFF0FFFU, 0xC7FF03FFU, 0xFFFFFFFFU, |
| 877 | 0xCFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, 0x9FFFFFFFU, | 877 | 0xCFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, 0x9FFFFFFFU, |
| 878 | 0x03FF03FFU, 0xFFFF3FFFU, 0x00007FFFU, 0x00000000U, | 878 | 0x03FF03FFU, 0xFFFF3FFFU, 0x3FFFFFFFU, 0x00000FFFU, |
| 879 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFDFFFU, 0xFFFFFFFFU, | 879 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFDFFFU, 0xFFFFFFFFU, |
| 880 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF00FFFFFU, | 880 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF00FFFFFU, |
| 881 | 0xFFFFFFFFU, 0xF8FFFFFFU, 0xFFFFE3FFU, 0xFFFFFFFFU, | 881 | 0xFFFFFFFFU, 0xF8FFFFFFU, 0xFFFFE3FFU, 0xFFFFFFFFU, |
| @@ -887,7 +887,7 @@ u_is_graph = | |||
| 887 | 0x3F3FFFFFU, 0xFFFFFFFFU, 0xAAFF3F3FU, 0x3FFFFFFFU, | 887 | 0x3F3FFFFFU, 0xFFFFFFFFU, 0xAAFF3F3FU, 0x3FFFFFFFU, |
| 888 | 0xFFFFFFFFU, 0xFFDFFFFFU, 0xEFCFFFDFU, 0x7FDCFFFFU, | 888 | 0xFFFFFFFFU, 0xFFDFFFFFU, 0xEFCFFFDFU, 0x7FDCFFFFU, |
| 889 | 0xFFFFF880U, 0xFFFFFCFFU, 0x7FFFFFFFU, 0xFFF3FFDFU, | 889 | 0xFFFFF880U, 0xFFFFFCFFU, 0x7FFFFFFFU, 0xFFF3FFDFU, |
| 890 | 0x1FFF7FFFU, 0xFFFFFFFFU, 0xFFFF0001U, 0x0001FFFFU, | 890 | 0x1FFF7FFFU, 0xFFFFFFFFU, 0xFFFF0003U, 0x0001FFFFU, |
| 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 892 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 892 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 893 | 0xFFFFFFFFU, 0x000003FFU, 0x000007FFU, 0xFFFFFFFFU, | 893 | 0xFFFFFFFFU, 0x000003FFU, 0x000007FFU, 0xFFFFFFFFU, |
| @@ -897,7 +897,7 @@ u_is_graph = | |||
| 897 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 897 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 898 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 898 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 899 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, | 899 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, |
| 900 | 0xFFBFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 900 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 901 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 901 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 902 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFE0FFFFFU, | 902 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFE0FFFFFU, |
| 903 | 0xFFFFFFFFU, 0xFFFF20BFU, 0xFFFFFFFFU, 0x800180FFU, | 903 | 0xFFFFFFFFU, 0xFFFF20BFU, 0xFFFFFFFFU, 0x800180FFU, |
| @@ -921,7 +921,7 @@ u_is_graph = | |||
| 921 | 0xFFFFFFFFU, 0x00000FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 921 | 0xFFFFFFFFU, 0x00000FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 922 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | 922 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, |
| 923 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 923 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 924 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FEB3FFFU, 0xFFFC0000U, | 924 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FFFFFFFU, 0xFFFE0000U, |
| 925 | 0xFFFFFFFFU, 0x03FF1FFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | 925 | 0xFFFFFFFFU, 0x03FF1FFFU, 0xFFFFFFFFU, 0x00FFFFFFU, |
| 926 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFC03FU, 0xFFFFFFFFU, | 926 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFC03FU, 0xFFFFFFFFU, |
| 927 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x800FFFFFU, 0x1FFFFFFFU, | 927 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x800FFFFFU, 0x1FFFFFFFU, |
| @@ -937,11 +937,11 @@ u_is_graph = | |||
| 937 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF3FFFU, | 937 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF3FFFU, |
| 938 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00000000U, | 938 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 939 | 0xE0F8007FU, 0x5F7FFFFFU, 0xFFFFFFDBU, 0xFFFFFFFFU, | 939 | 0xE0F8007FU, 0x5F7FFFFFU, 0xFFFFFFDBU, 0xFFFFFFFFU, |
| 940 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFF80007U, 0xFFFFFFFFU, | ||
| 941 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 940 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 942 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 941 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 943 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 942 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 944 | 0xFFFCFFFFU, 0xFFFFFFFFU, 0x000080FFU, 0xFFFF0000U, | 943 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 944 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, 0xFFFF0000U, | ||
| 945 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0xFFDF0F7FU, | 945 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0xFFDF0F7FU, |
| 946 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x9FFFFFFFU, | 946 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x9FFFFFFFU, |
| 947 | 0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 947 | 0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -964,7 +964,7 @@ u_is_graph = | |||
| 964 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, | 964 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, |
| 965 | 0xFFFFFD3FU, 0x91BFFFFFU, 0xFFBFFFFFU, 0xFFFFFFFFU, | 965 | 0xFFFFFD3FU, 0x91BFFFFFU, 0xFFBFFFFFU, 0xFFFFFFFFU, |
| 966 | 0x7FFFFFFFU, 0x0000FF80U, 0x00000000U, 0xF837FFFFU, | 966 | 0x7FFFFFFFU, 0x0000FF80U, 0x00000000U, 0xF837FFFFU, |
| 967 | 0x8FFFFFFFU, 0x83FFFFFFU, 0x00000000U, 0x00000000U, | 967 | 0x8FFFFFFFU, 0x83FFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 968 | 0xFFFFFFFFU, 0xF0FFFFFFU, 0xFFFCFFFFU, 0xFFFFFFFFU, | 968 | 0xFFFFFFFFU, 0xF0FFFFFFU, 0xFFFCFFFFU, 0xFFFFFFFFU, |
| 969 | 0xFEEFF06FU, 0x873FFFFFU, 0x01FF01FFU, 0xFFFFFFFFU, | 969 | 0xFEEFF06FU, 0x873FFFFFU, 0x01FF01FFU, 0xFFFFFFFFU, |
| 970 | 0xFFFFFFFFU, 0x00000000U, 0xFFFFFFFFU, 0x007FF87FU, | 970 | 0xFFFFFFFFU, 0x00000000U, 0xFFFFFFFFU, 0x007FF87FU, |
| @@ -975,7 +975,7 @@ u_is_graph = | |||
| 975 | 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, 0xFFFFFE3FU, | 975 | 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, 0xFFFFFE3FU, |
| 976 | 0x0000C03FU, 0x00000000U, 0x00000000U, 0x00000000U, | 976 | 0x0000C03FU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 977 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, | 977 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, |
| 978 | 0xFFFFFFFFU, 0x00033BFFU, 0x0000001CU, 0xF0000000U, | 978 | 0xFFFFFFFFU, 0x00033BFFU, 0x01FF00FCU, 0xFC000000U, |
| 979 | 0xFFFFFFFFU, 0xFFFF00FFU, 0x03FFFFFFU, 0xFFFF0000U, | 979 | 0xFFFFFFFFU, 0xFFFF00FFU, 0x03FFFFFFU, 0xFFFF0000U, |
| 980 | 0x000003FFU, 0xFFFF0000U, 0x00000FFFU, 0x007FFFFFU, | 980 | 0x000003FFU, 0xFFFF0000U, 0x00000FFFU, 0x007FFFFFU, |
| 981 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFC3FFFU, 0x803FFFFFU, | 981 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFC3FFFU, 0x803FFFFFU, |
| @@ -1000,12 +1000,12 @@ u_is_graph = | |||
| 1000 | 0x00000000U, 0xFFFFFCFFU, 0xFCFFFFFFU, 0x0000001FU, | 1000 | 0x00000000U, 0xFFFFFCFFU, 0xFCFFFFFFU, 0x0000001FU, |
| 1001 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF00FFU, 0xFFFFFFFFU, | 1001 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF00FFU, 0xFFFFFFFFU, |
| 1002 | 0xFFFFFFFFU, 0xFFFF0007U, 0xFFFFFFFFU, 0x01FFFFFFU, | 1002 | 0xFFFFFFFFU, 0xFFFF0007U, 0xFFFFFFFFU, 0x01FFFFFFU, |
| 1003 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1003 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x000000FFU, |
| 1004 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF0003U, | 1004 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF0003U, |
| 1005 | 0xFFFFFDFFU, 0xFF7FFFFFU, 0xFFFF003FU, 0xFFFF1FFFU, | 1005 | 0xFFFFFDFFU, 0xFF7FFFFFU, 0xFFFF003FU, 0xFFFF1FFFU, |
| 1006 | 0xFFFCFFFFU, 0x007FFEFFU, 0x00000000U, 0x00000000U, | 1006 | 0xFFFCFFFFU, 0x007FFEFFU, 0x00000000U, 0x00000000U, |
| 1007 | 0xFFFFFB7FU, 0xB47FFFFFU, 0x03FF00FFU, 0xFFFFFDBFU, | 1007 | 0xFFFFFB7FU, 0xB47FFFFFU, 0x03FF00FFU, 0xFFFFFDBFU, |
| 1008 | 0x01FB7FFFU, 0x000003FFU, 0x00000000U, 0x00000000U, | 1008 | 0x01FB7FFFU, 0xFFFF03FFU, 0x0FFFFFFFU, 0x000003FFU, |
| 1009 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1009 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1010 | 0x00000000U, 0x00000000U, 0x00000000U, 0x01FFFFFFU, | 1010 | 0x00000000U, 0x00000000U, 0x00000000U, 0x01FFFFFFU, |
| 1011 | 0xFFFDFFFFU, 0xC7FFFFFFU, 0x07FFFFFFU, 0x00000000U, | 1011 | 0xFFFDFFFFU, 0xC7FFFFFFU, 0x07FFFFFFU, 0x00000000U, |
| @@ -1047,17 +1047,13 @@ u_is_graph = | |||
| 1047 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FFFFFFU, | 1047 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 1048 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1048 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1049 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1049 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1050 | 0x07FFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1050 | 0x07FFFFFFU, 0xF9FFFFFFU, 0x000FFFFFU, 0x00000000U, |
| 1051 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF87FFU, 0xFFFFFFFFU, | 1051 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF87FFU, 0xFFFFFFFFU, |
| 1052 | 0xFFFF80FFU, 0x00000000U, 0x00000000U, 0x0003001FU, | 1052 | 0xFFFF80FFU, 0x00000000U, 0x00000000U, 0x007F001FU, |
| 1053 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1054 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1055 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1056 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | ||
| 1057 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1053 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1058 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, | 1054 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, |
| 1059 | 0x000001FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1055 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1060 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1056 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0007FFFFU, |
| 1061 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1057 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1062 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1058 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1063 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1059 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| @@ -1075,11 +1071,11 @@ u_is_graph = | |||
| 1075 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1071 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1076 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1072 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1077 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1073 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1078 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, | 1074 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FFFFFFFU, |
| 1079 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1075 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1080 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1076 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1081 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1077 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1082 | 0xFFFFFFFFU, 0x000FFFFFU, 0x00000000U, 0x00000000U, | 1078 | 0xFFFFFFFFU, 0xFC0FFFFFU, 0x0001FFFFU, 0x0001FFFFU, |
| 1083 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, | 1079 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, |
| 1084 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, | 1080 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, |
| 1085 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1081 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1119,7 +1115,7 @@ u_is_graph = | |||
| 1119 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1115 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1120 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x87FFFFFFU, | 1116 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x87FFFFFFU, |
| 1121 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1117 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1122 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1118 | 0x00000000U, 0x00000000U, 0x7FFFFFFFU, 0xC03FFFFFU, |
| 1123 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1119 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1124 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, | 1120 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, |
| 1125 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1121 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1143,31 +1139,27 @@ u_is_graph = | |||
| 1143 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1139 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1144 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1140 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1145 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1141 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1146 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF0FFFFFFU, 0x1FFF1FFFU, | 1142 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF1FFFFFFU, 0x1FFF1FFFU, |
| 1147 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF87FFFFFU, | 1143 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1148 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, | 1144 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, |
| 1149 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, | 1145 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, |
| 1150 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x00000003U, 0x00000000U, | 1146 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x01FF0003U, 0x00000000U, |
| 1151 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1147 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1152 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1148 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1153 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU, 0x1FFF3FFFU, | 1149 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, 0x1FFF3FFFU, |
| 1154 | 0xFFFF83FFU, 0xFFFFFFFFU, 0x9FFFC07FU, 0x01FF03FFU, | 1150 | 0xFFFFC7FFU, 0xFFFFFFFFU, 0x9FFFE17FU, 0x01FF87FFU, |
| 1155 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1151 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1156 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, | 1152 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x07FFFFFFU, |
| 1157 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1153 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1158 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, | 1154 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, |
| 1159 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1155 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1160 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1156 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1161 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1162 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1163 | 0xFFFFFFFFU, 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1164 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1165 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1157 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1166 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1158 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1167 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1159 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1168 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1160 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1169 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1161 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1170 | 0xFFFFFFFFU, 0xFFFF0003U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1162 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1171 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1163 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1172 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1164 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1173 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1165 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1186,10 +1178,10 @@ u_is_graph = | |||
| 1186 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1178 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1187 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, | 1179 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, |
| 1188 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1180 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1189 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1181 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 1190 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1182 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1191 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1183 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1192 | 0xFFFFFFFFU, 0x0000FFFFU, 0x00000000U, 0x00000000U, | 1184 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1193 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1185 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1194 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1186 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1195 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1187 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
diff --git a/gl/unictype/ctype_lower.c b/gl/unictype/ctype_lower.c index 99a05e09..b113106f 100644 --- a/gl/unictype/ctype_lower.c +++ b/gl/unictype/ctype_lower.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_lower.h b/gl/unictype/ctype_lower.h index cbf7d26d..aae2e4cc 100644 --- a/gl/unictype/ctype_lower.h +++ b/gl/unictype/ctype_lower.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -338,7 +338,7 @@ u_is_lower = | |||
| 338 | 0x00000000U, 0x00000000U, 0xAAAAAAAAU, 0x00002AAAU, | 338 | 0x00000000U, 0x00000000U, 0xAAAAAAAAU, 0x00002AAAU, |
| 339 | 0x0AAAAAAAU, 0x00000000U, 0x00000000U, 0x00000000U, | 339 | 0x0AAAAAAAU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 340 | 0x00000000U, 0xAAA8AAA8U, 0xAAAAAAAAU, 0x9400AAAAU, | 340 | 0x00000000U, 0xAAA8AAA8U, 0xAAAAAAAAU, 0x9400AAAAU, |
| 341 | 0xAA9A10AAU, 0xAAA002AAU, 0x0A82250AU, 0x00400000U, | 341 | 0xAA9A10AAU, 0xAAA002AAU, 0x0AAAA50AU, 0x00400000U, |
| 342 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 342 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 343 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 343 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 344 | 0x00000000U, 0x00000000U, 0x00080000U, 0xFFFF0000U, | 344 | 0x00000000U, 0x00000000U, 0x00080000U, 0xFFFF0000U, |
| @@ -360,7 +360,7 @@ u_is_lower = | |||
| 360 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 360 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 361 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 361 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 362 | 0x00000000U, 0x00000000U, 0x00000000U, 0xFFFFFFFFU, | 362 | 0x00000000U, 0x00000000U, 0x00000000U, 0xFFFFFFFFU, |
| 363 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 363 | 0x00000000U, 0xF8000000U, 0x000FFFFFU, 0x00000000U, |
| 364 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 364 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 365 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 365 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 366 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 366 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
diff --git a/gl/unictype/ctype_print.c b/gl/unictype/ctype_print.c index 0197d496..f689b0ad 100644 --- a/gl/unictype/ctype_print.c +++ b/gl/unictype/ctype_print.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_print.h b/gl/unictype/ctype_print.h index b7007828..e2c34597 100644 --- a/gl/unictype/ctype_print.h +++ b/gl/unictype/ctype_print.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | int header[1]; | 27 | int header[1]; |
| 28 | int level1[17]; | 28 | int level1[17]; |
| 29 | short level2[6 << 7]; | 29 | short level2[6 << 7]; |
| 30 | unsigned int level3[94 << 4]; | 30 | unsigned int level3[92 << 4]; |
| 31 | } | 31 | } |
| 32 | u_is_print = | 32 | u_is_print = |
| 33 | { | 33 | { |
| @@ -247,10 +247,10 @@ u_is_print = | |||
| 247 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 247 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 248 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 248 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 249 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 249 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 250 | 18 + 768 * sizeof (short) / sizeof (int) + 912, | ||
| 251 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 250 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 252 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 251 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 253 | 18 + 768 * sizeof (short) / sizeof (int) + 928, | 252 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 253 | 18 + 768 * sizeof (short) / sizeof (int) + 912, | ||
| 254 | -1, | 254 | -1, |
| 255 | -1, | 255 | -1, |
| 256 | -1, | 256 | -1, |
| @@ -267,14 +267,14 @@ u_is_print = | |||
| 267 | -1, | 267 | -1, |
| 268 | -1, | 268 | -1, |
| 269 | -1, | 269 | -1, |
| 270 | 18 + 768 * sizeof (short) / sizeof (int) + 928, | ||
| 270 | 18 + 768 * sizeof (short) / sizeof (int) + 944, | 271 | 18 + 768 * sizeof (short) / sizeof (int) + 944, |
| 271 | 18 + 768 * sizeof (short) / sizeof (int) + 960, | 272 | 18 + 768 * sizeof (short) / sizeof (int) + 960, |
| 272 | 18 + 768 * sizeof (short) / sizeof (int) + 976, | ||
| 273 | -1, | 273 | -1, |
| 274 | -1, | 274 | -1, |
| 275 | -1, | 275 | -1, |
| 276 | -1, | 276 | -1, |
| 277 | 18 + 768 * sizeof (short) / sizeof (int) + 992, | 277 | 18 + 768 * sizeof (short) / sizeof (int) + 976, |
| 278 | -1, | 278 | -1, |
| 279 | -1, | 279 | -1, |
| 280 | -1, | 280 | -1, |
| @@ -282,30 +282,30 @@ u_is_print = | |||
| 282 | -1, | 282 | -1, |
| 283 | -1, | 283 | -1, |
| 284 | -1, | 284 | -1, |
| 285 | 18 + 768 * sizeof (short) / sizeof (int) + 992, | ||
| 285 | 18 + 768 * sizeof (short) / sizeof (int) + 1008, | 286 | 18 + 768 * sizeof (short) / sizeof (int) + 1008, |
| 286 | 18 + 768 * sizeof (short) / sizeof (int) + 1024, | 287 | 18 + 768 * sizeof (short) / sizeof (int) + 1024, |
| 287 | 18 + 768 * sizeof (short) / sizeof (int) + 1040, | 288 | 18 + 768 * sizeof (short) / sizeof (int) + 1040, |
| 288 | 18 + 768 * sizeof (short) / sizeof (int) + 1056, | 289 | 18 + 768 * sizeof (short) / sizeof (int) + 1056, |
| 289 | 18 + 768 * sizeof (short) / sizeof (int) + 1072, | 290 | 18 + 768 * sizeof (short) / sizeof (int) + 1072, |
| 290 | 18 + 768 * sizeof (short) / sizeof (int) + 1088, | ||
| 291 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 291 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 292 | 18 + 768 * sizeof (short) / sizeof (int) + 1104, | 292 | 18 + 768 * sizeof (short) / sizeof (int) + 1088, |
| 293 | -1, | 293 | -1, |
| 294 | 18 + 768 * sizeof (short) / sizeof (int) + 1104, | ||
| 294 | 18 + 768 * sizeof (short) / sizeof (int) + 1120, | 295 | 18 + 768 * sizeof (short) / sizeof (int) + 1120, |
| 295 | 18 + 768 * sizeof (short) / sizeof (int) + 1136, | 296 | 18 + 768 * sizeof (short) / sizeof (int) + 1136, |
| 296 | 18 + 768 * sizeof (short) / sizeof (int) + 1152, | 297 | 18 + 768 * sizeof (short) / sizeof (int) + 1152, |
| 297 | 18 + 768 * sizeof (short) / sizeof (int) + 1168, | 298 | 18 + 768 * sizeof (short) / sizeof (int) + 1168, |
| 298 | 18 + 768 * sizeof (short) / sizeof (int) + 1184, | 299 | 18 + 768 * sizeof (short) / sizeof (int) + 1184, |
| 299 | 18 + 768 * sizeof (short) / sizeof (int) + 1200, | ||
| 300 | -1, | 300 | -1, |
| 301 | 18 + 768 * sizeof (short) / sizeof (int) + 1200, | ||
| 301 | 18 + 768 * sizeof (short) / sizeof (int) + 1216, | 302 | 18 + 768 * sizeof (short) / sizeof (int) + 1216, |
| 302 | 18 + 768 * sizeof (short) / sizeof (int) + 1232, | 303 | 18 + 768 * sizeof (short) / sizeof (int) + 1232, |
| 303 | 18 + 768 * sizeof (short) / sizeof (int) + 1248, | 304 | 18 + 768 * sizeof (short) / sizeof (int) + 1248, |
| 304 | 18 + 768 * sizeof (short) / sizeof (int) + 1264, | ||
| 305 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 305 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 306 | 18 + 768 * sizeof (short) / sizeof (int) + 1264, | ||
| 306 | 18 + 768 * sizeof (short) / sizeof (int) + 1280, | 307 | 18 + 768 * sizeof (short) / sizeof (int) + 1280, |
| 307 | 18 + 768 * sizeof (short) / sizeof (int) + 1296, | 308 | 18 + 768 * sizeof (short) / sizeof (int) + 1296, |
| 308 | 18 + 768 * sizeof (short) / sizeof (int) + 1312, | ||
| 309 | -1, | 309 | -1, |
| 310 | -1, | 310 | -1, |
| 311 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 311 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -391,7 +391,7 @@ u_is_print = | |||
| 391 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 391 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 392 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 392 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 393 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 393 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 394 | 18 + 768 * sizeof (short) / sizeof (int) + 1328, | 394 | 18 + 768 * sizeof (short) / sizeof (int) + 1312, |
| 395 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 395 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 396 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 396 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 397 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 397 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -399,9 +399,8 @@ u_is_print = | |||
| 399 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 399 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 400 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 400 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 401 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 401 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 402 | 18 + 768 * sizeof (short) / sizeof (int) + 1344, | ||
| 403 | 18 + 768 * sizeof (short) / sizeof (int) + 1360, | ||
| 404 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 402 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 403 | 18 + 768 * sizeof (short) / sizeof (int) + 1328, | ||
| 405 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 404 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 406 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 405 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 407 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 406 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -411,8 +410,8 @@ u_is_print = | |||
| 411 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 410 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 412 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 411 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 413 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 412 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 414 | 18 + 768 * sizeof (short) / sizeof (int) + 1376, | ||
| 415 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 413 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 414 | 18 + 768 * sizeof (short) / sizeof (int) + 1344, | ||
| 416 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 415 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 417 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 416 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 418 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 417 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -425,15 +424,16 @@ u_is_print = | |||
| 425 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 424 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 426 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 425 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 427 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 426 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 428 | 18 + 768 * sizeof (short) / sizeof (int) + 1392, | ||
| 429 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 427 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 430 | 18 + 768 * sizeof (short) / sizeof (int) + 1408, | 428 | 18 + 768 * sizeof (short) / sizeof (int) + 1360, |
| 429 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | ||
| 430 | 18 + 768 * sizeof (short) / sizeof (int) + 1376, | ||
| 431 | -1, | 431 | -1, |
| 432 | -1, | 432 | -1, |
| 433 | -1, | 433 | -1, |
| 434 | -1, | 434 | -1, |
| 435 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 435 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 436 | 18 + 768 * sizeof (short) / sizeof (int) + 1424, | 436 | 18 + 768 * sizeof (short) / sizeof (int) + 1392, |
| 437 | -1, | 437 | -1, |
| 438 | -1, | 438 | -1, |
| 439 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 439 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -445,7 +445,7 @@ u_is_print = | |||
| 445 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 445 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 446 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 446 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 447 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 447 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 448 | 18 + 768 * sizeof (short) / sizeof (int) + 1440, | 448 | 18 + 768 * sizeof (short) / sizeof (int) + 1408, |
| 449 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 449 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 450 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 450 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 451 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 451 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| @@ -453,16 +453,16 @@ u_is_print = | |||
| 453 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 453 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 454 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 454 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 455 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 455 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 456 | 18 + 768 * sizeof (short) / sizeof (int) + 1456, | 456 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 457 | -1, | 457 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 458 | -1, | 458 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 459 | -1, | 459 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 460 | -1, | 460 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 461 | -1, | 461 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 462 | -1, | 462 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 463 | -1, | 463 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 464 | -1, | 464 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 465 | -1, | 465 | 18 + 768 * sizeof (short) / sizeof (int) + 1424, |
| 466 | -1, | 466 | -1, |
| 467 | -1, | 467 | -1, |
| 468 | -1, | 468 | -1, |
| @@ -564,7 +564,7 @@ u_is_print = | |||
| 564 | -1, | 564 | -1, |
| 565 | -1, | 565 | -1, |
| 566 | -1, | 566 | -1, |
| 567 | 18 + 768 * sizeof (short) / sizeof (int) + 1472, | 567 | 18 + 768 * sizeof (short) / sizeof (int) + 1440, |
| 568 | -1, | 568 | -1, |
| 569 | -1, | 569 | -1, |
| 570 | -1, | 570 | -1, |
| @@ -819,7 +819,7 @@ u_is_print = | |||
| 819 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 819 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 820 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 820 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 821 | 18 + 768 * sizeof (short) / sizeof (int) + 160, | 821 | 18 + 768 * sizeof (short) / sizeof (int) + 160, |
| 822 | 18 + 768 * sizeof (short) / sizeof (int) + 1488 | 822 | 18 + 768 * sizeof (short) / sizeof (int) + 1456 |
| 823 | }, | 823 | }, |
| 824 | { | 824 | { |
| 825 | 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, | 825 | 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, |
| @@ -839,15 +839,15 @@ u_is_print = | |||
| 839 | 0xFFFFBFFFU, 0xFFFFFFFFU, 0xFFFFE7FFU, 0xFFFFFFFFU, | 839 | 0xFFFFBFFFU, 0xFFFFFFFFU, 0xFFFFE7FFU, 0xFFFFFFFFU, |
| 840 | 0xFFFFFFFFU, 0x0003FFFFU, 0xFFFFFFFFU, 0xE7FFFFFFU, | 840 | 0xFFFFFFFFU, 0x0003FFFFU, 0xFFFFFFFFU, 0xE7FFFFFFU, |
| 841 | 0xFFFFFFFFU, 0x7FFF3FFFU, 0x4FFFFFFFU, 0xFFFF07FFU, | 841 | 0xFFFFFFFFU, 0x7FFF3FFFU, 0x4FFFFFFFU, 0xFFFF07FFU, |
| 842 | 0xFF837FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 842 | 0xFF83FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 843 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 843 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 844 | 0xFFF99FEFU, 0xF3C5FDFFU, 0xB080799FU, 0x7FFFFFCFU, | 844 | 0xFFF99FEFU, 0xF3C5FDFFU, 0xB080799FU, 0x7FFFFFCFU, |
| 845 | 0xFFF987EEU, 0xD36DFDFFU, 0x5E023987U, 0x007FFFC0U, | 845 | 0xFFF987EEU, 0xD36DFDFFU, 0x5E023987U, 0x007FFFC0U, |
| 846 | 0xFFFBBFEEU, 0xF3EDFDFFU, 0x00013BBFU, 0xFE03FFCFU, | 846 | 0xFFFBBFEEU, 0xF3EDFDFFU, 0x00013BBFU, 0xFE03FFCFU, |
| 847 | 0xFFF99FEEU, 0xF3EDFDFFU, 0xB0E0399FU, 0x00FFFFCFU, | 847 | 0xFFF99FEEU, 0xF3EDFDFFU, 0xB0E0399FU, 0x00FFFFCFU, |
| 848 | 0xD63DC7ECU, 0xC3FFC718U, 0x00813DC7U, 0x07FFFFC0U, | 848 | 0xD63DC7ECU, 0xC3FFC718U, 0x00813DC7U, 0x07FFFFC0U, |
| 849 | 0xFFFDDFFFU, 0xF3FFFDFFU, 0x27603DDFU, 0xFF80FFCFU, | 849 | 0xFFFDDFFFU, 0xF3FFFDFFU, 0x37603DDFU, 0xFF80FFCFU, |
| 850 | 0xFFFDDFFFU, 0xF3EFFDFFU, 0x60603DDFU, 0x000EFFCFU, | 850 | 0xFFFDDFFFU, 0xF3EFFDFFU, 0x70603DDFU, 0x000EFFCFU, |
| 851 | 0xFFFDDFFFU, 0xFFFFFFFFU, 0xFFF0FDDFU, 0xFFFFFFCFU, | 851 | 0xFFFDDFFFU, 0xFFFFFFFFU, 0xFFF0FDDFU, 0xFFFFFFCFU, |
| 852 | 0xFC7FFFEEU, 0x2FFBFFFFU, 0xFF5F847FU, 0x001CFFC0U, | 852 | 0xFC7FFFEEU, 0x2FFBFFFFU, 0xFF5F847FU, 0x001CFFC0U, |
| 853 | 0xFFFFFFFEU, 0x87FFFFFFU, 0x0FFFFFFFU, 0x00000000U, | 853 | 0xFFFFFFFEU, 0x87FFFFFFU, 0x0FFFFFFFU, 0x00000000U, |
| @@ -875,7 +875,7 @@ u_is_print = | |||
| 875 | 0x7FFFFFFFU, 0x0FFF0FFFU, 0xFFFFFFF1U, 0x001F3FFFU, | 875 | 0x7FFFFFFFU, 0x0FFF0FFFU, 0xFFFFFFF1U, 0x001F3FFFU, |
| 876 | 0xFFFFFFFFU, 0xFFFF0FFFU, 0xC7FF03FFU, 0xFFFFFFFFU, | 876 | 0xFFFFFFFFU, 0xFFFF0FFFU, 0xC7FF03FFU, 0xFFFFFFFFU, |
| 877 | 0xCFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, 0x9FFFFFFFU, | 877 | 0xCFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU, 0x9FFFFFFFU, |
| 878 | 0x03FF03FFU, 0xFFFF3FFFU, 0x00007FFFU, 0x00000000U, | 878 | 0x03FF03FFU, 0xFFFF3FFFU, 0x3FFFFFFFU, 0x00000FFFU, |
| 879 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFDFFFU, 0xFFFFFFFFU, | 879 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFDFFFU, 0xFFFFFFFFU, |
| 880 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF00FFFFFU, | 880 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF00FFFFFU, |
| 881 | 0xFFFFFFFFU, 0xF8FFFFFFU, 0xFFFFE3FFU, 0xFFFFFFFFU, | 881 | 0xFFFFFFFFU, 0xF8FFFFFFU, 0xFFFFE3FFU, 0xFFFFFFFFU, |
| @@ -887,7 +887,7 @@ u_is_print = | |||
| 887 | 0x3F3FFFFFU, 0xFFFFFFFFU, 0xAAFF3F3FU, 0x3FFFFFFFU, | 887 | 0x3F3FFFFFU, 0xFFFFFFFFU, 0xAAFF3F3FU, 0x3FFFFFFFU, |
| 888 | 0xFFFFFFFFU, 0xFFDFFFFFU, 0xEFCFFFDFU, 0x7FDCFFFFU, | 888 | 0xFFFFFFFFU, 0xFFDFFFFFU, 0xEFCFFFDFU, 0x7FDCFFFFU, |
| 889 | 0xFFFFFFFFU, 0xFFFFFCFFU, 0xFFFFFFFFU, 0xFFF3FFDFU, | 889 | 0xFFFFFFFFU, 0xFFFFFCFFU, 0xFFFFFFFFU, 0xFFF3FFDFU, |
| 890 | 0x1FFF7FFFU, 0xFFFFFFFFU, 0xFFFF0001U, 0x0001FFFFU, | 890 | 0x1FFF7FFFU, 0xFFFFFFFFU, 0xFFFF0003U, 0x0001FFFFU, |
| 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 891 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 892 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 892 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 893 | 0xFFFFFFFFU, 0x000003FFU, 0x000007FFU, 0xFFFFFFFFU, | 893 | 0xFFFFFFFFU, 0x000003FFU, 0x000007FFU, 0xFFFFFFFFU, |
| @@ -897,7 +897,7 @@ u_is_print = | |||
| 897 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 897 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 898 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 898 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 899 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, | 899 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, |
| 900 | 0xFFBFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 900 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 901 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 901 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 902 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFE0FFFFFU, | 902 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFE0FFFFFU, |
| 903 | 0xFFFFFFFFU, 0xFFFF20BFU, 0xFFFFFFFFU, 0x800180FFU, | 903 | 0xFFFFFFFFU, 0xFFFF20BFU, 0xFFFFFFFFU, 0x800180FFU, |
| @@ -921,7 +921,7 @@ u_is_print = | |||
| 921 | 0xFFFFFFFFU, 0x00000FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 921 | 0xFFFFFFFFU, 0x00000FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 922 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | 922 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, |
| 923 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 923 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 924 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FEB3FFFU, 0xFFFC0000U, | 924 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FFFFFFFU, 0xFFFE0000U, |
| 925 | 0xFFFFFFFFU, 0x03FF1FFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | 925 | 0xFFFFFFFFU, 0x03FF1FFFU, 0xFFFFFFFFU, 0x00FFFFFFU, |
| 926 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFC03FU, 0xFFFFFFFFU, | 926 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFC03FU, 0xFFFFFFFFU, |
| 927 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x800FFFFFU, 0x1FFFFFFFU, | 927 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x800FFFFFU, 0x1FFFFFFFU, |
| @@ -937,11 +937,11 @@ u_is_print = | |||
| 937 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF3FFFU, | 937 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF3FFFU, |
| 938 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00000000U, | 938 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 939 | 0xE0F8007FU, 0x5F7FFFFFU, 0xFFFFFFDBU, 0xFFFFFFFFU, | 939 | 0xE0F8007FU, 0x5F7FFFFFU, 0xFFFFFFDBU, 0xFFFFFFFFU, |
| 940 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFF80007U, 0xFFFFFFFFU, | ||
| 941 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 940 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 942 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 941 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 943 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 942 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 944 | 0xFFFCFFFFU, 0xFFFFFFFFU, 0x000080FFU, 0xFFFF0000U, | 943 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 944 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, 0xFFFF0000U, | ||
| 945 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0xFFDF0F7FU, | 945 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0xFFDF0F7FU, |
| 946 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x9FFFFFFFU, | 946 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x9FFFFFFFU, |
| 947 | 0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 947 | 0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -964,7 +964,7 @@ u_is_print = | |||
| 964 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, | 964 | 0xFFFFFFBFU, 0x07FDFFFFU, 0x00000000U, 0x00000000U, |
| 965 | 0xFFFFFD3FU, 0x91BFFFFFU, 0xFFBFFFFFU, 0xFFFFFFFFU, | 965 | 0xFFFFFD3FU, 0x91BFFFFFU, 0xFFBFFFFFU, 0xFFFFFFFFU, |
| 966 | 0x7FFFFFFFU, 0x0000FF80U, 0x00000000U, 0xF837FFFFU, | 966 | 0x7FFFFFFFU, 0x0000FF80U, 0x00000000U, 0xF837FFFFU, |
| 967 | 0x8FFFFFFFU, 0x83FFFFFFU, 0x00000000U, 0x00000000U, | 967 | 0x8FFFFFFFU, 0x83FFFFFFU, 0x03FFFFFFU, 0x00000000U, |
| 968 | 0xFFFFFFFFU, 0xF0FFFFFFU, 0xFFFCFFFFU, 0xFFFFFFFFU, | 968 | 0xFFFFFFFFU, 0xF0FFFFFFU, 0xFFFCFFFFU, 0xFFFFFFFFU, |
| 969 | 0xFEEFF06FU, 0x873FFFFFU, 0x01FF01FFU, 0xFFFFFFFFU, | 969 | 0xFEEFF06FU, 0x873FFFFFU, 0x01FF01FFU, 0xFFFFFFFFU, |
| 970 | 0xFFFFFFFFU, 0x00000000U, 0xFFFFFFFFU, 0x007FF87FU, | 970 | 0xFFFFFFFFU, 0x00000000U, 0xFFFFFFFFU, 0x007FF87FU, |
| @@ -975,7 +975,7 @@ u_is_print = | |||
| 975 | 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, 0xFFFFFE3FU, | 975 | 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, 0xFFFFFE3FU, |
| 976 | 0x0000C03FU, 0x00000000U, 0x00000000U, 0x00000000U, | 976 | 0x0000C03FU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 977 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, | 977 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, |
| 978 | 0xFFFFFFFFU, 0x00033BFFU, 0x0000001CU, 0xF0000000U, | 978 | 0xFFFFFFFFU, 0x00033BFFU, 0x01FF00FCU, 0xFC000000U, |
| 979 | 0xFFFFFFFFU, 0xFFFF00FFU, 0x03FFFFFFU, 0xFFFF0000U, | 979 | 0xFFFFFFFFU, 0xFFFF00FFU, 0x03FFFFFFU, 0xFFFF0000U, |
| 980 | 0x000003FFU, 0xFFFF0000U, 0x00000FFFU, 0x007FFFFFU, | 980 | 0x000003FFU, 0xFFFF0000U, 0x00000FFFU, 0x007FFFFFU, |
| 981 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFC3FFFU, 0x803FFFFFU, | 981 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFC3FFFU, 0x803FFFFFU, |
| @@ -1000,12 +1000,12 @@ u_is_print = | |||
| 1000 | 0x00000000U, 0xFFFFFCFFU, 0xFCFFFFFFU, 0x0000001FU, | 1000 | 0x00000000U, 0xFFFFFCFFU, 0xFCFFFFFFU, 0x0000001FU, |
| 1001 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF00FFU, 0xFFFFFFFFU, | 1001 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF00FFU, 0xFFFFFFFFU, |
| 1002 | 0xFFFFFFFFU, 0xFFFF0007U, 0xFFFFFFFFU, 0x01FFFFFFU, | 1002 | 0xFFFFFFFFU, 0xFFFF0007U, 0xFFFFFFFFU, 0x01FFFFFFU, |
| 1003 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1003 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x000000FFU, |
| 1004 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF0003U, | 1004 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FF0003U, |
| 1005 | 0xFFFFFDFFU, 0xFF7FFFFFU, 0xFFFF003FU, 0xFFFF1FFFU, | 1005 | 0xFFFFFDFFU, 0xFF7FFFFFU, 0xFFFF003FU, 0xFFFF1FFFU, |
| 1006 | 0xFFFCFFFFU, 0x007FFEFFU, 0x00000000U, 0x00000000U, | 1006 | 0xFFFCFFFFU, 0x007FFEFFU, 0x00000000U, 0x00000000U, |
| 1007 | 0xFFFFFB7FU, 0xB47FFFFFU, 0x03FF00FFU, 0xFFFFFDBFU, | 1007 | 0xFFFFFB7FU, 0xB47FFFFFU, 0x03FF00FFU, 0xFFFFFDBFU, |
| 1008 | 0x01FB7FFFU, 0x000003FFU, 0x00000000U, 0x00000000U, | 1008 | 0x01FB7FFFU, 0xFFFF03FFU, 0x0FFFFFFFU, 0x000003FFU, |
| 1009 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1009 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1010 | 0x00000000U, 0x00000000U, 0x00000000U, 0x01FFFFFFU, | 1010 | 0x00000000U, 0x00000000U, 0x00000000U, 0x01FFFFFFU, |
| 1011 | 0xFFFDFFFFU, 0xC7FFFFFFU, 0x07FFFFFFU, 0x00000000U, | 1011 | 0xFFFDFFFFU, 0xC7FFFFFFU, 0x07FFFFFFU, 0x00000000U, |
| @@ -1047,17 +1047,13 @@ u_is_print = | |||
| 1047 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FFFFFFU, | 1047 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 1048 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1048 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1049 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1049 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1050 | 0x07FFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1050 | 0x07FFFFFFU, 0xF9FFFFFFU, 0x000FFFFFU, 0x00000000U, |
| 1051 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF87FFU, 0xFFFFFFFFU, | 1051 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF87FFU, 0xFFFFFFFFU, |
| 1052 | 0xFFFF80FFU, 0x00000000U, 0x00000000U, 0x0003001FU, | 1052 | 0xFFFF80FFU, 0x00000000U, 0x00000000U, 0x007F001FU, |
| 1053 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1054 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1055 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1056 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, | ||
| 1057 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1053 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1058 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, | 1054 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x80000000U, |
| 1059 | 0x000001FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 1055 | 0x7FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1060 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1056 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0007FFFFU, |
| 1061 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1057 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1062 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1058 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1063 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1059 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| @@ -1075,11 +1071,11 @@ u_is_print = | |||
| 1075 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1071 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1076 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1072 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1077 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1073 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1078 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, | 1074 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x1FFFFFFFU, |
| 1079 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1075 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1080 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1076 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1081 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1077 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1082 | 0xFFFFFFFFU, 0x000FFFFFU, 0x00000000U, 0x00000000U, | 1078 | 0xFFFFFFFFU, 0xFC0FFFFFU, 0x0001FFFFU, 0x0001FFFFU, |
| 1083 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, | 1079 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, |
| 1084 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, | 1080 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, |
| 1085 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1081 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1119,7 +1115,7 @@ u_is_print = | |||
| 1119 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1115 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1120 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x87FFFFFFU, | 1116 | 0x00000000U, 0x00000000U, 0xFFFF0000U, 0x87FFFFFFU, |
| 1121 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1117 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1122 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1118 | 0x00000000U, 0x00000000U, 0x7FFFFFFFU, 0xC03FFFFFU, |
| 1123 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1119 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1124 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, | 1120 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFF6F7FU, |
| 1125 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1121 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1143,31 +1139,27 @@ u_is_print = | |||
| 1143 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1139 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1144 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1140 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1145 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1141 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1146 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF0FFFFFFU, 0x1FFF1FFFU, | 1142 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF1FFFFFFU, 0x1FFF1FFFU, |
| 1147 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF87FFFFFU, | 1143 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1148 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, | 1144 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, |
| 1149 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, | 1145 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, |
| 1150 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x00000003U, 0x00000000U, | 1146 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x01FF0003U, 0x00000000U, |
| 1151 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1147 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1152 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1148 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1153 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU, 0x1FFF3FFFU, | 1149 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, 0x1FFF3FFFU, |
| 1154 | 0xFFFF83FFU, 0xFFFFFFFFU, 0x9FFFC07FU, 0x01FF03FFU, | 1150 | 0xFFFFC7FFU, 0xFFFFFFFFU, 0x9FFFE17FU, 0x01FF87FFU, |
| 1155 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1151 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1156 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, | 1152 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x07FFFFFFU, |
| 1157 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1153 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1158 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, | 1154 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000000U, |
| 1159 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1155 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1160 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1156 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1161 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1162 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1163 | 0xFFFFFFFFU, 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1164 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | ||
| 1165 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1157 | 0x3FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1166 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1158 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1167 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1159 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1168 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1160 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1169 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1161 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1170 | 0xFFFFFFFFU, 0xFFFF0003U, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1162 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1171 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1163 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1172 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1164 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1173 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1165 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -1186,10 +1178,10 @@ u_is_print = | |||
| 1186 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1178 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1187 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, | 1179 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF07FFU, 0xFFFFFFFFU, |
| 1188 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1180 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1189 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1181 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, |
| 1190 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1182 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1191 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1183 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1192 | 0xFFFFFFFFU, 0x0000FFFFU, 0x00000000U, 0x00000000U, | 1184 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1193 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1185 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 1194 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 1186 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 1195 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 1187 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
diff --git a/gl/unictype/ctype_punct.c b/gl/unictype/ctype_punct.c index f2d647de..3c30ba70 100644 --- a/gl/unictype/ctype_punct.c +++ b/gl/unictype/ctype_punct.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_punct.h b/gl/unictype/ctype_punct.h index cb252114..28fc905e 100644 --- a/gl/unictype/ctype_punct.h +++ b/gl/unictype/ctype_punct.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -27,7 +27,7 @@ struct | |||
| 27 | int header[1]; | 27 | int header[1]; |
| 28 | int level1[17]; | 28 | int level1[17]; |
| 29 | short level2[4 << 7]; | 29 | short level2[4 << 7]; |
| 30 | unsigned int level3[75 << 4]; | 30 | unsigned int level3[76 << 4]; |
| 31 | } | 31 | } |
| 32 | u_is_punct = | 32 | u_is_punct = |
| 33 | { | 33 | { |
| @@ -295,20 +295,20 @@ u_is_punct = | |||
| 295 | 18 + 512 * sizeof (short) / sizeof (int) + 992, | 295 | 18 + 512 * sizeof (short) / sizeof (int) + 992, |
| 296 | 18 + 512 * sizeof (short) / sizeof (int) + 1008, | 296 | 18 + 512 * sizeof (short) / sizeof (int) + 1008, |
| 297 | 18 + 512 * sizeof (short) / sizeof (int) + 1024, | 297 | 18 + 512 * sizeof (short) / sizeof (int) + 1024, |
| 298 | -1, | ||
| 299 | 18 + 512 * sizeof (short) / sizeof (int) + 1040, | 298 | 18 + 512 * sizeof (short) / sizeof (int) + 1040, |
| 300 | -1, | ||
| 301 | 18 + 512 * sizeof (short) / sizeof (int) + 1056, | 299 | 18 + 512 * sizeof (short) / sizeof (int) + 1056, |
| 300 | -1, | ||
| 302 | 18 + 512 * sizeof (short) / sizeof (int) + 1072, | 301 | 18 + 512 * sizeof (short) / sizeof (int) + 1072, |
| 303 | 18 + 512 * sizeof (short) / sizeof (int) + 1088, | 302 | 18 + 512 * sizeof (short) / sizeof (int) + 1088, |
| 304 | 18 + 512 * sizeof (short) / sizeof (int) + 1104, | 303 | 18 + 512 * sizeof (short) / sizeof (int) + 1104, |
| 305 | 18 + 512 * sizeof (short) / sizeof (int) + 272, | ||
| 306 | 18 + 512 * sizeof (short) / sizeof (int) + 1120, | 304 | 18 + 512 * sizeof (short) / sizeof (int) + 1120, |
| 305 | 18 + 512 * sizeof (short) / sizeof (int) + 272, | ||
| 307 | 18 + 512 * sizeof (short) / sizeof (int) + 1136, | 306 | 18 + 512 * sizeof (short) / sizeof (int) + 1136, |
| 308 | 18 + 512 * sizeof (short) / sizeof (int) + 1152, | 307 | 18 + 512 * sizeof (short) / sizeof (int) + 1152, |
| 308 | 18 + 512 * sizeof (short) / sizeof (int) + 1168, | ||
| 309 | -1, | 309 | -1, |
| 310 | -1, | 310 | -1, |
| 311 | 18 + 512 * sizeof (short) / sizeof (int) + 1168, | 311 | 18 + 512 * sizeof (short) / sizeof (int) + 1184, |
| 312 | -1, | 312 | -1, |
| 313 | -1, | 313 | -1, |
| 314 | -1, | 314 | -1, |
| @@ -563,7 +563,7 @@ u_is_punct = | |||
| 563 | 18 + 512 * sizeof (short) / sizeof (int) + 272, | 563 | 18 + 512 * sizeof (short) / sizeof (int) + 272, |
| 564 | 18 + 512 * sizeof (short) / sizeof (int) + 272, | 564 | 18 + 512 * sizeof (short) / sizeof (int) + 272, |
| 565 | 18 + 512 * sizeof (short) / sizeof (int) + 272, | 565 | 18 + 512 * sizeof (short) / sizeof (int) + 272, |
| 566 | 18 + 512 * sizeof (short) / sizeof (int) + 1184 | 566 | 18 + 512 * sizeof (short) / sizeof (int) + 1200 |
| 567 | }, | 567 | }, |
| 568 | { | 568 | { |
| 569 | 0x00000000U, 0xFC00FFFEU, 0xF8000001U, 0x78000001U, | 569 | 0x00000000U, 0xFC00FFFEU, 0xF8000001U, 0x78000001U, |
| @@ -619,7 +619,7 @@ u_is_punct = | |||
| 619 | 0x00000000U, 0x0FFF0FFFU, 0x00000031U, 0x00000000U, | 619 | 0x00000000U, 0x0FFF0FFFU, 0x00000031U, 0x00000000U, |
| 620 | 0x00000000U, 0x00000000U, 0xC4000000U, 0xFFFFFFFFU, | 620 | 0x00000000U, 0x00000000U, 0xC4000000U, 0xFFFFFFFFU, |
| 621 | 0xCF800000U, 0x00000000U, 0x7FE00000U, 0x9FFFFFFFU, | 621 | 0xCF800000U, 0x00000000U, 0x7FE00000U, 0x9FFFFFFFU, |
| 622 | 0x00000000U, 0xFFFF3F7FU, 0x00007FFFU, 0x00000000U, | 622 | 0x00000000U, 0xFFFF3F7FU, 0x3FFFFFFFU, 0x00000FFFU, |
| 623 | 0x0000001FU, 0xFFF00000U, 0xFC00C01FU, 0xFFFFFFFFU, | 623 | 0x0000001FU, 0xFFF00000U, 0xFC00C01FU, 0xFFFFFFFFU, |
| 624 | 0x00000007U, 0x00003FFEU, 0x00000000U, 0xF00FFFC0U, | 624 | 0x00000007U, 0x00003FFEU, 0x00000000U, 0xF00FFFC0U, |
| 625 | 0x00000000U, 0xF8FFFFF0U, 0x00000000U, 0xC0000000U, | 625 | 0x00000000U, 0xF8FFFFF0U, 0x00000000U, 0xC0000000U, |
| @@ -631,7 +631,7 @@ u_is_punct = | |||
| 631 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 631 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 632 | 0x00000000U, 0xA0000000U, 0xE000E003U, 0x6000E000U, | 632 | 0x00000000U, 0xA0000000U, 0xE000E003U, 0x6000E000U, |
| 633 | 0xFFFFF880U, 0xFFFFFCFFU, 0x7FFFFFFFU, 0x7FF1FFDFU, | 633 | 0xFFFFF880U, 0xFFFFFCFFU, 0x7FFFFFFFU, 0x7FF1FFDFU, |
| 634 | 0x00007FFFU, 0xFFFFFFFFU, 0xFFFF0001U, 0x0001FFFFU, | 634 | 0x00007FFFU, 0xFFFFFFFFU, 0xFFFF0003U, 0x0001FFFFU, |
| 635 | 0xC1D0037BU, 0x0C0040AFU, 0xFFFFBC1FU, 0x00000000U, | 635 | 0xC1D0037BU, 0x0C0040AFU, 0xFFFFBC1FU, 0x00000000U, |
| 636 | 0xFFFF0E00U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 636 | 0xFFFF0E00U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 637 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 637 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -645,7 +645,7 @@ u_is_punct = | |||
| 645 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 645 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 646 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 646 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 647 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, | 647 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFCFFFFFU, |
| 648 | 0xFFBFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 648 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 649 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 649 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 650 | 0x00000000U, 0x00000000U, 0x00000000U, 0xFE0387E0U, | 650 | 0x00000000U, 0x00000000U, 0x00000000U, 0xFE0387E0U, |
| 651 | 0x00000000U, 0x00000000U, 0x00000000U, 0x80010000U, | 651 | 0x00000000U, 0x00000000U, 0x00000000U, 0x80010000U, |
| @@ -689,11 +689,11 @@ u_is_punct = | |||
| 689 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 689 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 690 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 690 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 691 | 0x40000000U, 0x00000200U, 0x00000000U, 0x00000000U, | 691 | 0x40000000U, 0x00000200U, 0x00000000U, 0x00000000U, |
| 692 | 0x00000000U, 0xFFFC0000U, 0x00000007U, 0x00000000U, | 692 | 0x00000000U, 0xFFFC0000U, 0x0007FFFFU, 0x00000000U, |
| 693 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 693 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 694 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 694 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 695 | 0x00000000U, 0xC0000000U, 0x0000FFFFU, 0x00000000U, | 695 | 0x00000000U, 0xC0000000U, 0x0000FFFFU, 0x00000000U, |
| 696 | 0x00000000U, 0x00000000U, 0x00008000U, 0xF0000000U, | 696 | 0x00030000U, 0x00000000U, 0x0000FF00U, 0xF0000000U, |
| 697 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0x00000F7FU, | 697 | 0x03FFFFFFU, 0xFFFFFFFFU, 0xFFF7FFFFU, 0x00000F7FU, |
| 698 | 0x00000000U, 0x00000000U, 0x00000000U, 0x80000000U, | 698 | 0x00000000U, 0x00000000U, 0x00000000U, 0x80000000U, |
| 699 | 0xFC00FFFEU, 0xF8000001U, 0xF8000001U, 0x0000003FU, | 699 | 0xFC00FFFEU, 0xF8000001U, 0xF8000001U, 0x0000003FU, |
| @@ -723,7 +723,7 @@ u_is_punct = | |||
| 723 | 0x00000000U, 0x000000F0U, 0x00000000U, 0x00007E00U, | 723 | 0x00000000U, 0x000000F0U, 0x00000000U, 0x00007E00U, |
| 724 | 0x0000C000U, 0x00000000U, 0x00000000U, 0x00000000U, | 724 | 0x0000C000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 725 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, | 725 | 0x00000000U, 0x00000000U, 0x00000000U, 0x7FFFFFFFU, |
| 726 | 0x00000000U, 0x00003800U, 0x00000000U, 0xF0000000U, | 726 | 0x00000000U, 0x00003800U, 0x01FF0000U, 0xFC000000U, |
| 727 | 0xE0000000U, 0x0000007FU, 0x03FFFFC0U, 0x00000000U, | 727 | 0xE0000000U, 0x0000007FU, 0x03FFFFC0U, 0x00000000U, |
| 728 | 0x000003FCU, 0x00000000U, 0x00000FE0U, 0x00000000U, | 728 | 0x000003FCU, 0x00000000U, 0x00000FE0U, 0x00000000U, |
| 729 | 0x00000007U, 0xFF000000U, 0xFFFC3FFFU, 0x8019003FU, | 729 | 0x00000007U, 0xFF000000U, 0xFFFC3FFFU, 0x8019003FU, |
| @@ -748,7 +748,7 @@ u_is_punct = | |||
| 748 | 0x00000000U, 0x00000000U, 0xFCFE0000U, 0x00000015U, | 748 | 0x00000000U, 0x00000000U, 0xFCFE0000U, 0x00000015U, |
| 749 | 0x000007FEU, 0xFBF80000U, 0x0FFE00FFU, 0x00000000U, | 749 | 0x000007FEU, 0xFBF80000U, 0x0FFE00FFU, 0x00000000U, |
| 750 | 0xDFFFFC00U, 0x00000007U, 0x00000000U, 0x00000000U, | 750 | 0xDFFFFC00U, 0x00000007U, 0x00000000U, 0x00000000U, |
| 751 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x00000000U, | 751 | 0x000003FFU, 0x00000000U, 0x00000000U, 0x000000FFU, |
| 752 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000002U, | 752 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000002U, |
| 753 | 0x00000000U, 0xFF7F8000U, 0xFC00003EU, 0x00031FFFU, | 753 | 0x00000000U, 0xFF7F8000U, 0xFC00003EU, 0x00031FFFU, |
| 754 | 0xFFFC0000U, 0x007FFEFFU, 0x00000000U, 0x00000000U, | 754 | 0xFFFC0000U, 0x007FFEFFU, 0x00000000U, 0x00000000U, |
| @@ -791,11 +791,11 @@ u_is_punct = | |||
| 791 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 791 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 792 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 792 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 793 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 793 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 794 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x00000000U, | 794 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x1C000000U, |
| 795 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 795 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 796 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 796 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 797 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 797 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 798 | 0xFFFFFFFFU, 0x000FFFFFU, 0x00000000U, 0x00000000U, | 798 | 0xFFFFFFFFU, 0xFC0FFFFFU, 0x0001FFFFU, 0x0001FFFFU, |
| 799 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, | 799 | 0xFFFFFFFFU, 0xFFFF3FFFU, 0xFFFF007FU, 0xFFFFFFFFU, |
| 800 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, | 800 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000000FU, 0x00000000U, |
| 801 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 801 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| @@ -827,6 +827,10 @@ u_is_punct = | |||
| 827 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 827 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 828 | 0x00000000U, 0x00000000U, 0x00000000U, 0x8000C000U, | 828 | 0x00000000U, 0x00000000U, 0x00000000U, 0x8000C000U, |
| 829 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 829 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 830 | 0x00000000U, 0x00000000U, 0x00000000U, 0x0020C048U, | ||
| 831 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | ||
| 832 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | ||
| 833 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | ||
| 830 | 0x00000000U, 0x00000000U, 0x007FFF80U, 0x00000000U, | 834 | 0x00000000U, 0x00000000U, 0x007FFF80U, 0x00000000U, |
| 831 | 0x00000000U, 0x00000000U, 0xC00007F0U, 0x00000000U, | 835 | 0x00000000U, 0x00000000U, 0xC00007F0U, 0x00000000U, |
| 832 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 836 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| @@ -847,17 +851,17 @@ u_is_punct = | |||
| 847 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 851 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 848 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 852 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 849 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 853 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 850 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF0FFFFFFU, 0x1FFF1FFFU, | 854 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF1FFFFFFU, 0x1FFF1FFFU, |
| 851 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xF87FFFFFU, | 855 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 852 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, | 856 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x03FFFFFFU, 0x00010FFFU, |
| 853 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, | 857 | 0xFFFF0FFFU, 0xFFFFFFFFU, 0x03FF00FFU, 0xFFFFFFFFU, |
| 854 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x00000003U, 0x00000000U, | 858 | 0xFFFF00FFU, 0x0FFF3FFFU, 0x01FF0003U, 0x00000000U, |
| 855 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 859 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 856 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 860 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 857 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU, 0x1FFF3FFFU, | 861 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00FFFFFFU, 0x1FFF3FFFU, |
| 858 | 0xFFFF83FFU, 0xFFFFFFFFU, 0x9FFFC07FU, 0x01FF03FFU, | 862 | 0xFFFFC7FFU, 0xFFFFFFFFU, 0x9FFFE17FU, 0x01FF87FFU, |
| 859 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 860 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0000FFFFU, | 864 | 0xFFF7FFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x0400FFFFU, |
| 861 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 865 | 0x00000002U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
| 862 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 866 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 863 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, | 867 | 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, |
diff --git a/gl/unictype/ctype_space.c b/gl/unictype/ctype_space.c index 4c032398..ee9ce3fd 100644 --- a/gl/unictype/ctype_space.c +++ b/gl/unictype/ctype_space.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_space.h b/gl/unictype/ctype_space.h index 93ed2467..1a72bd6d 100644 --- a/gl/unictype/ctype_space.h +++ b/gl/unictype/ctype_space.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unictype/ctype_upper.c b/gl/unictype/ctype_upper.c index af2c3fe6..31210804 100644 --- a/gl/unictype/ctype_upper.c +++ b/gl/unictype/ctype_upper.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_upper.h b/gl/unictype/ctype_upper.h index ef527809..f0773306 100644 --- a/gl/unictype/ctype_upper.h +++ b/gl/unictype/ctype_upper.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -338,7 +338,7 @@ u_is_upper = | |||
| 338 | 0x00000000U, 0x00000000U, 0x55555555U, 0x00001555U, | 338 | 0x00000000U, 0x00000000U, 0x55555555U, 0x00001555U, |
| 339 | 0x05555555U, 0x00000000U, 0x00000000U, 0x00000000U, | 339 | 0x05555555U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 340 | 0x00000000U, 0x55545554U, 0x55555555U, 0x6A005555U, | 340 | 0x00000000U, 0x55545554U, 0x55555555U, 0x6A005555U, |
| 341 | 0x55452855U, 0x555F7D55U, 0x15411AF5U, 0x00200000U, | 341 | 0x55452855U, 0x555F7D55U, 0x15555AF5U, 0x00200000U, |
| 342 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 342 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 343 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 343 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 344 | 0x00000000U, 0x07FFFFFEU, 0x00000000U, 0x00000000U, | 344 | 0x00000000U, 0x07FFFFFEU, 0x00000000U, 0x00000000U, |
| @@ -356,7 +356,7 @@ u_is_upper = | |||
| 356 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 356 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 357 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 357 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 358 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x00000000U, | 358 | 0x00000000U, 0x00000000U, 0xFFFFFFFFU, 0x00000000U, |
| 359 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 359 | 0x00000000U, 0x01FFFFFFU, 0x00000000U, 0x00000000U, |
| 360 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 360 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 361 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 361 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
| 362 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, | 362 | 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U, |
diff --git a/gl/unictype/ctype_xdigit.c b/gl/unictype/ctype_xdigit.c index ee4b2ea4..bea31a1b 100644 --- a/gl/unictype/ctype_xdigit.c +++ b/gl/unictype/ctype_xdigit.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ISO C <ctype.h> like properties of Unicode characters. | 1 | /* ISO C <ctype.h> like properties of Unicode characters. |
| 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unictype/ctype_xdigit.h b/gl/unictype/ctype_xdigit.h index c0b2ac05..508c3ed7 100644 --- a/gl/unictype/ctype_xdigit.h +++ b/gl/unictype/ctype_xdigit.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ | 2 | /* ISO C <ctype.h> like properties of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/uninorm.h b/gl/uninorm.h deleted file mode 100644 index f6815c49..00000000 --- a/gl/uninorm.h +++ /dev/null | |||
| @@ -1,256 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Normalization forms (composition and decomposition) of Unicode strings. | ||
| 3 | Copyright (C) 2001-2002, 2009-2025 Free Software Foundation, Inc. | ||
| 4 | Written by Bruno Haible <bruno@clisp.org>, 2009. | ||
| 5 | |||
| 6 | This file is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU Lesser General Public License as | ||
| 8 | published by the Free Software Foundation; either version 2.1 of the | ||
| 9 | License, or (at your option) any later version. | ||
| 10 | |||
| 11 | This file is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU Lesser General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU Lesser General Public License | ||
| 17 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #ifndef _UNINORM_H | ||
| 20 | #define _UNINORM_H | ||
| 21 | |||
| 22 | /* Get size_t. */ | ||
| 23 | #include <stddef.h> | ||
| 24 | |||
| 25 | #include "unitypes.h" | ||
| 26 | |||
| 27 | #if 0 | ||
| 28 | # include <unistring/woe32dll.h> | ||
| 29 | #else | ||
| 30 | # define LIBUNISTRING_DLL_VARIABLE | ||
| 31 | #endif | ||
| 32 | |||
| 33 | |||
| 34 | #ifdef __cplusplus | ||
| 35 | extern "C" { | ||
| 36 | #endif | ||
| 37 | |||
| 38 | |||
| 39 | /* Conventions: | ||
| 40 | |||
| 41 | All functions prefixed with u8_ operate on UTF-8 encoded strings. | ||
| 42 | Their unit is an uint8_t (1 byte). | ||
| 43 | |||
| 44 | All functions prefixed with u16_ operate on UTF-16 encoded strings. | ||
| 45 | Their unit is an uint16_t (a 2-byte word). | ||
| 46 | |||
| 47 | All functions prefixed with u32_ operate on UCS-4 encoded strings. | ||
| 48 | Their unit is an uint32_t (a 4-byte word). | ||
| 49 | |||
| 50 | All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly | ||
| 51 | n units. | ||
| 52 | |||
| 53 | Functions returning a string result take a (resultbuf, lengthp) argument | ||
| 54 | pair. If resultbuf is not NULL and the result fits into *lengthp units, | ||
| 55 | it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly | ||
| 56 | allocated string is returned. In both cases, *lengthp is set to the | ||
| 57 | length (number of units) of the returned string. In case of error, | ||
| 58 | NULL is returned and errno is set. */ | ||
| 59 | |||
| 60 | |||
| 61 | enum | ||
| 62 | { | ||
| 63 | UC_DECOMP_CANONICAL,/* Canonical decomposition. */ | ||
| 64 | UC_DECOMP_FONT, /* <font> A font variant (e.g. a blackletter form). */ | ||
| 65 | UC_DECOMP_NOBREAK, /* <noBreak> A no-break version of a space or hyphen. */ | ||
| 66 | UC_DECOMP_INITIAL, /* <initial> An initial presentation form (Arabic). */ | ||
| 67 | UC_DECOMP_MEDIAL, /* <medial> A medial presentation form (Arabic). */ | ||
| 68 | UC_DECOMP_FINAL, /* <final> A final presentation form (Arabic). */ | ||
| 69 | UC_DECOMP_ISOLATED,/* <isolated> An isolated presentation form (Arabic). */ | ||
| 70 | UC_DECOMP_CIRCLE, /* <circle> An encircled form. */ | ||
| 71 | UC_DECOMP_SUPER, /* <super> A superscript form. */ | ||
| 72 | UC_DECOMP_SUB, /* <sub> A subscript form. */ | ||
| 73 | UC_DECOMP_VERTICAL,/* <vertical> A vertical layout presentation form. */ | ||
| 74 | UC_DECOMP_WIDE, /* <wide> A wide (or zenkaku) compatibility character. */ | ||
| 75 | UC_DECOMP_NARROW, /* <narrow> A narrow (or hankaku) compatibility character. */ | ||
| 76 | UC_DECOMP_SMALL, /* <small> A small variant form (CNS compatibility). */ | ||
| 77 | UC_DECOMP_SQUARE, /* <square> A CJK squared font variant. */ | ||
| 78 | UC_DECOMP_FRACTION,/* <fraction> A vulgar fraction form. */ | ||
| 79 | UC_DECOMP_COMPAT /* <compat> Otherwise unspecified compatibility character. */ | ||
| 80 | }; | ||
| 81 | |||
| 82 | /* Maximum size of decomposition of a single Unicode character. */ | ||
| 83 | #define UC_DECOMPOSITION_MAX_LENGTH 32 | ||
| 84 | |||
| 85 | /* Return the character decomposition mapping of a Unicode character. | ||
| 86 | DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH | ||
| 87 | ucs_t elements. | ||
| 88 | When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are | ||
| 89 | filled and N is returned. Otherwise -1 is returned. */ | ||
| 90 | extern int | ||
| 91 | uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition); | ||
| 92 | |||
| 93 | /* Return the canonical character decomposition mapping of a Unicode character. | ||
| 94 | DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH | ||
| 95 | ucs_t elements. | ||
| 96 | When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is | ||
| 97 | returned. Otherwise -1 is returned. */ | ||
| 98 | extern int | ||
| 99 | uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition); | ||
| 100 | |||
| 101 | |||
| 102 | /* Attempt to combine the Unicode characters uc1, uc2. | ||
| 103 | uc1 is known to have canonical combining class 0. | ||
| 104 | Return the combination of uc1 and uc2, if it exists. | ||
| 105 | Return 0 otherwise. | ||
| 106 | Not all decompositions can be recombined using this function. See the | ||
| 107 | Unicode file CompositionExclusions.txt for details. */ | ||
| 108 | extern ucs4_t | ||
| 109 | uc_composition (ucs4_t uc1, ucs4_t uc2) | ||
| 110 | _UC_ATTRIBUTE_CONST; | ||
| 111 | |||
| 112 | |||
| 113 | /* An object of type uninorm_t denotes a Unicode normalization form. */ | ||
| 114 | struct unicode_normalization_form; | ||
| 115 | typedef const struct unicode_normalization_form *uninorm_t; | ||
| 116 | |||
| 117 | /* UNINORM_NFD: Normalization form D: canonical decomposition. */ | ||
| 118 | extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfd; | ||
| 119 | #define UNINORM_NFD (&uninorm_nfd) | ||
| 120 | |||
| 121 | /* UNINORM_NFC: Normalization form C: canonical decomposition, then | ||
| 122 | canonical composition. */ | ||
| 123 | extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfc; | ||
| 124 | #define UNINORM_NFC (&uninorm_nfc) | ||
| 125 | |||
| 126 | /* UNINORM_NFKD: Normalization form KD: compatibility decomposition. */ | ||
| 127 | extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkd; | ||
| 128 | #define UNINORM_NFKD (&uninorm_nfkd) | ||
| 129 | |||
| 130 | /* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then | ||
| 131 | canonical composition. */ | ||
| 132 | extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkc; | ||
| 133 | #define UNINORM_NFKC (&uninorm_nfkc) | ||
| 134 | |||
| 135 | /* Test whether a normalization form does compatibility decomposition. */ | ||
| 136 | #define uninorm_is_compat_decomposing(nf) \ | ||
| 137 | ((* (const unsigned int *) (nf) >> 0) & 1) | ||
| 138 | |||
| 139 | /* Test whether a normalization form includes canonical composition. */ | ||
| 140 | #define uninorm_is_composing(nf) \ | ||
| 141 | ((* (const unsigned int *) (nf) >> 1) & 1) | ||
| 142 | |||
| 143 | /* Return the decomposing variant of a normalization form. | ||
| 144 | This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ | ||
| 145 | extern uninorm_t | ||
| 146 | uninorm_decomposing_form (uninorm_t nf) | ||
| 147 | _UC_ATTRIBUTE_PURE; | ||
| 148 | |||
| 149 | |||
| 150 | /* Return the specified normalization form of a string. */ | ||
| 151 | extern uint8_t * | ||
| 152 | u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, | ||
| 153 | uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 154 | extern uint16_t * | ||
| 155 | u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, | ||
| 156 | uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 157 | extern uint32_t * | ||
| 158 | u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, | ||
| 159 | uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); | ||
| 160 | |||
| 161 | |||
| 162 | /* Compare S1 and S2, ignoring differences in normalization. | ||
| 163 | NF must be either UNINORM_NFD or UNINORM_NFKD. | ||
| 164 | If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and | ||
| 165 | return 0. Upon failure, return -1 with errno set. */ | ||
| 166 | extern int | ||
| 167 | u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, | ||
| 168 | uninorm_t nf, int *resultp); | ||
| 169 | extern int | ||
| 170 | u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, | ||
| 171 | uninorm_t nf, int *resultp); | ||
| 172 | extern int | ||
| 173 | u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, | ||
| 174 | uninorm_t nf, int *resultp); | ||
| 175 | |||
| 176 | |||
| 177 | /* Converts the string S of length N to a NUL-terminated byte sequence, in such | ||
| 178 | a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is | ||
| 179 | equivalent to comparing S1 and S2 with uN_normcoll(). | ||
| 180 | NF must be either UNINORM_NFC or UNINORM_NFKC. */ | ||
| 181 | extern char * | ||
| 182 | u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, | ||
| 183 | char *resultbuf, size_t *lengthp); | ||
| 184 | extern char * | ||
| 185 | u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, | ||
| 186 | char *resultbuf, size_t *lengthp); | ||
| 187 | extern char * | ||
| 188 | u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, | ||
| 189 | char *resultbuf, size_t *lengthp); | ||
| 190 | |||
| 191 | |||
| 192 | /* Compare S1 and S2, ignoring differences in normalization, using the | ||
| 193 | collation rules of the current locale. | ||
| 194 | NF must be either UNINORM_NFC or UNINORM_NFKC. | ||
| 195 | If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and | ||
| 196 | return 0. Upon failure, return -1 with errno set. */ | ||
| 197 | extern int | ||
| 198 | u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, | ||
| 199 | uninorm_t nf, int *resultp); | ||
| 200 | extern int | ||
| 201 | u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, | ||
| 202 | uninorm_t nf, int *resultp); | ||
| 203 | extern int | ||
| 204 | u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, | ||
| 205 | uninorm_t nf, int *resultp); | ||
| 206 | |||
| 207 | |||
| 208 | /* Normalization of a stream of Unicode characters. | ||
| 209 | |||
| 210 | A "stream of Unicode characters" is essentially a function that accepts an | ||
| 211 | ucs4_t argument repeatedly, optionally combined with a function that | ||
| 212 | "flushes" the stream. */ | ||
| 213 | |||
| 214 | /* Data type of a stream of Unicode characters that normalizes its input | ||
| 215 | according to a given normalization form and passes the normalized character | ||
| 216 | sequence to the encapsulated stream of Unicode characters. */ | ||
| 217 | struct uninorm_filter; | ||
| 218 | |||
| 219 | /* Bring data buffered in the filter to its destination, the encapsulated | ||
| 220 | stream, then close and free the filter. | ||
| 221 | Return 0 if successful, or -1 with errno set upon failure. */ | ||
| 222 | extern int | ||
| 223 | uninorm_filter_free (struct uninorm_filter *filter); | ||
| 224 | |||
| 225 | /* Create and return a normalization filter for Unicode characters. | ||
| 226 | The pair (stream_func, stream_data) is the encapsulated stream. | ||
| 227 | stream_func (stream_data, uc) receives the Unicode character uc | ||
| 228 | and returns 0 if successful, or -1 with errno set upon failure. | ||
| 229 | Return the new filter, or NULL with errno set upon failure. */ | ||
| 230 | extern struct uninorm_filter * | ||
| 231 | uninorm_filter_create (uninorm_t nf, | ||
| 232 | int (*stream_func) (void *stream_data, ucs4_t uc), | ||
| 233 | void *stream_data) | ||
| 234 | _GL_ATTRIBUTE_DEALLOC (uninorm_filter_free, 1); | ||
| 235 | |||
| 236 | /* Stuff a Unicode character into a normalizing filter. | ||
| 237 | Return 0 if successful, or -1 with errno set upon failure. */ | ||
| 238 | extern int | ||
| 239 | uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); | ||
| 240 | |||
| 241 | /* Bring data buffered in the filter to its destination, the encapsulated | ||
| 242 | stream. | ||
| 243 | Return 0 if successful, or -1 with errno set upon failure. | ||
| 244 | Note! If after calling this function, additional characters are written | ||
| 245 | into the filter, the resulting character sequence in the encapsulated stream | ||
| 246 | will not necessarily be normalized. */ | ||
| 247 | extern int | ||
| 248 | uninorm_filter_flush (struct uninorm_filter *filter); | ||
| 249 | |||
| 250 | |||
| 251 | #ifdef __cplusplus | ||
| 252 | } | ||
| 253 | #endif | ||
| 254 | |||
| 255 | |||
| 256 | #endif /* _UNINORM_H */ | ||
diff --git a/gl/uninorm.in.h b/gl/uninorm.in.h index 76ab32b6..8d84f78a 100644 --- a/gl/uninorm.in.h +++ b/gl/uninorm.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Normalization forms (composition and decomposition) of Unicode strings. | 1 | /* Normalization forms (composition and decomposition) of Unicode strings. |
| 2 | Copyright (C) 2001-2002, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2002, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2009. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/unistd.c b/gl/unistd.c index e6625589..414dce9a 100644 --- a/gl/unistd.c +++ b/gl/unistd.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <unistd.h>. | 1 | /* Inline functions for <unistd.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unistd.in.h b/gl/unistd.in.h index 9f057d30..f7e4450c 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for and wrapper around <unistd.h>. | 1 | /* Substitute for and wrapper around <unistd.h>. |
| 2 | Copyright (C) 2003-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -104,15 +104,12 @@ | |||
| 104 | # include <direct.h> | 104 | # include <direct.h> |
| 105 | #endif | 105 | #endif |
| 106 | 106 | ||
| 107 | /* FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Solaris 11.4, and glibc 2.41 | ||
| 108 | do not define O_CLOEXEC in <unistd.h>. */ | ||
| 109 | /* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in | 107 | /* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in |
| 110 | <unistd.h>. */ | 108 | <unistd.h>. */ |
| 111 | /* But avoid namespace pollution on glibc systems. */ | 109 | /* But avoid namespace pollution on glibc systems. */ |
| 112 | #if ! defined O_CLOEXEC \ | 110 | #if ((@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \ |
| 113 | || ((@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \ | 111 | && (defined __CYGWIN__ || defined __ANDROID__) \ |
| 114 | && (defined __CYGWIN__ || defined __ANDROID__) \ | 112 | && ! defined __GLIBC__) |
| 115 | && ! defined __GLIBC__) | ||
| 116 | # include <fcntl.h> | 113 | # include <fcntl.h> |
| 117 | #endif | 114 | #endif |
| 118 | 115 | ||
| @@ -120,10 +117,8 @@ | |||
| 120 | /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in | 117 | /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in |
| 121 | <unistd.h>. */ | 118 | <unistd.h>. */ |
| 122 | /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ | 119 | /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ |
| 123 | /* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is | ||
| 124 | included here. */ | ||
| 125 | /* But avoid namespace pollution on glibc systems. */ | 120 | /* But avoid namespace pollution on glibc systems. */ |
| 126 | #if !defined __GLIBC__ && !defined __osf__ | 121 | #if !defined __GLIBC__ |
| 127 | # define __need_system_stdlib_h | 122 | # define __need_system_stdlib_h |
| 128 | # include <stdlib.h> | 123 | # include <stdlib.h> |
| 129 | # undef __need_system_stdlib_h | 124 | # undef __need_system_stdlib_h |
| @@ -134,10 +129,10 @@ | |||
| 134 | # include <process.h> | 129 | # include <process.h> |
| 135 | #endif | 130 | #endif |
| 136 | 131 | ||
| 137 | /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. | 132 | /* AIX declares getdomainname in <netdb.h>, not in <unistd.h>. |
| 138 | NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ | 133 | NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ |
| 139 | /* But avoid namespace pollution on glibc systems. */ | 134 | /* But avoid namespace pollution on glibc systems. */ |
| 140 | #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ | 135 | #if ((@GNULIB_GETDOMAINNAME@ && defined _AIX) \ |
| 141 | || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ | 136 | || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ |
| 142 | && !defined __GLIBC__ | 137 | && !defined __GLIBC__ |
| 143 | # include <netdb.h> | 138 | # include <netdb.h> |
| @@ -307,7 +302,6 @@ _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); | |||
| 307 | # endif | 302 | # endif |
| 308 | _GL_CXXALIASWARN (access); | 303 | _GL_CXXALIASWARN (access); |
| 309 | #elif defined GNULIB_POSIXCHECK | 304 | #elif defined GNULIB_POSIXCHECK |
| 310 | # undef access | ||
| 311 | # if HAVE_RAW_DECL_ACCESS | 305 | # if HAVE_RAW_DECL_ACCESS |
| 312 | /* The access() function is a security risk. */ | 306 | /* The access() function is a security risk. */ |
| 313 | _GL_WARN_ON_USE (access, "access does not always support X_OK - " | 307 | _GL_WARN_ON_USE (access, "access does not always support X_OK - " |
| @@ -344,7 +338,6 @@ _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); | |||
| 344 | # endif | 338 | # endif |
| 345 | _GL_CXXALIASWARN (chdir); | 339 | _GL_CXXALIASWARN (chdir); |
| 346 | #elif defined GNULIB_POSIXCHECK | 340 | #elif defined GNULIB_POSIXCHECK |
| 347 | # undef chdir | ||
| 348 | # if HAVE_RAW_DECL_CHDIR | 341 | # if HAVE_RAW_DECL_CHDIR |
| 349 | _GL_WARN_ON_USE (chdir, "chdir is not always in <unistd.h> - " | 342 | _GL_WARN_ON_USE (chdir, "chdir is not always in <unistd.h> - " |
| 350 | "use gnulib module chdir for portability"); | 343 | "use gnulib module chdir for portability"); |
| @@ -389,7 +382,6 @@ _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); | |||
| 389 | # endif | 382 | # endif |
| 390 | _GL_CXXALIASWARN (chown); | 383 | _GL_CXXALIASWARN (chown); |
| 391 | #elif defined GNULIB_POSIXCHECK | 384 | #elif defined GNULIB_POSIXCHECK |
| 392 | # undef chown | ||
| 393 | # if HAVE_RAW_DECL_CHOWN | 385 | # if HAVE_RAW_DECL_CHOWN |
| 394 | _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " | 386 | _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " |
| 395 | "doesn't treat a uid or gid of -1 on some systems - " | 387 | "doesn't treat a uid or gid of -1 on some systems - " |
| @@ -423,7 +415,6 @@ _GL_CXXALIASWARN (close); | |||
| 423 | # define close close_used_without_requesting_gnulib_module_close | 415 | # define close close_used_without_requesting_gnulib_module_close |
| 424 | # endif | 416 | # endif |
| 425 | #elif defined GNULIB_POSIXCHECK | 417 | #elif defined GNULIB_POSIXCHECK |
| 426 | # undef close | ||
| 427 | /* Assume close is always declared. */ | 418 | /* Assume close is always declared. */ |
| 428 | _GL_WARN_ON_USE (close, "close does not portably work on sockets - " | 419 | _GL_WARN_ON_USE (close, "close does not portably work on sockets - " |
| 429 | "use gnulib module close for portability"); | 420 | "use gnulib module close for portability"); |
| @@ -470,7 +461,6 @@ _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, | |||
| 470 | _GL_CXXALIASWARN (copy_file_range); | 461 | _GL_CXXALIASWARN (copy_file_range); |
| 471 | # endif | 462 | # endif |
| 472 | #elif defined GNULIB_POSIXCHECK | 463 | #elif defined GNULIB_POSIXCHECK |
| 473 | # undef copy_file_range | ||
| 474 | # if HAVE_RAW_DECL_COPY_FILE_RANGE | 464 | # if HAVE_RAW_DECL_COPY_FILE_RANGE |
| 475 | _GL_WARN_ON_USE (copy_file_range, | 465 | _GL_WARN_ON_USE (copy_file_range, |
| 476 | "copy_file_range is unportable - " | 466 | "copy_file_range is unportable - " |
| @@ -497,7 +487,6 @@ _GL_CXXALIAS_SYS (dup, int, (int oldfd)); | |||
| 497 | # endif | 487 | # endif |
| 498 | _GL_CXXALIASWARN (dup); | 488 | _GL_CXXALIASWARN (dup); |
| 499 | #elif defined GNULIB_POSIXCHECK | 489 | #elif defined GNULIB_POSIXCHECK |
| 500 | # undef dup | ||
| 501 | # if HAVE_RAW_DECL_DUP | 490 | # if HAVE_RAW_DECL_DUP |
| 502 | _GL_WARN_ON_USE (dup, "dup is unportable - " | 491 | _GL_WARN_ON_USE (dup, "dup is unportable - " |
| 503 | "use gnulib module dup for portability"); | 492 | "use gnulib module dup for portability"); |
| @@ -542,7 +531,6 @@ _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); | |||
| 542 | # endif | 531 | # endif |
| 543 | _GL_CXXALIASWARN (dup2); | 532 | _GL_CXXALIASWARN (dup2); |
| 544 | #elif defined GNULIB_POSIXCHECK | 533 | #elif defined GNULIB_POSIXCHECK |
| 545 | # undef dup2 | ||
| 546 | # if HAVE_RAW_DECL_DUP2 | 534 | # if HAVE_RAW_DECL_DUP2 |
| 547 | _GL_WARN_ON_USE (dup2, "dup2 is unportable - " | 535 | _GL_WARN_ON_USE (dup2, "dup2 is unportable - " |
| 548 | "use gnulib module dup2 for portability"); | 536 | "use gnulib module dup2 for portability"); |
| @@ -590,7 +578,6 @@ _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); | |||
| 590 | _GL_CXXALIASWARN (dup3); | 578 | _GL_CXXALIASWARN (dup3); |
| 591 | # endif | 579 | # endif |
| 592 | #elif defined GNULIB_POSIXCHECK | 580 | #elif defined GNULIB_POSIXCHECK |
| 593 | # undef dup3 | ||
| 594 | # if HAVE_RAW_DECL_DUP3 | 581 | # if HAVE_RAW_DECL_DUP3 |
| 595 | _GL_WARN_ON_USE (dup3, "dup3 is unportable - " | 582 | _GL_WARN_ON_USE (dup3, "dup3 is unportable - " |
| 596 | "use gnulib module dup3 for portability"); | 583 | "use gnulib module dup3 for portability"); |
| @@ -658,7 +645,6 @@ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " | |||
| 658 | "use the gnulib module faccessat instead"); | 645 | "use the gnulib module faccessat instead"); |
| 659 | # endif | 646 | # endif |
| 660 | #elif defined GNULIB_POSIXCHECK | 647 | #elif defined GNULIB_POSIXCHECK |
| 661 | # undef euidaccess | ||
| 662 | # if HAVE_RAW_DECL_EUIDACCESS | 648 | # if HAVE_RAW_DECL_EUIDACCESS |
| 663 | _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " | 649 | _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " |
| 664 | "use gnulib module euidaccess for portability"); | 650 | "use gnulib module euidaccess for portability"); |
| @@ -680,7 +666,6 @@ _GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); | |||
| 680 | # endif | 666 | # endif |
| 681 | _GL_CXXALIASWARN (execl); | 667 | _GL_CXXALIASWARN (execl); |
| 682 | #elif defined GNULIB_POSIXCHECK | 668 | #elif defined GNULIB_POSIXCHECK |
| 683 | # undef execl | ||
| 684 | # if HAVE_RAW_DECL_EXECL | 669 | # if HAVE_RAW_DECL_EXECL |
| 685 | _GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " | 670 | _GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " |
| 686 | "use gnulib module execl for portability"); | 671 | "use gnulib module execl for portability"); |
| @@ -715,7 +700,6 @@ _GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); | |||
| 715 | # endif | 700 | # endif |
| 716 | _GL_CXXALIASWARN (execle); | 701 | _GL_CXXALIASWARN (execle); |
| 717 | #elif defined GNULIB_POSIXCHECK | 702 | #elif defined GNULIB_POSIXCHECK |
| 718 | # undef execle | ||
| 719 | # if HAVE_RAW_DECL_EXECLE | 703 | # if HAVE_RAW_DECL_EXECLE |
| 720 | _GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " | 704 | _GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " |
| 721 | "use gnulib module execle for portability"); | 705 | "use gnulib module execle for portability"); |
| @@ -751,7 +735,6 @@ _GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); | |||
| 751 | # endif | 735 | # endif |
| 752 | _GL_CXXALIASWARN (execlp); | 736 | _GL_CXXALIASWARN (execlp); |
| 753 | #elif defined GNULIB_POSIXCHECK | 737 | #elif defined GNULIB_POSIXCHECK |
| 754 | # undef execlp | ||
| 755 | # if HAVE_RAW_DECL_EXECLP | 738 | # if HAVE_RAW_DECL_EXECLP |
| 756 | _GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " | 739 | _GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " |
| 757 | "use gnulib module execlp for portability"); | 740 | "use gnulib module execlp for portability"); |
| @@ -788,7 +771,6 @@ _GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); | |||
| 788 | # endif | 771 | # endif |
| 789 | _GL_CXXALIASWARN (execv); | 772 | _GL_CXXALIASWARN (execv); |
| 790 | #elif defined GNULIB_POSIXCHECK | 773 | #elif defined GNULIB_POSIXCHECK |
| 791 | # undef execv | ||
| 792 | # if HAVE_RAW_DECL_EXECV | 774 | # if HAVE_RAW_DECL_EXECV |
| 793 | _GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " | 775 | _GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " |
| 794 | "use gnulib module execv for portability"); | 776 | "use gnulib module execv for portability"); |
| @@ -827,7 +809,6 @@ _GL_CXXALIAS_SYS (execve, int, | |||
| 827 | # endif | 809 | # endif |
| 828 | _GL_CXXALIASWARN (execve); | 810 | _GL_CXXALIASWARN (execve); |
| 829 | #elif defined GNULIB_POSIXCHECK | 811 | #elif defined GNULIB_POSIXCHECK |
| 830 | # undef execve | ||
| 831 | # if HAVE_RAW_DECL_EXECVE | 812 | # if HAVE_RAW_DECL_EXECVE |
| 832 | _GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " | 813 | _GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " |
| 833 | "use gnulib module execve for portability"); | 814 | "use gnulib module execve for portability"); |
| @@ -865,7 +846,6 @@ _GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); | |||
| 865 | # endif | 846 | # endif |
| 866 | _GL_CXXALIASWARN (execvp); | 847 | _GL_CXXALIASWARN (execvp); |
| 867 | #elif defined GNULIB_POSIXCHECK | 848 | #elif defined GNULIB_POSIXCHECK |
| 868 | # undef execvp | ||
| 869 | # if HAVE_RAW_DECL_EXECVP | 849 | # if HAVE_RAW_DECL_EXECVP |
| 870 | _GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " | 850 | _GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " |
| 871 | "use gnulib module execvp for portability"); | 851 | "use gnulib module execvp for portability"); |
| @@ -911,7 +891,6 @@ _GL_CXXALIAS_SYS (execvpe, int, | |||
| 911 | _GL_CXXALIASWARN (execvpe); | 891 | _GL_CXXALIASWARN (execvpe); |
| 912 | # endif | 892 | # endif |
| 913 | #elif defined GNULIB_POSIXCHECK | 893 | #elif defined GNULIB_POSIXCHECK |
| 914 | # undef execvpe | ||
| 915 | # if HAVE_RAW_DECL_EXECVPE | 894 | # if HAVE_RAW_DECL_EXECVPE |
| 916 | _GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " | 895 | _GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " |
| 917 | "use gnulib module execvpe for portability"); | 896 | "use gnulib module execvpe for portability"); |
| @@ -968,7 +947,6 @@ _GL_CXXALIAS_SYS (faccessat, int, | |||
| 968 | _GL_CXXALIASWARN (faccessat); | 947 | _GL_CXXALIASWARN (faccessat); |
| 969 | # endif | 948 | # endif |
| 970 | #elif defined GNULIB_POSIXCHECK | 949 | #elif defined GNULIB_POSIXCHECK |
| 971 | # undef faccessat | ||
| 972 | # if HAVE_RAW_DECL_FACCESSAT | 950 | # if HAVE_RAW_DECL_FACCESSAT |
| 973 | _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " | 951 | _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " |
| 974 | "use gnulib module faccessat for portability"); | 952 | "use gnulib module faccessat for portability"); |
| @@ -1005,7 +983,6 @@ _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); | |||
| 1005 | _GL_EXTERN_C const char *_gl_directory_name (int fd); | 983 | _GL_EXTERN_C const char *_gl_directory_name (int fd); |
| 1006 | # endif | 984 | # endif |
| 1007 | #elif defined GNULIB_POSIXCHECK | 985 | #elif defined GNULIB_POSIXCHECK |
| 1008 | # undef fchdir | ||
| 1009 | # if HAVE_RAW_DECL_FCHDIR | 986 | # if HAVE_RAW_DECL_FCHDIR |
| 1010 | _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " | 987 | _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " |
| 1011 | "use gnulib module fchdir for portability"); | 988 | "use gnulib module fchdir for portability"); |
| @@ -1035,7 +1012,6 @@ _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, | |||
| 1035 | # endif | 1012 | # endif |
| 1036 | _GL_CXXALIASWARN (fchownat); | 1013 | _GL_CXXALIASWARN (fchownat); |
| 1037 | #elif defined GNULIB_POSIXCHECK | 1014 | #elif defined GNULIB_POSIXCHECK |
| 1038 | # undef fchownat | ||
| 1039 | # if HAVE_RAW_DECL_FCHOWNAT | 1015 | # if HAVE_RAW_DECL_FCHOWNAT |
| 1040 | _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " | 1016 | _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " |
| 1041 | "use gnulib module fchownat for portability"); | 1017 | "use gnulib module fchownat for portability"); |
| @@ -1065,7 +1041,6 @@ _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); | |||
| 1065 | _GL_CXXALIASWARN (fdatasync); | 1041 | _GL_CXXALIASWARN (fdatasync); |
| 1066 | # endif | 1042 | # endif |
| 1067 | #elif defined GNULIB_POSIXCHECK | 1043 | #elif defined GNULIB_POSIXCHECK |
| 1068 | # undef fdatasync | ||
| 1069 | # if HAVE_RAW_DECL_FDATASYNC | 1044 | # if HAVE_RAW_DECL_FDATASYNC |
| 1070 | _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " | 1045 | _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " |
| 1071 | "use gnulib module fdatasync for portability"); | 1046 | "use gnulib module fdatasync for portability"); |
| @@ -1084,7 +1059,6 @@ _GL_FUNCDECL_SYS (fsync, int, (int fd), ); | |||
| 1084 | _GL_CXXALIAS_SYS (fsync, int, (int fd)); | 1059 | _GL_CXXALIAS_SYS (fsync, int, (int fd)); |
| 1085 | _GL_CXXALIASWARN (fsync); | 1060 | _GL_CXXALIASWARN (fsync); |
| 1086 | #elif defined GNULIB_POSIXCHECK | 1061 | #elif defined GNULIB_POSIXCHECK |
| 1087 | # undef fsync | ||
| 1088 | # if HAVE_RAW_DECL_FSYNC | 1062 | # if HAVE_RAW_DECL_FSYNC |
| 1089 | _GL_WARN_ON_USE (fsync, "fsync is unportable - " | 1063 | _GL_WARN_ON_USE (fsync, "fsync is unportable - " |
| 1090 | "use gnulib module fsync for portability"); | 1064 | "use gnulib module fsync for portability"); |
| @@ -1118,7 +1092,6 @@ _GL_CXXALIAS_SYS (ftruncate, int, | |||
| 1118 | _GL_CXXALIASWARN (ftruncate); | 1092 | _GL_CXXALIASWARN (ftruncate); |
| 1119 | # endif | 1093 | # endif |
| 1120 | #elif defined GNULIB_POSIXCHECK | 1094 | #elif defined GNULIB_POSIXCHECK |
| 1121 | # undef ftruncate | ||
| 1122 | # if HAVE_RAW_DECL_FTRUNCATE | 1095 | # if HAVE_RAW_DECL_FTRUNCATE |
| 1123 | _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " | 1096 | _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " |
| 1124 | "use gnulib module ftruncate for portability"); | 1097 | "use gnulib module ftruncate for portability"); |
| @@ -1157,7 +1130,6 @@ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); | |||
| 1157 | # endif | 1130 | # endif |
| 1158 | _GL_CXXALIASWARN (getcwd); | 1131 | _GL_CXXALIASWARN (getcwd); |
| 1159 | #elif defined GNULIB_POSIXCHECK | 1132 | #elif defined GNULIB_POSIXCHECK |
| 1160 | # undef getcwd | ||
| 1161 | # if HAVE_RAW_DECL_GETCWD | 1133 | # if HAVE_RAW_DECL_GETCWD |
| 1162 | _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " | 1134 | _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " |
| 1163 | "use gnulib module getcwd for portability"); | 1135 | "use gnulib module getcwd for portability"); |
| @@ -1215,7 +1187,6 @@ _GL_CXXALIAS_SYS (getdomainname, int, | |||
| 1215 | _GL_CXXALIASWARN (getdomainname); | 1187 | _GL_CXXALIASWARN (getdomainname); |
| 1216 | # endif | 1188 | # endif |
| 1217 | #elif defined GNULIB_POSIXCHECK | 1189 | #elif defined GNULIB_POSIXCHECK |
| 1218 | # undef getdomainname | ||
| 1219 | # if HAVE_RAW_DECL_GETDOMAINNAME | 1190 | # if HAVE_RAW_DECL_GETDOMAINNAME |
| 1220 | _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " | 1191 | _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " |
| 1221 | "use gnulib module getdomainname for portability"); | 1192 | "use gnulib module getdomainname for portability"); |
| @@ -1243,7 +1214,6 @@ _GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); | |||
| 1243 | # endif | 1214 | # endif |
| 1244 | _GL_CXXALIASWARN (getdtablesize); | 1215 | _GL_CXXALIASWARN (getdtablesize); |
| 1245 | #elif defined GNULIB_POSIXCHECK | 1216 | #elif defined GNULIB_POSIXCHECK |
| 1246 | # undef getdtablesize | ||
| 1247 | # if HAVE_RAW_DECL_GETDTABLESIZE | 1217 | # if HAVE_RAW_DECL_GETDTABLESIZE |
| 1248 | _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " | 1218 | _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " |
| 1249 | "use gnulib module getdtablesize for portability"); | 1219 | "use gnulib module getdtablesize for portability"); |
| @@ -1274,7 +1244,6 @@ _GL_CXXALIAS_SYS (getentropy, int, | |||
| 1274 | _GL_CXXALIASWARN (getentropy); | 1244 | _GL_CXXALIASWARN (getentropy); |
| 1275 | # endif | 1245 | # endif |
| 1276 | #elif defined GNULIB_POSIXCHECK | 1246 | #elif defined GNULIB_POSIXCHECK |
| 1277 | # undef getentropy | ||
| 1278 | # if HAVE_RAW_DECL_GETENTROPY | 1247 | # if HAVE_RAW_DECL_GETENTROPY |
| 1279 | _GL_WARN_ON_USE (getentropy, "getentropy is unportable - " | 1248 | _GL_WARN_ON_USE (getentropy, "getentropy is unportable - " |
| 1280 | "use gnulib module getentropy for portability"); | 1249 | "use gnulib module getentropy for portability"); |
| @@ -1307,7 +1276,6 @@ _GL_CXXALIAS_SYS (getgroups, int, | |||
| 1307 | # endif | 1276 | # endif |
| 1308 | _GL_CXXALIASWARN (getgroups); | 1277 | _GL_CXXALIASWARN (getgroups); |
| 1309 | #elif defined GNULIB_POSIXCHECK | 1278 | #elif defined GNULIB_POSIXCHECK |
| 1310 | # undef getgroups | ||
| 1311 | # if HAVE_RAW_DECL_GETGROUPS | 1279 | # if HAVE_RAW_DECL_GETGROUPS |
| 1312 | _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " | 1280 | _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " |
| 1313 | "use gnulib module getgroups for portability"); | 1281 | "use gnulib module getgroups for portability"); |
| @@ -1336,8 +1304,7 @@ _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); | |||
| 1336 | _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len), | 1304 | _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len), |
| 1337 | _GL_ARG_NONNULL ((1))); | 1305 | _GL_ARG_NONNULL ((1))); |
| 1338 | # endif | 1306 | # endif |
| 1339 | /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second | 1307 | /* Need to cast, because on Solaris 10 systems, the second parameter is |
| 1340 | parameter is | ||
| 1341 | int len. */ | 1308 | int len. */ |
| 1342 | _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); | 1309 | _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); |
| 1343 | # endif | 1310 | # endif |
| @@ -1348,7 +1315,6 @@ _GL_CXXALIASWARN (gethostname); | |||
| 1348 | # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname | 1315 | # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname |
| 1349 | # endif | 1316 | # endif |
| 1350 | #elif defined GNULIB_POSIXCHECK | 1317 | #elif defined GNULIB_POSIXCHECK |
| 1351 | # undef gethostname | ||
| 1352 | # if HAVE_RAW_DECL_GETHOSTNAME | 1318 | # if HAVE_RAW_DECL_GETHOSTNAME |
| 1353 | _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " | 1319 | _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " |
| 1354 | "use gnulib module gethostname for portability"); | 1320 | "use gnulib module gethostname for portability"); |
| @@ -1383,7 +1349,6 @@ _GL_CXXALIAS_SYS (getlogin, char *, (void)); | |||
| 1383 | _GL_CXXALIASWARN (getlogin); | 1349 | _GL_CXXALIASWARN (getlogin); |
| 1384 | # endif | 1350 | # endif |
| 1385 | #elif defined GNULIB_POSIXCHECK | 1351 | #elif defined GNULIB_POSIXCHECK |
| 1386 | # undef getlogin | ||
| 1387 | # if HAVE_RAW_DECL_GETLOGIN | 1352 | # if HAVE_RAW_DECL_GETLOGIN |
| 1388 | _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " | 1353 | _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " |
| 1389 | "use gnulib module getlogin for portability"); | 1354 | "use gnulib module getlogin for portability"); |
| @@ -1426,7 +1391,6 @@ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); | |||
| 1426 | _GL_CXXALIASWARN (getlogin_r); | 1391 | _GL_CXXALIASWARN (getlogin_r); |
| 1427 | # endif | 1392 | # endif |
| 1428 | #elif defined GNULIB_POSIXCHECK | 1393 | #elif defined GNULIB_POSIXCHECK |
| 1429 | # undef getlogin_r | ||
| 1430 | # if HAVE_RAW_DECL_GETLOGIN_R | 1394 | # if HAVE_RAW_DECL_GETLOGIN_R |
| 1431 | _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " | 1395 | _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " |
| 1432 | "use gnulib module getlogin_r for portability"); | 1396 | "use gnulib module getlogin_r for portability"); |
| @@ -1513,7 +1477,6 @@ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); | |||
| 1513 | _GL_CXXALIASWARN (getpagesize); | 1477 | _GL_CXXALIASWARN (getpagesize); |
| 1514 | # endif | 1478 | # endif |
| 1515 | #elif defined GNULIB_POSIXCHECK | 1479 | #elif defined GNULIB_POSIXCHECK |
| 1516 | # undef getpagesize | ||
| 1517 | # if HAVE_RAW_DECL_GETPAGESIZE | 1480 | # if HAVE_RAW_DECL_GETPAGESIZE |
| 1518 | _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " | 1481 | _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " |
| 1519 | "use gnulib module getpagesize for portability"); | 1482 | "use gnulib module getpagesize for portability"); |
| @@ -1544,7 +1507,6 @@ _GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); | |||
| 1544 | # endif | 1507 | # endif |
| 1545 | _GL_CXXALIASWARN (getpass); | 1508 | _GL_CXXALIASWARN (getpass); |
| 1546 | #elif defined GNULIB_POSIXCHECK | 1509 | #elif defined GNULIB_POSIXCHECK |
| 1547 | # undef getpass | ||
| 1548 | # if HAVE_RAW_DECL_GETPASS | 1510 | # if HAVE_RAW_DECL_GETPASS |
| 1549 | _GL_WARN_ON_USE (getpass, "getpass is unportable - " | 1511 | _GL_WARN_ON_USE (getpass, "getpass is unportable - " |
| 1550 | "use gnulib module getpass or getpass-gnu for portability"); | 1512 | "use gnulib module getpass or getpass-gnu for portability"); |
| @@ -1587,7 +1549,6 @@ _GL_CXXALIAS_SYS (getusershell, char *, (void)); | |||
| 1587 | # endif | 1549 | # endif |
| 1588 | _GL_CXXALIASWARN (getusershell); | 1550 | _GL_CXXALIASWARN (getusershell); |
| 1589 | #elif defined GNULIB_POSIXCHECK | 1551 | #elif defined GNULIB_POSIXCHECK |
| 1590 | # undef getusershell | ||
| 1591 | # if HAVE_RAW_DECL_GETUSERSHELL | 1552 | # if HAVE_RAW_DECL_GETUSERSHELL |
| 1592 | _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " | 1553 | _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " |
| 1593 | "use gnulib module getusershell for portability"); | 1554 | "use gnulib module getusershell for portability"); |
| @@ -1611,7 +1572,6 @@ _GL_CXXALIAS_SYS (setusershell, void, (void)); | |||
| 1611 | # endif | 1572 | # endif |
| 1612 | _GL_CXXALIASWARN (setusershell); | 1573 | _GL_CXXALIASWARN (setusershell); |
| 1613 | #elif defined GNULIB_POSIXCHECK | 1574 | #elif defined GNULIB_POSIXCHECK |
| 1614 | # undef setusershell | ||
| 1615 | # if HAVE_RAW_DECL_SETUSERSHELL | 1575 | # if HAVE_RAW_DECL_SETUSERSHELL |
| 1616 | _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " | 1576 | _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " |
| 1617 | "use gnulib module getusershell for portability"); | 1577 | "use gnulib module getusershell for portability"); |
| @@ -1636,7 +1596,6 @@ _GL_CXXALIAS_SYS (endusershell, void, (void)); | |||
| 1636 | # endif | 1596 | # endif |
| 1637 | _GL_CXXALIASWARN (endusershell); | 1597 | _GL_CXXALIASWARN (endusershell); |
| 1638 | #elif defined GNULIB_POSIXCHECK | 1598 | #elif defined GNULIB_POSIXCHECK |
| 1639 | # undef endusershell | ||
| 1640 | # if HAVE_RAW_DECL_ENDUSERSHELL | 1599 | # if HAVE_RAW_DECL_ENDUSERSHELL |
| 1641 | _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " | 1600 | _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " |
| 1642 | "use gnulib module getusershell for portability"); | 1601 | "use gnulib module getusershell for portability"); |
| @@ -1652,7 +1611,6 @@ _GL_FUNCDECL_SYS (group_member, int, (gid_t gid), ); | |||
| 1652 | _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); | 1611 | _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); |
| 1653 | _GL_CXXALIASWARN (group_member); | 1612 | _GL_CXXALIASWARN (group_member); |
| 1654 | #elif defined GNULIB_POSIXCHECK | 1613 | #elif defined GNULIB_POSIXCHECK |
| 1655 | # undef group_member | ||
| 1656 | # if HAVE_RAW_DECL_GROUP_MEMBER | 1614 | # if HAVE_RAW_DECL_GROUP_MEMBER |
| 1657 | _GL_WARN_ON_USE (group_member, "group_member is unportable - " | 1615 | _GL_WARN_ON_USE (group_member, "group_member is unportable - " |
| 1658 | "use gnulib module group-member for portability"); | 1616 | "use gnulib module group-member for portability"); |
| @@ -1680,7 +1638,6 @@ _GL_CXXALIAS_SYS (isatty, int, (int fd)); | |||
| 1680 | # endif | 1638 | # endif |
| 1681 | _GL_CXXALIASWARN (isatty); | 1639 | _GL_CXXALIASWARN (isatty); |
| 1682 | #elif defined GNULIB_POSIXCHECK | 1640 | #elif defined GNULIB_POSIXCHECK |
| 1683 | # undef isatty | ||
| 1684 | # if HAVE_RAW_DECL_ISATTY | 1641 | # if HAVE_RAW_DECL_ISATTY |
| 1685 | _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " | 1642 | _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " |
| 1686 | "use gnulib module isatty for portability"); | 1643 | "use gnulib module isatty for portability"); |
| @@ -1725,7 +1682,6 @@ _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); | |||
| 1725 | # endif | 1682 | # endif |
| 1726 | _GL_CXXALIASWARN (lchown); | 1683 | _GL_CXXALIASWARN (lchown); |
| 1727 | #elif defined GNULIB_POSIXCHECK | 1684 | #elif defined GNULIB_POSIXCHECK |
| 1728 | # undef lchown | ||
| 1729 | # if HAVE_RAW_DECL_LCHOWN | 1685 | # if HAVE_RAW_DECL_LCHOWN |
| 1730 | _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " | 1686 | _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " |
| 1731 | "use gnulib module lchown for portability"); | 1687 | "use gnulib module lchown for portability"); |
| @@ -1754,7 +1710,6 @@ _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); | |||
| 1754 | # endif | 1710 | # endif |
| 1755 | _GL_CXXALIASWARN (link); | 1711 | _GL_CXXALIASWARN (link); |
| 1756 | #elif defined GNULIB_POSIXCHECK | 1712 | #elif defined GNULIB_POSIXCHECK |
| 1757 | # undef link | ||
| 1758 | # if HAVE_RAW_DECL_LINK | 1713 | # if HAVE_RAW_DECL_LINK |
| 1759 | _GL_WARN_ON_USE (link, "link is unportable - " | 1714 | _GL_WARN_ON_USE (link, "link is unportable - " |
| 1760 | "use gnulib module link for portability"); | 1715 | "use gnulib module link for portability"); |
| @@ -1793,7 +1748,6 @@ _GL_CXXALIAS_SYS (linkat, int, | |||
| 1793 | _GL_CXXALIASWARN (linkat); | 1748 | _GL_CXXALIASWARN (linkat); |
| 1794 | # endif | 1749 | # endif |
| 1795 | #elif defined GNULIB_POSIXCHECK | 1750 | #elif defined GNULIB_POSIXCHECK |
| 1796 | # undef linkat | ||
| 1797 | # if HAVE_RAW_DECL_LINKAT | 1751 | # if HAVE_RAW_DECL_LINKAT |
| 1798 | _GL_WARN_ON_USE (linkat, "linkat is unportable - " | 1752 | _GL_WARN_ON_USE (linkat, "linkat is unportable - " |
| 1799 | "use gnulib module linkat for portability"); | 1753 | "use gnulib module linkat for portability"); |
| @@ -1823,7 +1777,6 @@ _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); | |||
| 1823 | # endif | 1777 | # endif |
| 1824 | _GL_CXXALIASWARN (lseek); | 1778 | _GL_CXXALIASWARN (lseek); |
| 1825 | #elif defined GNULIB_POSIXCHECK | 1779 | #elif defined GNULIB_POSIXCHECK |
| 1826 | # undef lseek | ||
| 1827 | # if HAVE_RAW_DECL_LSEEK | 1780 | # if HAVE_RAW_DECL_LSEEK |
| 1828 | _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " | 1781 | _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " |
| 1829 | "systems - use gnulib module lseek for portability"); | 1782 | "systems - use gnulib module lseek for portability"); |
| @@ -1856,7 +1809,6 @@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]), | |||
| 1856 | _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); | 1809 | _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); |
| 1857 | _GL_CXXALIASWARN (pipe); | 1810 | _GL_CXXALIASWARN (pipe); |
| 1858 | #elif defined GNULIB_POSIXCHECK | 1811 | #elif defined GNULIB_POSIXCHECK |
| 1859 | # undef pipe | ||
| 1860 | # if HAVE_RAW_DECL_PIPE | 1812 | # if HAVE_RAW_DECL_PIPE |
| 1861 | _GL_WARN_ON_USE (pipe, "pipe is unportable - " | 1813 | _GL_WARN_ON_USE (pipe, "pipe is unportable - " |
| 1862 | "use gnulib module pipe-posix for portability"); | 1814 | "use gnulib module pipe-posix for portability"); |
| @@ -1890,7 +1842,6 @@ _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); | |||
| 1890 | _GL_CXXALIASWARN (pipe2); | 1842 | _GL_CXXALIASWARN (pipe2); |
| 1891 | # endif | 1843 | # endif |
| 1892 | #elif defined GNULIB_POSIXCHECK | 1844 | #elif defined GNULIB_POSIXCHECK |
| 1893 | # undef pipe2 | ||
| 1894 | # if HAVE_RAW_DECL_PIPE2 | 1845 | # if HAVE_RAW_DECL_PIPE2 |
| 1895 | _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " | 1846 | _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " |
| 1896 | "use gnulib module pipe2 for portability"); | 1847 | "use gnulib module pipe2 for portability"); |
| @@ -1927,7 +1878,6 @@ _GL_CXXALIAS_SYS (pread, ssize_t, | |||
| 1927 | _GL_CXXALIASWARN (pread); | 1878 | _GL_CXXALIASWARN (pread); |
| 1928 | # endif | 1879 | # endif |
| 1929 | #elif defined GNULIB_POSIXCHECK | 1880 | #elif defined GNULIB_POSIXCHECK |
| 1930 | # undef pread | ||
| 1931 | # if HAVE_RAW_DECL_PREAD | 1881 | # if HAVE_RAW_DECL_PREAD |
| 1932 | _GL_WARN_ON_USE (pread, "pread is unportable - " | 1882 | _GL_WARN_ON_USE (pread, "pread is unportable - " |
| 1933 | "use gnulib module pread for portability"); | 1883 | "use gnulib module pread for portability"); |
| @@ -1964,7 +1914,6 @@ _GL_CXXALIAS_SYS (pwrite, ssize_t, | |||
| 1964 | _GL_CXXALIASWARN (pwrite); | 1914 | _GL_CXXALIASWARN (pwrite); |
| 1965 | # endif | 1915 | # endif |
| 1966 | #elif defined GNULIB_POSIXCHECK | 1916 | #elif defined GNULIB_POSIXCHECK |
| 1967 | # undef pwrite | ||
| 1968 | # if HAVE_RAW_DECL_PWRITE | 1917 | # if HAVE_RAW_DECL_PWRITE |
| 1969 | _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " | 1918 | _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " |
| 1970 | "use gnulib module pwrite for portability"); | 1919 | "use gnulib module pwrite for portability"); |
| @@ -2042,7 +1991,6 @@ _GL_CXXALIAS_SYS (readlink, ssize_t, | |||
| 2042 | # endif | 1991 | # endif |
| 2043 | _GL_CXXALIASWARN (readlink); | 1992 | _GL_CXXALIASWARN (readlink); |
| 2044 | #elif defined GNULIB_POSIXCHECK | 1993 | #elif defined GNULIB_POSIXCHECK |
| 2045 | # undef readlink | ||
| 2046 | # if HAVE_RAW_DECL_READLINK | 1994 | # if HAVE_RAW_DECL_READLINK |
| 2047 | _GL_WARN_ON_USE (readlink, "readlink is unportable - " | 1995 | _GL_WARN_ON_USE (readlink, "readlink is unportable - " |
| 2048 | "use gnulib module readlink for portability"); | 1996 | "use gnulib module readlink for portability"); |
| @@ -2077,7 +2025,6 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t, | |||
| 2077 | _GL_CXXALIASWARN (readlinkat); | 2025 | _GL_CXXALIASWARN (readlinkat); |
| 2078 | # endif | 2026 | # endif |
| 2079 | #elif defined GNULIB_POSIXCHECK | 2027 | #elif defined GNULIB_POSIXCHECK |
| 2080 | # undef readlinkat | ||
| 2081 | # if HAVE_RAW_DECL_READLINKAT | 2028 | # if HAVE_RAW_DECL_READLINKAT |
| 2082 | _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " | 2029 | _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " |
| 2083 | "use gnulib module readlinkat for portability"); | 2030 | "use gnulib module readlinkat for portability"); |
| @@ -2104,7 +2051,6 @@ _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); | |||
| 2104 | # endif | 2051 | # endif |
| 2105 | _GL_CXXALIASWARN (rmdir); | 2052 | _GL_CXXALIASWARN (rmdir); |
| 2106 | #elif defined GNULIB_POSIXCHECK | 2053 | #elif defined GNULIB_POSIXCHECK |
| 2107 | # undef rmdir | ||
| 2108 | # if HAVE_RAW_DECL_RMDIR | 2054 | # if HAVE_RAW_DECL_RMDIR |
| 2109 | _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " | 2055 | _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " |
| 2110 | "use gnulib module rmdir for portability"); | 2056 | "use gnulib module rmdir for portability"); |
| @@ -2151,9 +2097,9 @@ _GL_FUNCDECL_SYS (sethostname, int, | |||
| 2151 | (const char *name, size_t len), | 2097 | (const char *name, size_t len), |
| 2152 | _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NODISCARD); | 2098 | _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NODISCARD); |
| 2153 | # endif | 2099 | # endif |
| 2154 | /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 | 2100 | /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, and FreeBSD 6.4 |
| 2155 | and FreeBSD 6.4 the second parameter is int. On Solaris 11 | 2101 | the second parameter is int. On Solaris 11 2011-10, the first parameter is |
| 2156 | 2011-10, the first parameter is not const. */ | 2102 | not const. */ |
| 2157 | _GL_CXXALIAS_SYS_CAST (sethostname, int, | 2103 | _GL_CXXALIAS_SYS_CAST (sethostname, int, |
| 2158 | (const char *name, size_t len)); | 2104 | (const char *name, size_t len)); |
| 2159 | # endif | 2105 | # endif |
| @@ -2161,7 +2107,6 @@ _GL_CXXALIAS_SYS_CAST (sethostname, int, | |||
| 2161 | _GL_CXXALIASWARN (sethostname); | 2107 | _GL_CXXALIASWARN (sethostname); |
| 2162 | # endif | 2108 | # endif |
| 2163 | #elif defined GNULIB_POSIXCHECK | 2109 | #elif defined GNULIB_POSIXCHECK |
| 2164 | # undef sethostname | ||
| 2165 | # if HAVE_RAW_DECL_SETHOSTNAME | 2110 | # if HAVE_RAW_DECL_SETHOSTNAME |
| 2166 | _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " | 2111 | _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " |
| 2167 | "use gnulib module sethostname for portability"); | 2112 | "use gnulib module sethostname for portability"); |
| @@ -2189,7 +2134,6 @@ _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); | |||
| 2189 | # endif | 2134 | # endif |
| 2190 | _GL_CXXALIASWARN (sleep); | 2135 | _GL_CXXALIASWARN (sleep); |
| 2191 | #elif defined GNULIB_POSIXCHECK | 2136 | #elif defined GNULIB_POSIXCHECK |
| 2192 | # undef sleep | ||
| 2193 | # if HAVE_RAW_DECL_SLEEP | 2137 | # if HAVE_RAW_DECL_SLEEP |
| 2194 | _GL_WARN_ON_USE (sleep, "sleep is unportable - " | 2138 | _GL_WARN_ON_USE (sleep, "sleep is unportable - " |
| 2195 | "use gnulib module sleep for portability"); | 2139 | "use gnulib module sleep for portability"); |
| @@ -2244,7 +2188,6 @@ _GL_CXXALIAS_SYS (symlink, int, | |||
| 2244 | # endif | 2188 | # endif |
| 2245 | _GL_CXXALIASWARN (symlink); | 2189 | _GL_CXXALIASWARN (symlink); |
| 2246 | #elif defined GNULIB_POSIXCHECK | 2190 | #elif defined GNULIB_POSIXCHECK |
| 2247 | # undef symlink | ||
| 2248 | # if HAVE_RAW_DECL_SYMLINK | 2191 | # if HAVE_RAW_DECL_SYMLINK |
| 2249 | _GL_WARN_ON_USE (symlink, "symlink is not portable - " | 2192 | _GL_WARN_ON_USE (symlink, "symlink is not portable - " |
| 2250 | "use gnulib module symlink for portability"); | 2193 | "use gnulib module symlink for portability"); |
| @@ -2276,7 +2219,6 @@ _GL_CXXALIAS_SYS (symlinkat, int, | |||
| 2276 | _GL_CXXALIASWARN (symlinkat); | 2219 | _GL_CXXALIASWARN (symlinkat); |
| 2277 | # endif | 2220 | # endif |
| 2278 | #elif defined GNULIB_POSIXCHECK | 2221 | #elif defined GNULIB_POSIXCHECK |
| 2279 | # undef symlinkat | ||
| 2280 | # if HAVE_RAW_DECL_SYMLINKAT | 2222 | # if HAVE_RAW_DECL_SYMLINKAT |
| 2281 | _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " | 2223 | _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " |
| 2282 | "use gnulib module symlinkat for portability"); | 2224 | "use gnulib module symlinkat for portability"); |
| @@ -2308,7 +2250,6 @@ _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); | |||
| 2308 | _GL_CXXALIASWARN (truncate); | 2250 | _GL_CXXALIASWARN (truncate); |
| 2309 | # endif | 2251 | # endif |
| 2310 | #elif defined GNULIB_POSIXCHECK | 2252 | #elif defined GNULIB_POSIXCHECK |
| 2311 | # undef truncate | ||
| 2312 | # if HAVE_RAW_DECL_TRUNCATE | 2253 | # if HAVE_RAW_DECL_TRUNCATE |
| 2313 | _GL_WARN_ON_USE (truncate, "truncate is unportable - " | 2254 | _GL_WARN_ON_USE (truncate, "truncate is unportable - " |
| 2314 | "use gnulib module truncate for portability"); | 2255 | "use gnulib module truncate for portability"); |
| @@ -2342,7 +2283,6 @@ _GL_CXXALIAS_SYS (ttyname_r, int, | |||
| 2342 | _GL_CXXALIASWARN (ttyname_r); | 2283 | _GL_CXXALIASWARN (ttyname_r); |
| 2343 | # endif | 2284 | # endif |
| 2344 | #elif defined GNULIB_POSIXCHECK | 2285 | #elif defined GNULIB_POSIXCHECK |
| 2345 | # undef ttyname_r | ||
| 2346 | # if HAVE_RAW_DECL_TTYNAME_R | 2286 | # if HAVE_RAW_DECL_TTYNAME_R |
| 2347 | _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " | 2287 | _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " |
| 2348 | "use gnulib module ttyname_r for portability"); | 2288 | "use gnulib module ttyname_r for portability"); |
| @@ -2369,7 +2309,6 @@ _GL_CXXALIAS_SYS (unlink, int, (char const *file)); | |||
| 2369 | # endif | 2309 | # endif |
| 2370 | _GL_CXXALIASWARN (unlink); | 2310 | _GL_CXXALIASWARN (unlink); |
| 2371 | #elif defined GNULIB_POSIXCHECK | 2311 | #elif defined GNULIB_POSIXCHECK |
| 2372 | # undef unlink | ||
| 2373 | # if HAVE_RAW_DECL_UNLINK | 2312 | # if HAVE_RAW_DECL_UNLINK |
| 2374 | _GL_WARN_ON_USE (unlink, "unlink is not portable - " | 2313 | _GL_WARN_ON_USE (unlink, "unlink is not portable - " |
| 2375 | "use gnulib module unlink for portability"); | 2314 | "use gnulib module unlink for portability"); |
| @@ -2409,7 +2348,6 @@ _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); | |||
| 2409 | # endif | 2348 | # endif |
| 2410 | _GL_CXXALIASWARN (unlinkat); | 2349 | _GL_CXXALIASWARN (unlinkat); |
| 2411 | #elif defined GNULIB_POSIXCHECK | 2350 | #elif defined GNULIB_POSIXCHECK |
| 2412 | # undef unlinkat | ||
| 2413 | # if HAVE_RAW_DECL_UNLINKAT | 2351 | # if HAVE_RAW_DECL_UNLINKAT |
| 2414 | _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " | 2352 | _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " |
| 2415 | "use gnulib module unlinkat for portability"); | 2353 | "use gnulib module unlinkat for portability"); |
| @@ -2439,7 +2377,6 @@ _GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); | |||
| 2439 | # endif | 2377 | # endif |
| 2440 | _GL_CXXALIASWARN (usleep); | 2378 | _GL_CXXALIASWARN (usleep); |
| 2441 | #elif defined GNULIB_POSIXCHECK | 2379 | #elif defined GNULIB_POSIXCHECK |
| 2442 | # undef usleep | ||
| 2443 | # if HAVE_RAW_DECL_USLEEP | 2380 | # if HAVE_RAW_DECL_USLEEP |
| 2444 | _GL_WARN_ON_USE (usleep, "usleep is unportable - " | 2381 | _GL_WARN_ON_USE (usleep, "usleep is unportable - " |
| 2445 | "use gnulib module usleep for portability"); | 2382 | "use gnulib module usleep for portability"); |
| @@ -2493,6 +2430,18 @@ _GL_CXXALIASWARN (write); | |||
| 2493 | 2430 | ||
| 2494 | _GL_INLINE_HEADER_END | 2431 | _GL_INLINE_HEADER_END |
| 2495 | 2432 | ||
| 2433 | |||
| 2434 | /* Includes that provide only macros that don't need to be overridden. | ||
| 2435 | (Includes that are needed for type definitions and function declarations | ||
| 2436 | have their place above, before the function overrides.) */ | ||
| 2437 | |||
| 2438 | /* FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Solaris 11.4, and glibc 2.41 | ||
| 2439 | do not define O_CLOEXEC in <unistd.h>. */ | ||
| 2440 | #if ! defined O_CLOEXEC | ||
| 2441 | # include <fcntl.h> | ||
| 2442 | #endif | ||
| 2443 | |||
| 2444 | |||
| 2496 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ | 2445 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ |
| 2497 | #endif /* _GL_INCLUDING_UNISTD_H */ | 2446 | #endif /* _GL_INCLUDING_UNISTD_H */ |
| 2498 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ | 2447 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ |
diff --git a/gl/unitypes.h b/gl/unitypes.h deleted file mode 100644 index 83a91750..00000000 --- a/gl/unitypes.h +++ /dev/null | |||
| @@ -1,72 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Elementary types and macros for the GNU UniString library. | ||
| 3 | Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #ifndef _UNITYPES_H | ||
| 19 | #define _UNITYPES_H | ||
| 20 | |||
| 21 | /* Get uint8_t, uint16_t, uint32_t. */ | ||
| 22 | #include <stdint.h> | ||
| 23 | |||
| 24 | #ifdef __cplusplus | ||
| 25 | extern "C" { | ||
| 26 | #endif | ||
| 27 | |||
| 28 | |||
| 29 | /* Type representing a Unicode character. */ | ||
| 30 | typedef uint32_t ucs4_t; | ||
| 31 | |||
| 32 | /* Attribute of a function whose result depends only on the arguments | ||
| 33 | (not pointers!) and which has no side effects. */ | ||
| 34 | #ifndef _UC_ATTRIBUTE_CONST | ||
| 35 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ | ||
| 36 | # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) | ||
| 37 | # else | ||
| 38 | # define _UC_ATTRIBUTE_CONST | ||
| 39 | # endif | ||
| 40 | #endif | ||
| 41 | |||
| 42 | /* Attribute of a function whose result depends only on the arguments | ||
| 43 | (possibly pointers) and global memory, and which has no side effects. */ | ||
| 44 | #ifndef _UC_ATTRIBUTE_PURE | ||
| 45 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ | ||
| 46 | # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) | ||
| 47 | # else | ||
| 48 | # define _UC_ATTRIBUTE_PURE | ||
| 49 | # endif | ||
| 50 | #endif | ||
| 51 | |||
| 52 | /* Qualifier in a function declaration, that asserts that the caller must | ||
| 53 | pass a pointer to a different object in the specified pointer argument | ||
| 54 | than in the other pointer arguments. */ | ||
| 55 | #ifndef _UC_RESTRICT | ||
| 56 | # if defined __restrict \ | ||
| 57 | || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ | ||
| 58 | || __clang_major__ >= 3 | ||
| 59 | # define _UC_RESTRICT __restrict | ||
| 60 | # elif 199901L <= __STDC_VERSION__ || defined restrict | ||
| 61 | # define _UC_RESTRICT restrict | ||
| 62 | # else | ||
| 63 | # define _UC_RESTRICT | ||
| 64 | # endif | ||
| 65 | #endif | ||
| 66 | |||
| 67 | |||
| 68 | #ifdef __cplusplus | ||
| 69 | } | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #endif /* _UNITYPES_H */ | ||
diff --git a/gl/unitypes.in.h b/gl/unitypes.in.h index 776d90e9..6d54baa8 100644 --- a/gl/unitypes.in.h +++ b/gl/unitypes.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Elementary types and macros for the GNU UniString library. | 1 | /* Elementary types and macros for the GNU UniString library. |
| 2 | Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2005-2006, 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/uniwidth.h b/gl/uniwidth.h deleted file mode 100644 index b88df2bf..00000000 --- a/gl/uniwidth.h +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
| 2 | /* Display width functions. | ||
| 3 | Copyright (C) 2001-2002, 2005, 2007, 2009-2025 Free Software Foundation, | ||
| 4 | Inc. | ||
| 5 | |||
| 6 | This file is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU Lesser General Public License as | ||
| 8 | published by the Free Software Foundation; either version 2.1 of the | ||
| 9 | License, or (at your option) any later version. | ||
| 10 | |||
| 11 | This file is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU Lesser General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU Lesser General Public License | ||
| 17 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #ifndef _UNIWIDTH_H | ||
| 20 | #define _UNIWIDTH_H | ||
| 21 | |||
| 22 | #include "unitypes.h" | ||
| 23 | |||
| 24 | /* Get size_t. */ | ||
| 25 | #include <stddef.h> | ||
| 26 | |||
| 27 | /* Get locale_charset() declaration. */ | ||
| 28 | #include "localcharset.h" | ||
| 29 | |||
| 30 | #ifdef __cplusplus | ||
| 31 | extern "C" { | ||
| 32 | #endif | ||
| 33 | |||
| 34 | |||
| 35 | /* Display width. */ | ||
| 36 | |||
| 37 | /* These functions are locale dependent. The encoding argument identifies | ||
| 38 | the encoding (e.g. "ISO-8859-2" for Polish). */ | ||
| 39 | |||
| 40 | /* Determine number of column positions required for UC. */ | ||
| 41 | extern int | ||
| 42 | uc_width (ucs4_t uc, const char *encoding) | ||
| 43 | _UC_ATTRIBUTE_PURE; | ||
| 44 | |||
| 45 | /* Determine number of column positions required for first N units | ||
| 46 | (or fewer if S ends before this) in S. */ | ||
| 47 | extern int | ||
| 48 | u8_width (const uint8_t *s, size_t n, const char *encoding) | ||
| 49 | _UC_ATTRIBUTE_PURE; | ||
| 50 | extern int | ||
| 51 | u16_width (const uint16_t *s, size_t n, const char *encoding) | ||
| 52 | _UC_ATTRIBUTE_PURE; | ||
| 53 | extern int | ||
| 54 | u32_width (const uint32_t *s, size_t n, const char *encoding) | ||
| 55 | _UC_ATTRIBUTE_PURE; | ||
| 56 | |||
| 57 | /* Determine number of column positions required for S. */ | ||
| 58 | extern int | ||
| 59 | u8_strwidth (const uint8_t *s, const char *encoding) | ||
| 60 | _UC_ATTRIBUTE_PURE; | ||
| 61 | extern int | ||
| 62 | u16_strwidth (const uint16_t *s, const char *encoding) | ||
| 63 | _UC_ATTRIBUTE_PURE; | ||
| 64 | extern int | ||
| 65 | u32_strwidth (const uint32_t *s, const char *encoding) | ||
| 66 | _UC_ATTRIBUTE_PURE; | ||
| 67 | |||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | } | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #endif /* _UNIWIDTH_H */ | ||
diff --git a/gl/uniwidth.in.h b/gl/uniwidth.in.h index 49c7ce05..dad496fd 100644 --- a/gl/uniwidth.in.h +++ b/gl/uniwidth.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Display width functions. | 1 | /* Display width functions. |
| 2 | Copyright (C) 2001-2002, 2005, 2007, 2009-2025 Free Software Foundation, | 2 | Copyright (C) 2001-2002, 2005, 2007, 2009-2026 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/uniwidth/cjk.h b/gl/uniwidth/cjk.h index af41f637..bcd49fbf 100644 --- a/gl/uniwidth/cjk.h +++ b/gl/uniwidth/cjk.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Test for CJK encoding. | 1 | /* Test for CJK encoding. |
| 2 | Copyright (C) 2001-2002, 2005-2007, 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2002, 2005-2007, 2009-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/uniwidth/width.c b/gl/uniwidth/width.c index c99a74cb..683f5513 100644 --- a/gl/uniwidth/width.c +++ b/gl/uniwidth/width.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Determine display width of Unicode character. | 1 | /* Determine display width of Unicode character. |
| 2 | Copyright (C) 2001-2002, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2002, 2006-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -42,8 +42,8 @@ | |||
| 42 | in the U+3130..U+318F block, and these characters are mapped to legacy | 42 | in the U+3130..U+318F block, and these characters are mapped to legacy |
| 43 | character sets, and traditional Japanese layout matters for them. | 43 | character sets, and traditional Japanese layout matters for them. |
| 44 | 2) glibc does the same thing, see | 44 | 2) glibc does the same thing, see |
| 45 | <https://sourceware.org/bugzilla/show_bug.cgi?id=21750> | 45 | <https://sourceware.org/PR21750> |
| 46 | <https://sourceware.org/bugzilla/show_bug.cgi?id=26120> | 46 | <https://sourceware.org/PR26120> |
| 47 | */ | 47 | */ |
| 48 | #include "uniwidth/width0.h" | 48 | #include "uniwidth/width0.h" |
| 49 | 49 | ||
diff --git a/gl/uniwidth/width0.h b/gl/uniwidth/width0.h index 2edbe240..d05286b7 100644 --- a/gl/uniwidth/width0.h +++ b/gl/uniwidth/width0.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* Table of non-spacing or control characters. */ | 2 | /* Table of non-spacing or control characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
| @@ -17,7 +17,7 @@ | |||
| 17 | You should have received a copy of the GNU Lesser General Public License | 17 | You should have received a copy of the GNU Lesser General Public License |
| 18 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 18 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | static const unsigned char nonspacing_table_data[49*64] = { | 20 | static const unsigned char nonspacing_table_data[50*64] = { |
| 21 | /* 0x0000-0x01ff */ | 21 | /* 0x0000-0x01ff */ |
| 22 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ | 22 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ |
| 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ | 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ |
| @@ -130,7 +130,7 @@ static const unsigned char nonspacing_table_data[49*64] = { | |||
| 130 | 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ | 130 | 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ |
| 131 | 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ | 131 | 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ |
| 132 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x1a80-0x1abf */ | 132 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x1a80-0x1abf */ |
| 133 | 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ | 133 | 0xff, 0xff, 0xff, 0x3f, 0xff, 0x0f, 0x00, 0x00, /* 0x1ac0-0x1aff */ |
| 134 | 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ | 134 | 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ |
| 135 | 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ | 135 | 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ |
| 136 | 0x03, 0x00, 0x00, 0x00, 0x3c, 0x3b, 0x00, 0x00, /* 0x1b80-0x1bbf */ | 136 | 0x03, 0x00, 0x00, 0x00, 0x3c, 0x3b, 0x00, 0x00, /* 0x1b80-0x1bbf */ |
| @@ -265,7 +265,7 @@ static const unsigned char nonspacing_table_data[49*64] = { | |||
| 265 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e00-0x10e3f */ | 265 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e00-0x10e3f */ |
| 266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e40-0x10e7f */ | 266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10e40-0x10e7f */ |
| 267 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, /* 0x10e80-0x10ebf */ | 267 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, /* 0x10e80-0x10ebf */ |
| 268 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, /* 0x10ec0-0x10eff */ | 268 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* 0x10ec0-0x10eff */ |
| 269 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f00-0x10f3f */ | 269 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f00-0x10f3f */ |
| 270 | 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f40-0x10f7f */ | 270 | 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f40-0x10f7f */ |
| 271 | 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f80-0x10fbf */ | 271 | 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10f80-0x10fbf */ |
| @@ -321,7 +321,7 @@ static const unsigned char nonspacing_table_data[49*64] = { | |||
| 321 | 0x00, 0xfc, 0x7f, 0x03, 0x00, 0x00, 0x00, 0x00, /* 0x11a80-0x11abf */ | 321 | 0x00, 0xfc, 0x7f, 0x03, 0x00, 0x00, 0x00, 0x00, /* 0x11a80-0x11abf */ |
| 322 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11ac0-0x11aff */ | 322 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11ac0-0x11aff */ |
| 323 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11b00-0x11b3f */ | 323 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11b00-0x11b3f */ |
| 324 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11b40-0x11b7f */ | 324 | 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, /* 0x11b40-0x11b7f */ |
| 325 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11b80-0x11bbf */ | 325 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11b80-0x11bbf */ |
| 326 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11bc0-0x11bff */ | 326 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11bc0-0x11bff */ |
| 327 | /* 0x11c00-0x11dff */ | 327 | /* 0x11c00-0x11dff */ |
| @@ -450,6 +450,15 @@ static const unsigned char nonspacing_table_data[49*64] = { | |||
| 450 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e540-0x1e57f */ | 450 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e540-0x1e57f */ |
| 451 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e580-0x1e5bf */ | 451 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e580-0x1e5bf */ |
| 452 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, /* 0x1e5c0-0x1e5ff */ | 452 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, /* 0x1e5c0-0x1e5ff */ |
| 453 | /* 0x1e600-0x1e7ff */ | ||
| 454 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e600-0x1e63f */ | ||
| 455 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e640-0x1e67f */ | ||
| 456 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e680-0x1e6bf */ | ||
| 457 | 0x00, 0x00, 0x00, 0x00, 0x48, 0xc0, 0x20, 0x00, /* 0x1e6c0-0x1e6ff */ | ||
| 458 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e700-0x1e73f */ | ||
| 459 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e740-0x1e77f */ | ||
| 460 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e780-0x1e7bf */ | ||
| 461 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e7c0-0x1e7ff */ | ||
| 453 | /* 0x1e800-0x1e9ff */ | 462 | /* 0x1e800-0x1e9ff */ |
| 454 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */ | 463 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */ |
| 455 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */ | 464 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */ |
| @@ -491,5 +500,5 @@ static const signed char nonspacing_table_ind[248] = { | |||
| 491 | -1, -1, -1, -1, -1, -1, 40, -1, /* 0x1b000-0x1bfff */ | 500 | -1, -1, -1, -1, -1, -1, 40, -1, /* 0x1b000-0x1bfff */ |
| 492 | -1, -1, -1, -1, -1, -1, -1, 41, /* 0x1c000-0x1cfff */ | 501 | -1, -1, -1, -1, -1, -1, -1, 41, /* 0x1c000-0x1cfff */ |
| 493 | 42, 43, -1, -1, -1, 44, -1, -1, /* 0x1d000-0x1dfff */ | 502 | 42, 43, -1, -1, -1, 44, -1, -1, /* 0x1d000-0x1dfff */ |
| 494 | 45, 46, 47, -1, 48, -1, -1, -1 /* 0x1e000-0x1efff */ | 503 | 45, 46, 47, 48, 49, -1, -1, -1 /* 0x1e000-0x1efff */ |
| 495 | }; | 504 | }; |
diff --git a/gl/uniwidth/width2.h b/gl/uniwidth/width2.h index f919989b..70bb049c 100644 --- a/gl/uniwidth/width2.h +++ b/gl/uniwidth/width2.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | 1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
| 2 | /* Width 2 property of Unicode characters. */ | 2 | /* Width 2 property of Unicode characters. */ |
| 3 | /* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */ | 3 | /* Generated automatically by gen-uni-tables.c for Unicode 17.0.0. */ |
| 4 | 4 | ||
| 5 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. | 5 | /* Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is free software: you can redistribute it and/or modify | 7 | This file is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU Lesser General Public License as | 8 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/unlocked-io.h b/gl/unlocked-io.h index 69ea6641..2b0d13e3 100644 --- a/gl/unlocked-io.h +++ b/gl/unlocked-io.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Prefer faster, non-thread-safe stdio functions if available. | 1 | /* Prefer faster, non-thread-safe stdio functions if available. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2004, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2004, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -73,6 +73,13 @@ | |||
| 73 | # define fgets_unlocked(x,y,z) fgets (x,y,z) | 73 | # define fgets_unlocked(x,y,z) fgets (x,y,z) |
| 74 | # endif | 74 | # endif |
| 75 | 75 | ||
| 76 | # if HAVE_DECL_FILENO_UNLOCKED || defined fileno_unlocked | ||
| 77 | # undef fileno | ||
| 78 | # define fileno(x) fileno_unlocked (x) | ||
| 79 | # else | ||
| 80 | # define fileno_unlocked(x) fileno (x) | ||
| 81 | # endif | ||
| 82 | |||
| 76 | # if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked | 83 | # if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked |
| 77 | # undef fputc | 84 | # undef fputc |
| 78 | # define fputc(x,y) fputc_unlocked (x,y) | 85 | # define fputc(x,y) fputc_unlocked (x,y) |
diff --git a/gl/unsetenv.c b/gl/unsetenv.c index d38ed37a..dab1b90c 100644 --- a/gl/unsetenv.c +++ b/gl/unsetenv.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1992, 1995-2002, 2005-2025 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992, 1995-2002, 2005-2026 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| @@ -56,15 +56,13 @@ __libc_lock_define_initialized (static, envlock) | |||
| 56 | int | 56 | int |
| 57 | unsetenv (const char *name) | 57 | unsetenv (const char *name) |
| 58 | { | 58 | { |
| 59 | size_t len; | ||
| 60 | |||
| 61 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) | 59 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) |
| 62 | { | 60 | { |
| 63 | __set_errno (EINVAL); | 61 | __set_errno (EINVAL); |
| 64 | return -1; | 62 | return -1; |
| 65 | } | 63 | } |
| 66 | 64 | ||
| 67 | len = strlen (name); | 65 | size_t len = strlen (name); |
| 68 | 66 | ||
| 69 | #if HAVE_DECL__PUTENV /* native Windows */ | 67 | #if HAVE_DECL__PUTENV /* native Windows */ |
| 70 | /* The Microsoft documentation | 68 | /* The Microsoft documentation |
| @@ -79,14 +77,13 @@ unsetenv (const char *name) | |||
| 79 | of the form "NAME=". (NB: This is a different convention than with glibc | 77 | of the form "NAME=". (NB: This is a different convention than with glibc |
| 80 | putenv, which expects a string of the form "NAME"!) */ | 78 | putenv, which expects a string of the form "NAME"!) */ |
| 81 | { | 79 | { |
| 82 | int putenv_result; | ||
| 83 | char *name_ = malloc (len + 2); | 80 | char *name_ = malloc (len + 2); |
| 84 | if (name_ == NULL) | 81 | if (name_ == NULL) |
| 85 | return -1; | 82 | return -1; |
| 86 | memcpy (name_, name, len); | 83 | memcpy (name_, name, len); |
| 87 | name_[len] = '='; | 84 | name_[len] = '='; |
| 88 | name_[len + 1] = 0; | 85 | name_[len + 1] = 0; |
| 89 | putenv_result = _putenv (name_); | 86 | int putenv_result = _putenv (name_); |
| 90 | /* In this particular case it is OK to free() the argument passed to | 87 | /* In this particular case it is OK to free() the argument passed to |
| 91 | _putenv. */ | 88 | _putenv. */ |
| 92 | free (name_); | 89 | free (name_); |
| @@ -138,12 +135,12 @@ extern int unsetenv (const char *); | |||
| 138 | int | 135 | int |
| 139 | rpl_unsetenv (const char *name) | 136 | rpl_unsetenv (const char *name) |
| 140 | { | 137 | { |
| 141 | int result = 0; | ||
| 142 | if (!name || !*name || strchr (name, '=')) | 138 | if (!name || !*name || strchr (name, '=')) |
| 143 | { | 139 | { |
| 144 | errno = EINVAL; | 140 | errno = EINVAL; |
| 145 | return -1; | 141 | return -1; |
| 146 | } | 142 | } |
| 143 | int result = 0; | ||
| 147 | while (getenv (name)) | 144 | while (getenv (name)) |
| 148 | # if !VOID_UNSETENV | 145 | # if !VOID_UNSETENV |
| 149 | result = | 146 | result = |
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c index f46e8701..85e30b90 100644 --- a/gl/vasnprintf.c +++ b/gl/vasnprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* vsprintf with automatic memory allocation. | 1 | /* vsprintf with automatic memory allocation. |
| 2 | Copyright (C) 1999, 2002-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2002-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -180,7 +180,7 @@ | |||
| 180 | # define SNPRINTF swprintf | 180 | # define SNPRINTF swprintf |
| 181 | # endif | 181 | # endif |
| 182 | # else | 182 | # else |
| 183 | /* Old platforms such as NetBSD 3.0, OpenBSD 3.8, HP-UX 11.00, IRIX 6.5. */ | 183 | /* Old platforms such as NetBSD 3.0, OpenBSD 3.8, HP-UX 11.00. */ |
| 184 | # define TCHAR_T char | 184 | # define TCHAR_T char |
| 185 | # endif | 185 | # endif |
| 186 | #endif | 186 | #endif |
| @@ -439,7 +439,7 @@ thousands_separator_char (char stackbuf[10]) | |||
| 439 | stackbuf[strlen (stackbuf) - 3] = '\0'; | 439 | stackbuf[strlen (stackbuf) - 3] = '\0'; |
| 440 | # if defined __sun | 440 | # if defined __sun |
| 441 | /* Solaris specific hack: Replace wrong result (0xC2 means U+00A0). */ | 441 | /* Solaris specific hack: Replace wrong result (0xC2 means U+00A0). */ |
| 442 | if (strcmp (&stackbuf[1], "\302") == 0) | 442 | if (streq (&stackbuf[1], "\302")) |
| 443 | strcpy (&stackbuf[1], MB_CUR_MAX > 1 ? "\302\240" : "\240"); | 443 | strcpy (&stackbuf[1], MB_CUR_MAX > 1 ? "\302\240" : "\240"); |
| 444 | # endif | 444 | # endif |
| 445 | return &stackbuf[1]; | 445 | return &stackbuf[1]; |
| @@ -524,7 +524,7 @@ thousands_separator_wchar (wchar_t stackbuf[10]) | |||
| 524 | /* Now tmp = L"1<thousep>000". */ | 524 | /* Now tmp = L"1<thousep>000". */ |
| 525 | tmp[strlen (tmp) - 3] = '\0'; | 525 | tmp[strlen (tmp) - 3] = '\0'; |
| 526 | /* Solaris specific hack: Replace wrong result (0xC2 means U+00A0). */ | 526 | /* Solaris specific hack: Replace wrong result (0xC2 means U+00A0). */ |
| 527 | if (strcmp (&tmp[1], "\302") == 0) | 527 | if (streq (&tmp[1], "\302")) |
| 528 | strcpy (&tmp[1], MB_CUR_MAX > 1 ? "\302\240" : "\240"); | 528 | strcpy (&tmp[1], MB_CUR_MAX > 1 ? "\302\240" : "\240"); |
| 529 | if (tmp[1] != '\0') | 529 | if (tmp[1] != '\0') |
| 530 | { | 530 | { |
| @@ -739,19 +739,18 @@ multiply (mpn_t src1, mpn_t src2, mpn_t *dest) | |||
| 739 | /* Here 1 <= len1 <= len2. */ | 739 | /* Here 1 <= len1 <= len2. */ |
| 740 | size_t dlen; | 740 | size_t dlen; |
| 741 | mp_limb_t *dp; | 741 | mp_limb_t *dp; |
| 742 | size_t k, i, j; | ||
| 743 | 742 | ||
| 744 | dlen = len1 + len2; | 743 | dlen = len1 + len2; |
| 745 | dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); | 744 | dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); |
| 746 | if (dp == NULL) | 745 | if (dp == NULL) |
| 747 | return NOMEM_PTR; | 746 | return NOMEM_PTR; |
| 748 | for (k = len2; k > 0; ) | 747 | for (size_t k = len2; k > 0; ) |
| 749 | dp[--k] = 0; | 748 | dp[--k] = 0; |
| 750 | for (i = 0; i < len1; i++) | 749 | for (size_t i = 0; i < len1; i++) |
| 751 | { | 750 | { |
| 752 | mp_limb_t digit1 = p1[i]; | 751 | mp_limb_t digit1 = p1[i]; |
| 753 | mp_twolimb_t carry = 0; | 752 | mp_twolimb_t carry = 0; |
| 754 | for (j = 0; j < len2; j++) | 753 | for (size_t j = 0; j < len2; j++) |
| 755 | { | 754 | { |
| 756 | mp_limb_t digit2 = p2[j]; | 755 | mp_limb_t digit2 = p2[j]; |
| 757 | carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; | 756 | carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; |
| @@ -835,7 +834,6 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 835 | size_t a_len = a.nlimbs; | 834 | size_t a_len = a.nlimbs; |
| 836 | const mp_limb_t *b_ptr = b.limbs; | 835 | const mp_limb_t *b_ptr = b.limbs; |
| 837 | size_t b_len = b.nlimbs; | 836 | size_t b_len = b.nlimbs; |
| 838 | mp_limb_t *roomptr; | ||
| 839 | mp_limb_t *tmp_roomptr = NULL; | 837 | mp_limb_t *tmp_roomptr = NULL; |
| 840 | mp_limb_t *q_ptr; | 838 | mp_limb_t *q_ptr; |
| 841 | size_t q_len; | 839 | size_t q_len; |
| @@ -845,7 +843,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 845 | /* Allocate room for a_len+2 digits. | 843 | /* Allocate room for a_len+2 digits. |
| 846 | (Need a_len+1 digits for the real division and 1 more digit for the | 844 | (Need a_len+1 digits for the real division and 1 more digit for the |
| 847 | final rounding of q.) */ | 845 | final rounding of q.) */ |
| 848 | roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); | 846 | mp_limb_t *roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); |
| 849 | if (roomptr == NULL) | 847 | if (roomptr == NULL) |
| 850 | return NOMEM_PTR; | 848 | return NOMEM_PTR; |
| 851 | 849 | ||
| @@ -887,8 +885,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 887 | mp_limb_t remainder = 0; | 885 | mp_limb_t remainder = 0; |
| 888 | const mp_limb_t *sourceptr = a_ptr + a_len; | 886 | const mp_limb_t *sourceptr = a_ptr + a_len; |
| 889 | mp_limb_t *destptr = q_ptr + a_len; | 887 | mp_limb_t *destptr = q_ptr + a_len; |
| 890 | size_t count; | 888 | for (size_t count = a_len; count > 0; count--) |
| 891 | for (count = a_len; count > 0; count--) | ||
| 892 | { | 889 | { |
| 893 | mp_twolimb_t num = | 890 | mp_twolimb_t num = |
| 894 | ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; | 891 | ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; |
| @@ -989,8 +986,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 989 | const mp_limb_t *sourceptr = b_ptr; | 986 | const mp_limb_t *sourceptr = b_ptr; |
| 990 | mp_limb_t *destptr = tmp_roomptr; | 987 | mp_limb_t *destptr = tmp_roomptr; |
| 991 | mp_twolimb_t accu = 0; | 988 | mp_twolimb_t accu = 0; |
| 992 | size_t count; | 989 | for (size_t count = b_len; count > 0; count--) |
| 993 | for (count = b_len; count > 0; count--) | ||
| 994 | { | 990 | { |
| 995 | accu += (mp_twolimb_t) *sourceptr++ << s; | 991 | accu += (mp_twolimb_t) *sourceptr++ << s; |
| 996 | *destptr++ = (mp_limb_t) accu; | 992 | *destptr++ = (mp_limb_t) accu; |
| @@ -1017,8 +1013,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 1017 | const mp_limb_t *sourceptr = a_ptr; | 1013 | const mp_limb_t *sourceptr = a_ptr; |
| 1018 | mp_limb_t *destptr = r_ptr; | 1014 | mp_limb_t *destptr = r_ptr; |
| 1019 | mp_twolimb_t accu = 0; | 1015 | mp_twolimb_t accu = 0; |
| 1020 | size_t count; | 1016 | for (size_t count = a_len; count > 0; count--) |
| 1021 | for (count = a_len; count > 0; count--) | ||
| 1022 | { | 1017 | { |
| 1023 | accu += (mp_twolimb_t) *sourceptr++ << s; | 1018 | accu += (mp_twolimb_t) *sourceptr++ << s; |
| 1024 | *destptr++ = (mp_limb_t) accu; | 1019 | *destptr++ = (mp_limb_t) accu; |
| @@ -1094,8 +1089,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 1094 | const mp_limb_t *sourceptr = b_ptr; | 1089 | const mp_limb_t *sourceptr = b_ptr; |
| 1095 | mp_limb_t *destptr = r_ptr + j; | 1090 | mp_limb_t *destptr = r_ptr + j; |
| 1096 | mp_twolimb_t carry = 0; | 1091 | mp_twolimb_t carry = 0; |
| 1097 | size_t count; | 1092 | for (size_t count = b_len; count > 0; count--) |
| 1098 | for (count = b_len; count > 0; count--) | ||
| 1099 | { | 1093 | { |
| 1100 | /* Here 0 <= carry <= q*. */ | 1094 | /* Here 0 <= carry <= q*. */ |
| 1101 | carry = | 1095 | carry = |
| @@ -1119,8 +1113,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 1119 | const mp_limb_t *sourceptr = b_ptr; | 1113 | const mp_limb_t *sourceptr = b_ptr; |
| 1120 | mp_limb_t *destptr = r_ptr + j; | 1114 | mp_limb_t *destptr = r_ptr + j; |
| 1121 | mp_limb_t carry = 0; | 1115 | mp_limb_t carry = 0; |
| 1122 | size_t count; | 1116 | for (size_t count = b_len; count > 0; count--) |
| 1123 | for (count = b_len; count > 0; count--) | ||
| 1124 | { | 1117 | { |
| 1125 | mp_limb_t source1 = *sourceptr++; | 1118 | mp_limb_t source1 = *sourceptr++; |
| 1126 | mp_limb_t source2 = *destptr; | 1119 | mp_limb_t source2 = *destptr; |
| @@ -1152,8 +1145,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 1152 | { | 1145 | { |
| 1153 | mp_limb_t ptr = r_ptr + r_len; | 1146 | mp_limb_t ptr = r_ptr + r_len; |
| 1154 | mp_twolimb_t accu = 0; | 1147 | mp_twolimb_t accu = 0; |
| 1155 | size_t count; | 1148 | for (size_t count = r_len; count > 0; count--) |
| 1156 | for (count = r_len; count > 0; count--) | ||
| 1157 | { | 1149 | { |
| 1158 | accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; | 1150 | accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; |
| 1159 | accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); | 1151 | accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); |
| @@ -1168,29 +1160,25 @@ divide (mpn_t a, mpn_t b, mpn_t *q) | |||
| 1168 | /* Compare r << 1 with b. */ | 1160 | /* Compare r << 1 with b. */ |
| 1169 | if (r_len > b_len) | 1161 | if (r_len > b_len) |
| 1170 | goto increment_q; | 1162 | goto increment_q; |
| 1171 | { | 1163 | for (size_t i = b_len;;) |
| 1172 | size_t i; | 1164 | { |
| 1173 | for (i = b_len;;) | 1165 | mp_limb_t r_i = |
| 1174 | { | 1166 | (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) |
| 1175 | mp_limb_t r_i = | 1167 | | (i < r_len ? r_ptr[i] << 1 : 0); |
| 1176 | (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | 1168 | mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); |
| 1177 | | (i < r_len ? r_ptr[i] << 1 : 0); | 1169 | if (r_i > b_i) |
| 1178 | mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); | 1170 | goto increment_q; |
| 1179 | if (r_i > b_i) | 1171 | if (r_i < b_i) |
| 1180 | goto increment_q; | 1172 | goto keep_q; |
| 1181 | if (r_i < b_i) | 1173 | if (i == 0) |
| 1182 | goto keep_q; | 1174 | break; |
| 1183 | if (i == 0) | 1175 | i--; |
| 1184 | break; | 1176 | } |
| 1185 | i--; | ||
| 1186 | } | ||
| 1187 | } | ||
| 1188 | if (q_len > 0 && ((q_ptr[0] & 1) != 0)) | 1177 | if (q_len > 0 && ((q_ptr[0] & 1) != 0)) |
| 1189 | /* q is odd. */ | 1178 | /* q is odd. */ |
| 1190 | increment_q: | 1179 | increment_q: |
| 1191 | { | 1180 | { |
| 1192 | size_t i; | 1181 | for (size_t i = 0; i < q_len; i++) |
| 1193 | for (i = 0; i < q_len; i++) | ||
| 1194 | if (++(q_ptr[i]) != 0) | 1182 | if (++(q_ptr[i]) != 0) |
| 1195 | goto keep_q; | 1183 | goto keep_q; |
| 1196 | q_ptr[q_len++] = 1; | 1184 | q_ptr[q_len++] = 1; |
| @@ -1236,8 +1224,7 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes) | |||
| 1236 | /* Divide a by 10^9, in-place. */ | 1224 | /* Divide a by 10^9, in-place. */ |
| 1237 | mp_limb_t remainder = 0; | 1225 | mp_limb_t remainder = 0; |
| 1238 | mp_limb_t *ptr = a_ptr + a_len; | 1226 | mp_limb_t *ptr = a_ptr + a_len; |
| 1239 | size_t count; | 1227 | for (size_t count = a_len; count > 0; count--) |
| 1240 | for (count = a_len; count > 0; count--) | ||
| 1241 | { | 1228 | { |
| 1242 | mp_twolimb_t num = | 1229 | mp_twolimb_t num = |
| 1243 | ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; | 1230 | ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; |
| @@ -1245,7 +1232,7 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes) | |||
| 1245 | remainder = num % 1000000000; | 1232 | remainder = num % 1000000000; |
| 1246 | } | 1233 | } |
| 1247 | /* Store the remainder as 9 decimal digits. */ | 1234 | /* Store the remainder as 9 decimal digits. */ |
| 1248 | for (count = 9; count > 0; count--) | 1235 | for (size_t count = 9; count > 0; count--) |
| 1249 | { | 1236 | { |
| 1250 | *d_ptr++ = '0' + (remainder % 10); | 1237 | *d_ptr++ = '0' + (remainder % 10); |
| 1251 | remainder = remainder / 10; | 1238 | remainder = remainder / 10; |
| @@ -1279,18 +1266,15 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes) | |||
| 1279 | static void * | 1266 | static void * |
| 1280 | decode_long_double (long double x, int *ep, mpn_t *mp) | 1267 | decode_long_double (long double x, int *ep, mpn_t *mp) |
| 1281 | { | 1268 | { |
| 1282 | mpn_t m; | ||
| 1283 | int exp; | ||
| 1284 | long double y; | ||
| 1285 | size_t i; | ||
| 1286 | |||
| 1287 | /* Allocate memory for result. */ | 1269 | /* Allocate memory for result. */ |
| 1270 | mpn_t m; | ||
| 1288 | m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; | 1271 | m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; |
| 1289 | m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); | 1272 | m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); |
| 1290 | if (m.limbs == NULL) | 1273 | if (m.limbs == NULL) |
| 1291 | return NULL; | 1274 | return NULL; |
| 1292 | /* Split into exponential part and mantissa. */ | 1275 | /* Split into exponential part and mantissa. */ |
| 1293 | y = safe_frexpl (x, &exp); | 1276 | int exp; |
| 1277 | long double y = safe_frexpl (x, &exp); | ||
| 1294 | if (!(y >= 0.0L && y < 1.0L)) | 1278 | if (!(y >= 0.0L && y < 1.0L)) |
| 1295 | abort (); | 1279 | abort (); |
| 1296 | /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the | 1280 | /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the |
| @@ -1328,7 +1312,7 @@ decode_long_double (long double x, int *ep, mpn_t *mp) | |||
| 1328 | } | 1312 | } |
| 1329 | # endif | 1313 | # endif |
| 1330 | # endif | 1314 | # endif |
| 1331 | for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) | 1315 | for (size_t i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) |
| 1332 | { | 1316 | { |
| 1333 | mp_limb_t hi, lo; | 1317 | mp_limb_t hi, lo; |
| 1334 | y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); | 1318 | y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); |
| @@ -1367,18 +1351,15 @@ decode_long_double (long double x, int *ep, mpn_t *mp) | |||
| 1367 | static void * | 1351 | static void * |
| 1368 | decode_double (double x, int *ep, mpn_t *mp) | 1352 | decode_double (double x, int *ep, mpn_t *mp) |
| 1369 | { | 1353 | { |
| 1370 | mpn_t m; | ||
| 1371 | int exp; | ||
| 1372 | double y; | ||
| 1373 | size_t i; | ||
| 1374 | |||
| 1375 | /* Allocate memory for result. */ | 1354 | /* Allocate memory for result. */ |
| 1355 | mpn_t m; | ||
| 1376 | m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; | 1356 | m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; |
| 1377 | m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); | 1357 | m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); |
| 1378 | if (m.limbs == NULL) | 1358 | if (m.limbs == NULL) |
| 1379 | return NULL; | 1359 | return NULL; |
| 1380 | /* Split into exponential part and mantissa. */ | 1360 | /* Split into exponential part and mantissa. */ |
| 1381 | y = frexp (x, &exp); | 1361 | int exp; |
| 1362 | double y = frexp (x, &exp); | ||
| 1382 | if (!(y >= 0.0 && y < 1.0)) | 1363 | if (!(y >= 0.0 && y < 1.0)) |
| 1383 | abort (); | 1364 | abort (); |
| 1384 | /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the | 1365 | /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the |
| @@ -1416,7 +1397,7 @@ decode_double (double x, int *ep, mpn_t *mp) | |||
| 1416 | } | 1397 | } |
| 1417 | # endif | 1398 | # endif |
| 1418 | # endif | 1399 | # endif |
| 1419 | for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) | 1400 | for (size_t i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) |
| 1420 | { | 1401 | { |
| 1421 | mp_limb_t hi, lo; | 1402 | mp_limb_t hi, lo; |
| 1422 | y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); | 1403 | y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); |
| @@ -1451,24 +1432,11 @@ decode_double (double x, int *ep, mpn_t *mp) | |||
| 1451 | static char * | 1432 | static char * |
| 1452 | scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | 1433 | scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) |
| 1453 | { | 1434 | { |
| 1454 | int s; | ||
| 1455 | size_t extra_zeroes; | ||
| 1456 | unsigned int abs_n; | ||
| 1457 | unsigned int abs_s; | ||
| 1458 | mp_limb_t *pow5_ptr; | ||
| 1459 | size_t pow5_len; | ||
| 1460 | unsigned int s_limbs; | ||
| 1461 | unsigned int s_bits; | ||
| 1462 | mpn_t pow5; | ||
| 1463 | mpn_t z; | ||
| 1464 | void *z_memory; | ||
| 1465 | char *digits; | ||
| 1466 | |||
| 1467 | /* x = 2^e * m, hence | 1435 | /* x = 2^e * m, hence |
| 1468 | y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) | 1436 | y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) |
| 1469 | = round (2^s * 5^n * m). */ | 1437 | = round (2^s * 5^n * m). */ |
| 1470 | s = e + n; | 1438 | int s = e + n; |
| 1471 | extra_zeroes = 0; | 1439 | size_t extra_zeroes = 0; |
| 1472 | /* Factor out a common power of 10 if possible. */ | 1440 | /* Factor out a common power of 10 if possible. */ |
| 1473 | if (s > 0 && n > 0) | 1441 | if (s > 0 && n > 0) |
| 1474 | { | 1442 | { |
| @@ -1481,11 +1449,12 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1481 | z = round (2^s * 5^n * m). */ | 1449 | z = round (2^s * 5^n * m). */ |
| 1482 | /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same | 1450 | /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same |
| 1483 | sign. 2.322 is slightly larger than log(5)/log(2). */ | 1451 | sign. 2.322 is slightly larger than log(5)/log(2). */ |
| 1484 | abs_n = (n >= 0 ? n : -n); | 1452 | unsigned int abs_n = (n >= 0 ? n : -n); |
| 1485 | abs_s = (s >= 0 ? s : -s); | 1453 | unsigned int abs_s = (s >= 0 ? s : -s); |
| 1486 | pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 | 1454 | mp_limb_t *pow5_ptr = |
| 1487 | + abs_s / GMP_LIMB_BITS + 1) | 1455 | (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 |
| 1488 | * sizeof (mp_limb_t)); | 1456 | + abs_s / GMP_LIMB_BITS + 1) |
| 1457 | * sizeof (mp_limb_t)); | ||
| 1489 | if (pow5_ptr == NULL) | 1458 | if (pow5_ptr == NULL) |
| 1490 | { | 1459 | { |
| 1491 | free (memory); | 1460 | free (memory); |
| @@ -1493,7 +1462,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1493 | } | 1462 | } |
| 1494 | /* Initialize with 1. */ | 1463 | /* Initialize with 1. */ |
| 1495 | pow5_ptr[0] = 1; | 1464 | pow5_ptr[0] = 1; |
| 1496 | pow5_len = 1; | 1465 | size_t pow5_len = 1; |
| 1497 | /* Multiply with 5^|n|. */ | 1466 | /* Multiply with 5^|n|. */ |
| 1498 | if (abs_n > 0) | 1467 | if (abs_n > 0) |
| 1499 | { | 1468 | { |
| @@ -1502,13 +1471,11 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1502 | 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, | 1471 | 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, |
| 1503 | 48828125, 244140625, 1220703125 | 1472 | 48828125, 244140625, 1220703125 |
| 1504 | }; | 1473 | }; |
| 1505 | unsigned int n13; | 1474 | for (unsigned int n13 = 0; n13 <= abs_n; n13 += 13) |
| 1506 | for (n13 = 0; n13 <= abs_n; n13 += 13) | ||
| 1507 | { | 1475 | { |
| 1508 | mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; | 1476 | mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; |
| 1509 | size_t j; | ||
| 1510 | mp_twolimb_t carry = 0; | 1477 | mp_twolimb_t carry = 0; |
| 1511 | for (j = 0; j < pow5_len; j++) | 1478 | for (size_t j = 0; j < pow5_len; j++) |
| 1512 | { | 1479 | { |
| 1513 | mp_limb_t digit2 = pow5_ptr[j]; | 1480 | mp_limb_t digit2 = pow5_ptr[j]; |
| 1514 | carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; | 1481 | carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; |
| @@ -1519,8 +1486,11 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1519 | pow5_ptr[pow5_len++] = (mp_limb_t) carry; | 1486 | pow5_ptr[pow5_len++] = (mp_limb_t) carry; |
| 1520 | } | 1487 | } |
| 1521 | } | 1488 | } |
| 1522 | s_limbs = abs_s / GMP_LIMB_BITS; | 1489 | unsigned int s_limbs = abs_s / GMP_LIMB_BITS; |
| 1523 | s_bits = abs_s % GMP_LIMB_BITS; | 1490 | unsigned int s_bits = abs_s % GMP_LIMB_BITS; |
| 1491 | mpn_t pow5; | ||
| 1492 | mpn_t z; | ||
| 1493 | void *z_memory; | ||
| 1524 | if (n >= 0 ? s >= 0 : s <= 0) | 1494 | if (n >= 0 ? s >= 0 : s <= 0) |
| 1525 | { | 1495 | { |
| 1526 | /* Multiply with 2^|s|. */ | 1496 | /* Multiply with 2^|s|. */ |
| @@ -1528,8 +1498,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1528 | { | 1498 | { |
| 1529 | mp_limb_t *ptr = pow5_ptr; | 1499 | mp_limb_t *ptr = pow5_ptr; |
| 1530 | mp_twolimb_t accu = 0; | 1500 | mp_twolimb_t accu = 0; |
| 1531 | size_t count; | 1501 | for (size_t count = pow5_len; count > 0; count--) |
| 1532 | for (count = pow5_len; count > 0; count--) | ||
| 1533 | { | 1502 | { |
| 1534 | accu += (mp_twolimb_t) *ptr << s_bits; | 1503 | accu += (mp_twolimb_t) *ptr << s_bits; |
| 1535 | *ptr++ = (mp_limb_t) accu; | 1504 | *ptr++ = (mp_limb_t) accu; |
| @@ -1543,13 +1512,12 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1543 | } | 1512 | } |
| 1544 | if (s_limbs > 0) | 1513 | if (s_limbs > 0) |
| 1545 | { | 1514 | { |
| 1546 | size_t count; | 1515 | for (size_t count = pow5_len; count > 0;) |
| 1547 | for (count = pow5_len; count > 0;) | ||
| 1548 | { | 1516 | { |
| 1549 | count--; | 1517 | count--; |
| 1550 | pow5_ptr[s_limbs + count] = pow5_ptr[count]; | 1518 | pow5_ptr[s_limbs + count] = pow5_ptr[count]; |
| 1551 | } | 1519 | } |
| 1552 | for (count = s_limbs; count > 0;) | 1520 | for (size_t count = s_limbs; count > 0;) |
| 1553 | { | 1521 | { |
| 1554 | count--; | 1522 | count--; |
| 1555 | pow5_ptr[count] = 0; | 1523 | pow5_ptr[count] = 0; |
| @@ -1590,8 +1558,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1590 | /* Construct 2^|s|. */ | 1558 | /* Construct 2^|s|. */ |
| 1591 | { | 1559 | { |
| 1592 | mp_limb_t *ptr = pow5_ptr + pow5_len; | 1560 | mp_limb_t *ptr = pow5_ptr + pow5_len; |
| 1593 | size_t i; | 1561 | for (size_t i = 0; i < s_limbs; i++) |
| 1594 | for (i = 0; i < s_limbs; i++) | ||
| 1595 | ptr[i] = 0; | 1562 | ptr[i] = 0; |
| 1596 | ptr[s_limbs] = (mp_limb_t) 1 << s_bits; | 1563 | ptr[s_limbs] = (mp_limb_t) 1 << s_bits; |
| 1597 | denominator.limbs = ptr; | 1564 | denominator.limbs = ptr; |
| @@ -1616,17 +1583,13 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1616 | } | 1583 | } |
| 1617 | { | 1584 | { |
| 1618 | mp_limb_t *destptr = num_ptr; | 1585 | mp_limb_t *destptr = num_ptr; |
| 1619 | { | 1586 | for (size_t i = 0; i < s_limbs; i++) |
| 1620 | size_t i; | 1587 | *destptr++ = 0; |
| 1621 | for (i = 0; i < s_limbs; i++) | ||
| 1622 | *destptr++ = 0; | ||
| 1623 | } | ||
| 1624 | if (s_bits > 0) | 1588 | if (s_bits > 0) |
| 1625 | { | 1589 | { |
| 1626 | const mp_limb_t *sourceptr = m.limbs; | 1590 | const mp_limb_t *sourceptr = m.limbs; |
| 1627 | mp_twolimb_t accu = 0; | 1591 | mp_twolimb_t accu = 0; |
| 1628 | size_t count; | 1592 | for (size_t count = m.nlimbs; count > 0; count--) |
| 1629 | for (count = m.nlimbs; count > 0; count--) | ||
| 1630 | { | 1593 | { |
| 1631 | accu += (mp_twolimb_t) *sourceptr++ << s_bits; | 1594 | accu += (mp_twolimb_t) *sourceptr++ << s_bits; |
| 1632 | *destptr++ = (mp_limb_t) accu; | 1595 | *destptr++ = (mp_limb_t) accu; |
| @@ -1638,8 +1601,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1638 | else | 1601 | else |
| 1639 | { | 1602 | { |
| 1640 | const mp_limb_t *sourceptr = m.limbs; | 1603 | const mp_limb_t *sourceptr = m.limbs; |
| 1641 | size_t count; | 1604 | for (size_t count = m.nlimbs; count > 0; count--) |
| 1642 | for (count = m.nlimbs; count > 0; count--) | ||
| 1643 | *destptr++ = *sourceptr++; | 1605 | *destptr++ = *sourceptr++; |
| 1644 | } | 1606 | } |
| 1645 | numerator.limbs = num_ptr; | 1607 | numerator.limbs = num_ptr; |
| @@ -1656,7 +1618,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) | |||
| 1656 | 1618 | ||
| 1657 | if (z_memory == NOMEM_PTR) | 1619 | if (z_memory == NOMEM_PTR) |
| 1658 | return NULL; | 1620 | return NULL; |
| 1659 | digits = convert_to_decimal (z, extra_zeroes); | 1621 | char *digits = convert_to_decimal (z, extra_zeroes); |
| 1660 | free (z_memory); | 1622 | free (z_memory); |
| 1661 | return digits; | 1623 | return digits; |
| 1662 | } | 1624 | } |
| @@ -1711,13 +1673,9 @@ scale10_round_decimal_double (double x, int n) | |||
| 1711 | static int | 1673 | static int |
| 1712 | floorlog10l (long double x) | 1674 | floorlog10l (long double x) |
| 1713 | { | 1675 | { |
| 1714 | int exp; | ||
| 1715 | long double y; | ||
| 1716 | double z; | ||
| 1717 | double l; | ||
| 1718 | |||
| 1719 | /* Split into exponential part and mantissa. */ | 1676 | /* Split into exponential part and mantissa. */ |
| 1720 | y = safe_frexpl (x, &exp); | 1677 | int exp; |
| 1678 | long double y = safe_frexpl (x, &exp); | ||
| 1721 | if (!(y >= 0.0L && y < 1.0L)) | 1679 | if (!(y >= 0.0L && y < 1.0L)) |
| 1722 | abort (); | 1680 | abort (); |
| 1723 | if (y == 0.0L) | 1681 | if (y == 0.0L) |
| @@ -1758,8 +1716,8 @@ floorlog10l (long double x) | |||
| 1758 | if (!(y >= 0.5L && y < 1.0L)) | 1716 | if (!(y >= 0.5L && y < 1.0L)) |
| 1759 | abort (); | 1717 | abort (); |
| 1760 | /* Compute an approximation for l = log2(x) = exp + log2(y). */ | 1718 | /* Compute an approximation for l = log2(x) = exp + log2(y). */ |
| 1761 | l = exp; | 1719 | double l = exp; |
| 1762 | z = y; | 1720 | double z = y; |
| 1763 | if (z < 0.70710678118654752444) | 1721 | if (z < 0.70710678118654752444) |
| 1764 | { | 1722 | { |
| 1765 | z *= 1.4142135623730950488; | 1723 | z *= 1.4142135623730950488; |
| @@ -1802,13 +1760,9 @@ floorlog10l (long double x) | |||
| 1802 | static int | 1760 | static int |
| 1803 | floorlog10 (double x) | 1761 | floorlog10 (double x) |
| 1804 | { | 1762 | { |
| 1805 | int exp; | ||
| 1806 | double y; | ||
| 1807 | double z; | ||
| 1808 | double l; | ||
| 1809 | |||
| 1810 | /* Split into exponential part and mantissa. */ | 1763 | /* Split into exponential part and mantissa. */ |
| 1811 | y = frexp (x, &exp); | 1764 | int exp; |
| 1765 | double y = frexp (x, &exp); | ||
| 1812 | if (!(y >= 0.0 && y < 1.0)) | 1766 | if (!(y >= 0.0 && y < 1.0)) |
| 1813 | abort (); | 1767 | abort (); |
| 1814 | if (y == 0.0) | 1768 | if (y == 0.0) |
| @@ -1849,8 +1803,8 @@ floorlog10 (double x) | |||
| 1849 | if (!(y >= 0.5 && y < 1.0)) | 1803 | if (!(y >= 0.5 && y < 1.0)) |
| 1850 | abort (); | 1804 | abort (); |
| 1851 | /* Compute an approximation for l = log2(x) = exp + log2(y). */ | 1805 | /* Compute an approximation for l = log2(x) = exp + log2(y). */ |
| 1852 | l = exp; | 1806 | double l = exp; |
| 1853 | z = y; | 1807 | double z = y; |
| 1854 | if (z < 0.70710678118654752444) | 1808 | if (z < 0.70710678118654752444) |
| 1855 | { | 1809 | { |
| 1856 | z *= 1.4142135623730950488; | 1810 | z *= 1.4142135623730950488; |
| @@ -2513,21 +2467,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2513 | goto fail_1_with_EINVAL; | 2467 | goto fail_1_with_EINVAL; |
| 2514 | 2468 | ||
| 2515 | { | 2469 | { |
| 2516 | size_t buf_neededlength; | ||
| 2517 | TCHAR_T *buf; | ||
| 2518 | TCHAR_T *buf_malloced; | ||
| 2519 | const FCHAR_T *cp; | ||
| 2520 | size_t di; | ||
| 2521 | DIRECTIVE *dp; | ||
| 2522 | /* Output string accumulator. */ | ||
| 2523 | DCHAR_T *result; | ||
| 2524 | size_t allocated; | ||
| 2525 | size_t length; | ||
| 2526 | |||
| 2527 | /* Allocate a small buffer that will hold a directive passed to | 2470 | /* Allocate a small buffer that will hold a directive passed to |
| 2528 | sprintf or snprintf. */ | 2471 | sprintf or snprintf. */ |
| 2529 | buf_neededlength = | 2472 | size_t buf_neededlength = |
| 2530 | xsum4 (7, d.max_width_length, d.max_precision_length, 6); | 2473 | xsum4 (7, d.max_width_length, d.max_precision_length, 6); |
| 2474 | TCHAR_T *buf; | ||
| 2475 | TCHAR_T *buf_malloced; | ||
| 2531 | #if HAVE_ALLOCA | 2476 | #if HAVE_ALLOCA |
| 2532 | if (buf_neededlength < 4000 / sizeof (TCHAR_T)) | 2477 | if (buf_neededlength < 4000 / sizeof (TCHAR_T)) |
| 2533 | { | 2478 | { |
| @@ -2546,9 +2491,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2546 | buf_malloced = buf; | 2491 | buf_malloced = buf; |
| 2547 | } | 2492 | } |
| 2548 | 2493 | ||
| 2549 | result = resultbuf; | 2494 | /* Output string accumulator. */ |
| 2550 | allocated = (resultbuf != NULL ? *lengthp : 0); | 2495 | DCHAR_T *result = resultbuf; |
| 2551 | length = 0; | 2496 | size_t allocated = (resultbuf != NULL ? *lengthp : 0); |
| 2497 | size_t length = 0; | ||
| 2498 | |||
| 2552 | /* Invariants: | 2499 | /* Invariants: |
| 2553 | result is either == resultbuf or malloc-allocated. | 2500 | result is either == resultbuf or malloc-allocated. |
| 2554 | If result == NULL, resultbuf is == NULL as well. | 2501 | If result == NULL, resultbuf is == NULL as well. |
| @@ -2559,15 +2506,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2559 | #define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \ | 2506 | #define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \ |
| 2560 | if ((needed) > allocated) \ | 2507 | if ((needed) > allocated) \ |
| 2561 | { \ | 2508 | { \ |
| 2562 | size_t memory_size; \ | ||
| 2563 | DCHAR_T *memory; \ | ||
| 2564 | \ | ||
| 2565 | allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ | 2509 | allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ |
| 2566 | if ((needed) > allocated) \ | 2510 | if ((needed) > allocated) \ |
| 2567 | allocated = (needed); \ | 2511 | allocated = (needed); \ |
| 2568 | memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ | 2512 | size_t memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ |
| 2569 | if (size_overflow_p (memory_size)) \ | 2513 | if (size_overflow_p (memory_size)) \ |
| 2570 | oom_statement \ | 2514 | oom_statement \ |
| 2515 | DCHAR_T *memory; \ | ||
| 2571 | if (result == resultbuf) \ | 2516 | if (result == resultbuf) \ |
| 2572 | memory = (DCHAR_T *) malloc (memory_size); \ | 2517 | memory = (DCHAR_T *) malloc (memory_size); \ |
| 2573 | else \ | 2518 | else \ |
| @@ -2581,6 +2526,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2581 | #define ENSURE_ALLOCATION(needed) \ | 2526 | #define ENSURE_ALLOCATION(needed) \ |
| 2582 | ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; ) | 2527 | ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; ) |
| 2583 | 2528 | ||
| 2529 | const FCHAR_T *cp; | ||
| 2530 | size_t di; | ||
| 2531 | DIRECTIVE *dp; | ||
| 2584 | for (cp = format, di = 0, dp = &d.dir[0]; ; cp = dp->dir_end, di++, dp++) | 2532 | for (cp = format, di = 0, dp = &d.dir[0]; ; cp = dp->dir_end, di++, dp++) |
| 2585 | { | 2533 | { |
| 2586 | if (cp != dp->dir_start) | 2534 | if (cp != dp->dir_start) |
| @@ -2681,22 +2629,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2681 | { | 2629 | { |
| 2682 | arg_type type = a.arg[dp->arg_index].type; | 2630 | arg_type type = a.arg[dp->arg_index].type; |
| 2683 | int flags = dp->flags; | 2631 | int flags = dp->flags; |
| 2684 | int has_width; | ||
| 2685 | size_t width; | ||
| 2686 | int has_precision; | ||
| 2687 | size_t precision; | ||
| 2688 | 2632 | ||
| 2689 | has_width = 0; | 2633 | int has_width = 0; |
| 2690 | width = 0; | 2634 | size_t width = 0; |
| 2691 | if (dp->width_start != dp->width_end) | 2635 | if (dp->width_start != dp->width_end) |
| 2692 | { | 2636 | { |
| 2693 | if (dp->width_arg_index != ARG_NONE) | 2637 | if (dp->width_arg_index != ARG_NONE) |
| 2694 | { | 2638 | { |
| 2695 | int arg; | ||
| 2696 | |||
| 2697 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 2639 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 2698 | abort (); | 2640 | abort (); |
| 2699 | arg = a.arg[dp->width_arg_index].a.a_int; | 2641 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 2700 | width = arg; | 2642 | width = arg; |
| 2701 | if (arg < 0) | 2643 | if (arg < 0) |
| 2702 | { | 2644 | { |
| @@ -2719,17 +2661,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 2719 | has_width = 1; | 2661 | has_width = 1; |
| 2720 | } | 2662 | } |
| 2721 | 2663 | ||
| 2722 | has_precision = 0; | 2664 | int has_precision = 0; |
| 2723 | precision = 0; | 2665 | size_t precision = 0; |
| 2724 | if (dp->precision_start != dp->precision_end) | 2666 | if (dp->precision_start != dp->precision_end) |
| 2725 | { | 2667 | { |
| 2726 | if (dp->precision_arg_index != ARG_NONE) | 2668 | if (dp->precision_arg_index != ARG_NONE) |
| 2727 | { | 2669 | { |
| 2728 | int arg; | ||
| 2729 | |||
| 2730 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 2670 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 2731 | abort (); | 2671 | abort (); |
| 2732 | arg = a.arg[dp->precision_arg_index].a.a_int; | 2672 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 2733 | /* "A negative precision is taken as if the precision | 2673 | /* "A negative precision is taken as if the precision |
| 2734 | were omitted." */ | 2674 | were omitted." */ |
| 2735 | if (arg >= 0) | 2675 | if (arg >= 0) |
| @@ -3074,22 +3014,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3074 | than INT_MAX characters, whence snprintf or sprintf would | 3014 | than INT_MAX characters, whence snprintf or sprintf would |
| 3075 | fail to process it. */ | 3015 | fail to process it. */ |
| 3076 | int flags = dp->flags; | 3016 | int flags = dp->flags; |
| 3077 | int has_width; | ||
| 3078 | size_t width; | ||
| 3079 | int has_precision; | ||
| 3080 | size_t precision; | ||
| 3081 | 3017 | ||
| 3082 | has_width = 0; | 3018 | int has_width = 0; |
| 3083 | width = 0; | 3019 | size_t width = 0; |
| 3084 | if (dp->width_start != dp->width_end) | 3020 | if (dp->width_start != dp->width_end) |
| 3085 | { | 3021 | { |
| 3086 | if (dp->width_arg_index != ARG_NONE) | 3022 | if (dp->width_arg_index != ARG_NONE) |
| 3087 | { | 3023 | { |
| 3088 | int arg; | ||
| 3089 | |||
| 3090 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 3024 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 3091 | abort (); | 3025 | abort (); |
| 3092 | arg = a.arg[dp->width_arg_index].a.a_int; | 3026 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 3093 | width = arg; | 3027 | width = arg; |
| 3094 | if (arg < 0) | 3028 | if (arg < 0) |
| 3095 | { | 3029 | { |
| @@ -3112,17 +3046,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3112 | has_width = 1; | 3046 | has_width = 1; |
| 3113 | } | 3047 | } |
| 3114 | 3048 | ||
| 3115 | has_precision = 0; | 3049 | int has_precision = 0; |
| 3116 | precision = 6; | 3050 | size_t precision = 6; |
| 3117 | if (dp->precision_start != dp->precision_end) | 3051 | if (dp->precision_start != dp->precision_end) |
| 3118 | { | 3052 | { |
| 3119 | if (dp->precision_arg_index != ARG_NONE) | 3053 | if (dp->precision_arg_index != ARG_NONE) |
| 3120 | { | 3054 | { |
| 3121 | int arg; | ||
| 3122 | |||
| 3123 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 3055 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 3124 | abort (); | 3056 | abort (); |
| 3125 | arg = a.arg[dp->precision_arg_index].a.a_int; | 3057 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 3126 | /* "A negative precision is taken as if the precision | 3058 | /* "A negative precision is taken as if the precision |
| 3127 | were omitted." */ | 3059 | were omitted." */ |
| 3128 | if (arg >= 0) | 3060 | if (arg >= 0) |
| @@ -3144,18 +3076,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3144 | 3076 | ||
| 3145 | { | 3077 | { |
| 3146 | const char *arg = a.arg[dp->arg_index].a.a_string; | 3078 | const char *arg = a.arg[dp->arg_index].a.a_string; |
| 3147 | size_t bytes; | ||
| 3148 | # if ENABLE_UNISTDIO && DCHAR_IS_TCHAR | ||
| 3149 | size_t characters; | ||
| 3150 | # endif | ||
| 3151 | # if !DCHAR_IS_TCHAR | ||
| 3152 | /* This code assumes that TCHAR_T is 'char'. */ | ||
| 3153 | static_assert (sizeof (TCHAR_T) == 1); | ||
| 3154 | DCHAR_T *tmpdst; | ||
| 3155 | size_t tmpdst_len; | ||
| 3156 | # endif | ||
| 3157 | size_t w; | ||
| 3158 | 3079 | ||
| 3080 | size_t bytes; | ||
| 3159 | if (has_precision) | 3081 | if (has_precision) |
| 3160 | { | 3082 | { |
| 3161 | /* Use only at most PRECISION bytes, from the left. */ | 3083 | /* Use only at most PRECISION bytes, from the left. */ |
| @@ -3169,6 +3091,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3169 | } | 3091 | } |
| 3170 | 3092 | ||
| 3171 | # if ENABLE_UNISTDIO && DCHAR_IS_TCHAR | 3093 | # if ENABLE_UNISTDIO && DCHAR_IS_TCHAR |
| 3094 | size_t characters; | ||
| 3172 | if (has_width) | 3095 | if (has_width) |
| 3173 | characters = mbsnlen (arg, bytes); | 3096 | characters = mbsnlen (arg, bytes); |
| 3174 | else | 3097 | else |
| @@ -3180,6 +3103,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3180 | # endif | 3103 | # endif |
| 3181 | 3104 | ||
| 3182 | # if !DCHAR_IS_TCHAR | 3105 | # if !DCHAR_IS_TCHAR |
| 3106 | /* This code assumes that TCHAR_T is 'char'. */ | ||
| 3107 | static_assert (sizeof (TCHAR_T) == 1); | ||
| 3108 | DCHAR_T *tmpdst; | ||
| 3109 | size_t tmpdst_len; | ||
| 3183 | /* Convert from TCHAR_T[] to DCHAR_T[]. */ | 3110 | /* Convert from TCHAR_T[] to DCHAR_T[]. */ |
| 3184 | tmpdst = | 3111 | tmpdst = |
| 3185 | DCHAR_CONV_FROM_ENCODING (locale_charset (), | 3112 | DCHAR_CONV_FROM_ENCODING (locale_charset (), |
| @@ -3191,6 +3118,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3191 | goto fail_with_errno; | 3118 | goto fail_with_errno; |
| 3192 | # endif | 3119 | # endif |
| 3193 | 3120 | ||
| 3121 | size_t w; | ||
| 3194 | if (has_width) | 3122 | if (has_width) |
| 3195 | { | 3123 | { |
| 3196 | # if ENABLE_UNISTDIO | 3124 | # if ENABLE_UNISTDIO |
| @@ -3260,18 +3188,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3260 | convert back the result from a char[] to a wchar_t[]. | 3188 | convert back the result from a char[] to a wchar_t[]. |
| 3261 | Instead, just copy the argument wchar_t[] to the result. */ | 3189 | Instead, just copy the argument wchar_t[] to the result. */ |
| 3262 | int flags = dp->flags; | 3190 | int flags = dp->flags; |
| 3263 | size_t width; | ||
| 3264 | 3191 | ||
| 3265 | width = 0; | 3192 | size_t width = 0; |
| 3266 | if (dp->width_start != dp->width_end) | 3193 | if (dp->width_start != dp->width_end) |
| 3267 | { | 3194 | { |
| 3268 | if (dp->width_arg_index != ARG_NONE) | 3195 | if (dp->width_arg_index != ARG_NONE) |
| 3269 | { | 3196 | { |
| 3270 | int arg; | ||
| 3271 | |||
| 3272 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 3197 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 3273 | abort (); | 3198 | abort (); |
| 3274 | arg = a.arg[dp->width_arg_index].a.a_int; | 3199 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 3275 | width = arg; | 3200 | width = arg; |
| 3276 | if (arg < 0) | 3201 | if (arg < 0) |
| 3277 | { | 3202 | { |
| @@ -3300,20 +3225,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3300 | 3225 | ||
| 3301 | if (dp->conversion == 's') | 3226 | if (dp->conversion == 's') |
| 3302 | { | 3227 | { |
| 3303 | int has_precision; | 3228 | int has_precision = 0; |
| 3304 | size_t precision; | 3229 | size_t precision = 6; |
| 3305 | |||
| 3306 | has_precision = 0; | ||
| 3307 | precision = 6; | ||
| 3308 | if (dp->precision_start != dp->precision_end) | 3230 | if (dp->precision_start != dp->precision_end) |
| 3309 | { | 3231 | { |
| 3310 | if (dp->precision_arg_index != ARG_NONE) | 3232 | if (dp->precision_arg_index != ARG_NONE) |
| 3311 | { | 3233 | { |
| 3312 | int arg; | ||
| 3313 | |||
| 3314 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 3234 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 3315 | abort (); | 3235 | abort (); |
| 3316 | arg = a.arg[dp->precision_arg_index].a.a_int; | 3236 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 3317 | /* "A negative precision is taken as if the precision | 3237 | /* "A negative precision is taken as if the precision |
| 3318 | were omitted." */ | 3238 | were omitted." */ |
| 3319 | if (arg >= 0) | 3239 | if (arg >= 0) |
| @@ -3339,9 +3259,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3339 | { | 3259 | { |
| 3340 | /* Use only at most PRECISION wide characters, from | 3260 | /* Use only at most PRECISION wide characters, from |
| 3341 | the left. */ | 3261 | the left. */ |
| 3342 | const wchar_t *ls_arg_end; | 3262 | const wchar_t *ls_arg_end = ls_arg; |
| 3343 | |||
| 3344 | ls_arg_end = ls_arg; | ||
| 3345 | characters = 0; | 3263 | characters = 0; |
| 3346 | for (; precision > 0; precision--) | 3264 | for (; precision > 0; precision--) |
| 3347 | { | 3265 | { |
| @@ -3413,22 +3331,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3413 | such bugs, we implement the entire processing of the 's' | 3331 | such bugs, we implement the entire processing of the 's' |
| 3414 | directive ourselves. */ | 3332 | directive ourselves. */ |
| 3415 | int flags = dp->flags; | 3333 | int flags = dp->flags; |
| 3416 | int has_width; | ||
| 3417 | size_t width; | ||
| 3418 | int has_precision; | ||
| 3419 | size_t precision; | ||
| 3420 | 3334 | ||
| 3421 | has_width = 0; | 3335 | int has_width = 0; |
| 3422 | width = 0; | 3336 | size_t width = 0; |
| 3423 | if (dp->width_start != dp->width_end) | 3337 | if (dp->width_start != dp->width_end) |
| 3424 | { | 3338 | { |
| 3425 | if (dp->width_arg_index != ARG_NONE) | 3339 | if (dp->width_arg_index != ARG_NONE) |
| 3426 | { | 3340 | { |
| 3427 | int arg; | ||
| 3428 | |||
| 3429 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 3341 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 3430 | abort (); | 3342 | abort (); |
| 3431 | arg = a.arg[dp->width_arg_index].a.a_int; | 3343 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 3432 | width = arg; | 3344 | width = arg; |
| 3433 | if (arg < 0) | 3345 | if (arg < 0) |
| 3434 | { | 3346 | { |
| @@ -3451,17 +3363,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3451 | has_width = 1; | 3363 | has_width = 1; |
| 3452 | } | 3364 | } |
| 3453 | 3365 | ||
| 3454 | has_precision = 0; | 3366 | int has_precision = 0; |
| 3455 | precision = 6; | 3367 | size_t precision = 6; |
| 3456 | if (dp->precision_start != dp->precision_end) | 3368 | if (dp->precision_start != dp->precision_end) |
| 3457 | { | 3369 | { |
| 3458 | if (dp->precision_arg_index != ARG_NONE) | 3370 | if (dp->precision_arg_index != ARG_NONE) |
| 3459 | { | 3371 | { |
| 3460 | int arg; | ||
| 3461 | |||
| 3462 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 3372 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 3463 | abort (); | 3373 | abort (); |
| 3464 | arg = a.arg[dp->precision_arg_index].a.a_int; | 3374 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 3465 | /* "A negative precision is taken as if the precision | 3375 | /* "A negative precision is taken as if the precision |
| 3466 | were omitted." */ | 3376 | were omitted." */ |
| 3467 | if (arg >= 0) | 3377 | if (arg >= 0) |
| @@ -3563,13 +3473,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3563 | if (has_precision || has_width) | 3473 | if (has_precision || has_width) |
| 3564 | { | 3474 | { |
| 3565 | /* We know the number of wide characters in advance. */ | 3475 | /* We know the number of wide characters in advance. */ |
| 3566 | size_t remaining; | ||
| 3567 | # if HAVE_MBRTOWC | 3476 | # if HAVE_MBRTOWC |
| 3568 | mbstate_t state; | 3477 | mbstate_t state; |
| 3569 | mbszero (&state); | 3478 | mbszero (&state); |
| 3570 | # endif | 3479 | # endif |
| 3571 | ENSURE_ALLOCATION (xsum (length, characters)); | 3480 | ENSURE_ALLOCATION (xsum (length, characters)); |
| 3572 | for (remaining = characters; remaining > 0; remaining--) | 3481 | for (size_t remaining = characters; remaining > 0; remaining--) |
| 3573 | { | 3482 | { |
| 3574 | wchar_t wc; | 3483 | wchar_t wc; |
| 3575 | int count; | 3484 | int count; |
| @@ -3655,13 +3564,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3655 | # endif | 3564 | # endif |
| 3656 | while (precision > 0) | 3565 | while (precision > 0) |
| 3657 | { | 3566 | { |
| 3658 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3659 | int count; | ||
| 3660 | |||
| 3661 | if (*arg_end == 0) | 3567 | if (*arg_end == 0) |
| 3662 | /* Found the terminating null wide character. */ | 3568 | /* Found the terminating null wide character. */ |
| 3663 | break; | 3569 | break; |
| 3664 | count = local_wcrtomb (cbuf, *arg_end, &state); | 3570 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3571 | int count = local_wcrtomb (cbuf, *arg_end, &state); | ||
| 3665 | if (count < 0) | 3572 | if (count < 0) |
| 3666 | /* Cannot convert. */ | 3573 | /* Cannot convert. */ |
| 3667 | goto fail_with_EILSEQ; | 3574 | goto fail_with_EILSEQ; |
| @@ -3694,13 +3601,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3694 | # endif | 3601 | # endif |
| 3695 | for (;;) | 3602 | for (;;) |
| 3696 | { | 3603 | { |
| 3697 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3698 | int count; | ||
| 3699 | |||
| 3700 | if (*arg_end == 0) | 3604 | if (*arg_end == 0) |
| 3701 | /* Found the terminating null wide character. */ | 3605 | /* Found the terminating null wide character. */ |
| 3702 | break; | 3606 | break; |
| 3703 | count = local_wcrtomb (cbuf, *arg_end, &state); | 3607 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3608 | int count = local_wcrtomb (cbuf, *arg_end, &state); | ||
| 3704 | if (count < 0) | 3609 | if (count < 0) |
| 3705 | /* Cannot convert. */ | 3610 | /* Cannot convert. */ |
| 3706 | goto fail_with_EILSEQ; | 3611 | goto fail_with_EILSEQ; |
| @@ -3727,27 +3632,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3727 | 3632 | ||
| 3728 | # if !DCHAR_IS_TCHAR | 3633 | # if !DCHAR_IS_TCHAR |
| 3729 | { | 3634 | { |
| 3730 | TCHAR_T *tmpsrc; | ||
| 3731 | |||
| 3732 | /* Convert the string into a piece of temporary memory. */ | 3635 | /* Convert the string into a piece of temporary memory. */ |
| 3733 | tmpsrc = (TCHAR_T *) malloc (bytes * sizeof (TCHAR_T)); | 3636 | TCHAR_T *tmpsrc = (TCHAR_T *) malloc (bytes * sizeof (TCHAR_T)); |
| 3734 | if (tmpsrc == NULL) | 3637 | if (tmpsrc == NULL) |
| 3735 | goto out_of_memory; | 3638 | goto out_of_memory; |
| 3736 | { | 3639 | { |
| 3737 | TCHAR_T *tmpptr = tmpsrc; | 3640 | TCHAR_T *tmpptr = tmpsrc; |
| 3738 | size_t remaining; | ||
| 3739 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3641 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 3740 | mbstate_t state; | 3642 | mbstate_t state; |
| 3741 | mbszero (&state); | 3643 | mbszero (&state); |
| 3742 | # endif | 3644 | # endif |
| 3743 | for (remaining = bytes; remaining > 0; ) | 3645 | for (size_t remaining = bytes; remaining > 0; ) |
| 3744 | { | 3646 | { |
| 3745 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3746 | int count; | ||
| 3747 | |||
| 3748 | if (*arg == 0) | 3647 | if (*arg == 0) |
| 3749 | abort (); | 3648 | abort (); |
| 3750 | count = local_wcrtomb (cbuf, *arg, &state); | 3649 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3650 | int count = local_wcrtomb (cbuf, *arg, &state); | ||
| 3751 | if (count <= 0) | 3651 | if (count <= 0) |
| 3752 | /* Inconsistency. */ | 3652 | /* Inconsistency. */ |
| 3753 | abort (); | 3653 | abort (); |
| @@ -3814,20 +3714,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3814 | if (has_precision || has_width) | 3714 | if (has_precision || has_width) |
| 3815 | { | 3715 | { |
| 3816 | /* We know the number of bytes in advance. */ | 3716 | /* We know the number of bytes in advance. */ |
| 3817 | size_t remaining; | ||
| 3818 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3717 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 3819 | mbstate_t state; | 3718 | mbstate_t state; |
| 3820 | mbszero (&state); | 3719 | mbszero (&state); |
| 3821 | # endif | 3720 | # endif |
| 3822 | ENSURE_ALLOCATION (xsum (length, bytes)); | 3721 | ENSURE_ALLOCATION (xsum (length, bytes)); |
| 3823 | for (remaining = bytes; remaining > 0; ) | 3722 | for (size_t remaining = bytes; remaining > 0; ) |
| 3824 | { | 3723 | { |
| 3825 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3826 | int count; | ||
| 3827 | |||
| 3828 | if (*arg == 0) | 3724 | if (*arg == 0) |
| 3829 | abort (); | 3725 | abort (); |
| 3830 | count = local_wcrtomb (cbuf, *arg, &state); | 3726 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3727 | int count = local_wcrtomb (cbuf, *arg, &state); | ||
| 3831 | if (count <= 0) | 3728 | if (count <= 0) |
| 3832 | /* Inconsistency. */ | 3729 | /* Inconsistency. */ |
| 3833 | abort (); | 3730 | abort (); |
| @@ -3847,12 +3744,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3847 | # endif | 3744 | # endif |
| 3848 | while (arg < arg_end) | 3745 | while (arg < arg_end) |
| 3849 | { | 3746 | { |
| 3850 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3851 | int count; | ||
| 3852 | |||
| 3853 | if (*arg == 0) | 3747 | if (*arg == 0) |
| 3854 | abort (); | 3748 | abort (); |
| 3855 | count = local_wcrtomb (cbuf, *arg, &state); | 3749 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3750 | int count = local_wcrtomb (cbuf, *arg, &state); | ||
| 3856 | if (count <= 0) | 3751 | if (count <= 0) |
| 3857 | /* Cannot convert. */ | 3752 | /* Cannot convert. */ |
| 3858 | goto fail_with_EILSEQ; | 3753 | goto fail_with_EILSEQ; |
| @@ -3889,20 +3784,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3889 | a correct behaviour for the null wint_t argument and/or the | 3784 | a correct behaviour for the null wint_t argument and/or the |
| 3890 | fallback that avoids EILSEQ. */ | 3785 | fallback that avoids EILSEQ. */ |
| 3891 | int flags = dp->flags; | 3786 | int flags = dp->flags; |
| 3892 | int has_width; | ||
| 3893 | size_t width; | ||
| 3894 | 3787 | ||
| 3895 | has_width = 0; | 3788 | int has_width = 0; |
| 3896 | width = 0; | 3789 | size_t width = 0; |
| 3897 | if (dp->width_start != dp->width_end) | 3790 | if (dp->width_start != dp->width_end) |
| 3898 | { | 3791 | { |
| 3899 | if (dp->width_arg_index != ARG_NONE) | 3792 | if (dp->width_arg_index != ARG_NONE) |
| 3900 | { | 3793 | { |
| 3901 | int arg; | ||
| 3902 | |||
| 3903 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 3794 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 3904 | abort (); | 3795 | abort (); |
| 3905 | arg = a.arg[dp->width_arg_index].a.a_int; | 3796 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 3906 | width = arg; | 3797 | width = arg; |
| 3907 | if (arg < 0) | 3798 | if (arg < 0) |
| 3908 | { | 3799 | { |
| @@ -3945,14 +3836,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3945 | # endif | 3836 | # endif |
| 3946 | { | 3837 | { |
| 3947 | /* Count the number of bytes. */ | 3838 | /* Count the number of bytes. */ |
| 3948 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3949 | int count; | ||
| 3950 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3839 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 3951 | mbstate_t state; | 3840 | mbstate_t state; |
| 3952 | mbszero (&state); | 3841 | mbszero (&state); |
| 3953 | # endif | 3842 | # endif |
| 3954 | 3843 | ||
| 3955 | count = local_wcrtomb (cbuf, arg, &state); | 3844 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3845 | int count = local_wcrtomb (cbuf, arg, &state); | ||
| 3956 | if (count < 0) | 3846 | if (count < 0) |
| 3957 | /* Cannot convert. */ | 3847 | /* Cannot convert. */ |
| 3958 | goto fail_with_EILSEQ; | 3848 | goto fail_with_EILSEQ; |
| @@ -3980,14 +3870,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 3980 | /* Convert the string into a piece of temporary memory. */ | 3870 | /* Convert the string into a piece of temporary memory. */ |
| 3981 | if (bytes > 0) | 3871 | if (bytes > 0) |
| 3982 | { | 3872 | { |
| 3983 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 3984 | int count; | ||
| 3985 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3873 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 3986 | mbstate_t state; | 3874 | mbstate_t state; |
| 3987 | mbszero (&state); | 3875 | mbszero (&state); |
| 3988 | # endif | 3876 | # endif |
| 3989 | 3877 | ||
| 3990 | count = local_wcrtomb (cbuf, arg, &state); | 3878 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3879 | int count = local_wcrtomb (cbuf, arg, &state); | ||
| 3991 | if (count <= 0) | 3880 | if (count <= 0) |
| 3992 | /* Inconsistency. */ | 3881 | /* Inconsistency. */ |
| 3993 | abort (); | 3882 | abort (); |
| @@ -4047,13 +3936,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4047 | ENSURE_ALLOCATION (xsum (length, bytes)); | 3936 | ENSURE_ALLOCATION (xsum (length, bytes)); |
| 4048 | if (bytes > 0) | 3937 | if (bytes > 0) |
| 4049 | { | 3938 | { |
| 4050 | int count; | ||
| 4051 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3939 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 4052 | mbstate_t state; | 3940 | mbstate_t state; |
| 4053 | mbszero (&state); | 3941 | mbszero (&state); |
| 4054 | # endif | 3942 | # endif |
| 4055 | 3943 | ||
| 4056 | count = local_wcrtomb (result + length, arg, &state); | 3944 | int count = local_wcrtomb (result + length, arg, &state); |
| 4057 | if (count <= 0) | 3945 | if (count <= 0) |
| 4058 | /* Inconsistency. */ | 3946 | /* Inconsistency. */ |
| 4059 | abort (); | 3947 | abort (); |
| @@ -4062,14 +3950,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4062 | } | 3950 | } |
| 4063 | else | 3951 | else |
| 4064 | { | 3952 | { |
| 4065 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ | ||
| 4066 | int count; | ||
| 4067 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t | 3953 | # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t |
| 4068 | mbstate_t state; | 3954 | mbstate_t state; |
| 4069 | mbszero (&state); | 3955 | mbszero (&state); |
| 4070 | # endif | 3956 | # endif |
| 4071 | 3957 | ||
| 4072 | count = local_wcrtomb (cbuf, arg, &state); | 3958 | char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ |
| 3959 | int count = local_wcrtomb (cbuf, arg, &state); | ||
| 4073 | if (count < 0) | 3960 | if (count < 0) |
| 4074 | /* Cannot convert. */ | 3961 | /* Cannot convert. */ |
| 4075 | goto fail_with_EILSEQ; | 3962 | goto fail_with_EILSEQ; |
| @@ -4102,18 +3989,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4102 | /* Implement the 'c' directive ourselves, in order to avoid | 3989 | /* Implement the 'c' directive ourselves, in order to avoid |
| 4103 | EILSEQ in the "C" locale. */ | 3990 | EILSEQ in the "C" locale. */ |
| 4104 | int flags = dp->flags; | 3991 | int flags = dp->flags; |
| 4105 | size_t width; | ||
| 4106 | 3992 | ||
| 4107 | width = 0; | 3993 | size_t width = 0; |
| 4108 | if (dp->width_start != dp->width_end) | 3994 | if (dp->width_start != dp->width_end) |
| 4109 | { | 3995 | { |
| 4110 | if (dp->width_arg_index != ARG_NONE) | 3996 | if (dp->width_arg_index != ARG_NONE) |
| 4111 | { | 3997 | { |
| 4112 | int arg; | ||
| 4113 | |||
| 4114 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 3998 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 4115 | abort (); | 3999 | abort (); |
| 4116 | arg = a.arg[dp->width_arg_index].a.a_int; | 4000 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 4117 | width = arg; | 4001 | width = arg; |
| 4118 | if (arg < 0) | 4002 | if (arg < 0) |
| 4119 | { | 4003 | { |
| @@ -4139,9 +4023,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4139 | { | 4023 | { |
| 4140 | char arg = (char) a.arg[dp->arg_index].a.a_char; | 4024 | char arg = (char) a.arg[dp->arg_index].a.a_char; |
| 4141 | mbstate_t state; | 4025 | mbstate_t state; |
| 4142 | wchar_t wc; | ||
| 4143 | |||
| 4144 | mbszero (&state); | 4026 | mbszero (&state); |
| 4027 | |||
| 4028 | wchar_t wc; | ||
| 4145 | int count = mbrtowc (&wc, &arg, 1, &state); | 4029 | int count = mbrtowc (&wc, &arg, 1, &state); |
| 4146 | if (count < 0) | 4030 | if (count < 0) |
| 4147 | /* Invalid or incomplete multibyte character. */ | 4031 | /* Invalid or incomplete multibyte character. */ |
| @@ -4182,30 +4066,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4182 | { | 4066 | { |
| 4183 | arg_type type = a.arg[dp->arg_index].type; | 4067 | arg_type type = a.arg[dp->arg_index].type; |
| 4184 | int flags = dp->flags; | 4068 | int flags = dp->flags; |
| 4185 | int has_width; | ||
| 4186 | size_t width; | ||
| 4187 | int has_precision; | ||
| 4188 | size_t precision; | ||
| 4189 | size_t tmp_length; | ||
| 4190 | size_t count; | ||
| 4191 | DCHAR_T tmpbuf[700]; | ||
| 4192 | DCHAR_T *tmp; | ||
| 4193 | DCHAR_T *tmp_end; | ||
| 4194 | DCHAR_T *tmp_start; | ||
| 4195 | DCHAR_T *pad_ptr; | ||
| 4196 | DCHAR_T *p; | ||
| 4197 | 4069 | ||
| 4198 | has_width = 0; | 4070 | int has_width = 0; |
| 4199 | width = 0; | 4071 | size_t width = 0; |
| 4200 | if (dp->width_start != dp->width_end) | 4072 | if (dp->width_start != dp->width_end) |
| 4201 | { | 4073 | { |
| 4202 | if (dp->width_arg_index != ARG_NONE) | 4074 | if (dp->width_arg_index != ARG_NONE) |
| 4203 | { | 4075 | { |
| 4204 | int arg; | ||
| 4205 | |||
| 4206 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 4076 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 4207 | abort (); | 4077 | abort (); |
| 4208 | arg = a.arg[dp->width_arg_index].a.a_int; | 4078 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 4209 | width = arg; | 4079 | width = arg; |
| 4210 | if (arg < 0) | 4080 | if (arg < 0) |
| 4211 | { | 4081 | { |
| @@ -4228,17 +4098,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4228 | has_width = 1; | 4098 | has_width = 1; |
| 4229 | } | 4099 | } |
| 4230 | 4100 | ||
| 4231 | has_precision = 0; | 4101 | int has_precision = 0; |
| 4232 | precision = 1; | 4102 | size_t precision = 1; |
| 4233 | if (dp->precision_start != dp->precision_end) | 4103 | if (dp->precision_start != dp->precision_end) |
| 4234 | { | 4104 | { |
| 4235 | if (dp->precision_arg_index != ARG_NONE) | 4105 | if (dp->precision_arg_index != ARG_NONE) |
| 4236 | { | 4106 | { |
| 4237 | int arg; | ||
| 4238 | |||
| 4239 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 4107 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 4240 | abort (); | 4108 | abort (); |
| 4241 | arg = a.arg[dp->precision_arg_index].a.a_int; | 4109 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 4242 | /* "A negative precision is taken as if the precision | 4110 | /* "A negative precision is taken as if the precision |
| 4243 | were omitted." */ | 4111 | were omitted." */ |
| 4244 | if (arg >= 0) | 4112 | if (arg >= 0) |
| @@ -4259,6 +4127,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4259 | } | 4127 | } |
| 4260 | 4128 | ||
| 4261 | /* Allocate a temporary buffer of sufficient size. */ | 4129 | /* Allocate a temporary buffer of sufficient size. */ |
| 4130 | size_t tmp_length; | ||
| 4262 | switch (type) | 4131 | switch (type) |
| 4263 | { | 4132 | { |
| 4264 | default: | 4133 | default: |
| @@ -4325,6 +4194,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4325 | if (tmp_length < width) | 4194 | if (tmp_length < width) |
| 4326 | tmp_length = width; | 4195 | tmp_length = width; |
| 4327 | 4196 | ||
| 4197 | DCHAR_T tmpbuf[700]; | ||
| 4198 | DCHAR_T *tmp; | ||
| 4328 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) | 4199 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) |
| 4329 | tmp = tmpbuf; | 4200 | tmp = tmpbuf; |
| 4330 | else | 4201 | else |
| @@ -4340,7 +4211,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4340 | goto out_of_memory; | 4211 | goto out_of_memory; |
| 4341 | } | 4212 | } |
| 4342 | 4213 | ||
| 4343 | tmp_end = tmp + tmp_length; | 4214 | DCHAR_T *tmp_end = tmp + tmp_length; |
| 4344 | 4215 | ||
| 4345 | unsigned long long arg; | 4216 | unsigned long long arg; |
| 4346 | switch (type) | 4217 | switch (type) |
| @@ -4389,7 +4260,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4389 | } | 4260 | } |
| 4390 | int need_prefix = ((flags & FLAG_ALT) && arg != 0); | 4261 | int need_prefix = ((flags & FLAG_ALT) && arg != 0); |
| 4391 | 4262 | ||
| 4392 | p = tmp_end; | 4263 | DCHAR_T *p = tmp_end; |
| 4393 | /* "The result of converting a zero value with a precision | 4264 | /* "The result of converting a zero value with a precision |
| 4394 | of zero is no characters." */ | 4265 | of zero is no characters." */ |
| 4395 | if (!(has_precision && precision == 0 && arg == 0)) | 4266 | if (!(has_precision && precision == 0 && arg == 0)) |
| @@ -4409,7 +4280,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4409 | *--p = '0'; | 4280 | *--p = '0'; |
| 4410 | } | 4281 | } |
| 4411 | 4282 | ||
| 4412 | pad_ptr = p; | 4283 | DCHAR_T *pad_ptr = p; |
| 4413 | 4284 | ||
| 4414 | if (need_prefix) | 4285 | if (need_prefix) |
| 4415 | { | 4286 | { |
| @@ -4422,12 +4293,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4422 | # endif | 4293 | # endif |
| 4423 | *--p = '0'; | 4294 | *--p = '0'; |
| 4424 | } | 4295 | } |
| 4425 | tmp_start = p; | 4296 | DCHAR_T *tmp_start = p; |
| 4426 | 4297 | ||
| 4427 | /* The generated string now extends from tmp_start to tmp_end, | 4298 | /* The generated string now extends from tmp_start to tmp_end, |
| 4428 | with the zero padding insertion point being at pad_ptr, | 4299 | with the zero padding insertion point being at pad_ptr, |
| 4429 | tmp_start <= pad_ptr <= tmp_end. */ | 4300 | tmp_start <= pad_ptr <= tmp_end. */ |
| 4430 | count = tmp_end - tmp_start; | 4301 | size_t count = tmp_end - tmp_start; |
| 4431 | 4302 | ||
| 4432 | if (count < width) | 4303 | if (count < width) |
| 4433 | { | 4304 | { |
| @@ -4503,26 +4374,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4503 | { | 4374 | { |
| 4504 | arg_type type = a.arg[dp->arg_index].type; | 4375 | arg_type type = a.arg[dp->arg_index].type; |
| 4505 | int flags = dp->flags; | 4376 | int flags = dp->flags; |
| 4506 | size_t width; | ||
| 4507 | int has_precision; | ||
| 4508 | size_t precision; | ||
| 4509 | size_t tmp_length; | ||
| 4510 | size_t count; | ||
| 4511 | DCHAR_T tmpbuf[700]; | ||
| 4512 | DCHAR_T *tmp; | ||
| 4513 | DCHAR_T *pad_ptr; | ||
| 4514 | DCHAR_T *p; | ||
| 4515 | 4377 | ||
| 4516 | width = 0; | 4378 | size_t width = 0; |
| 4517 | if (dp->width_start != dp->width_end) | 4379 | if (dp->width_start != dp->width_end) |
| 4518 | { | 4380 | { |
| 4519 | if (dp->width_arg_index != ARG_NONE) | 4381 | if (dp->width_arg_index != ARG_NONE) |
| 4520 | { | 4382 | { |
| 4521 | int arg; | ||
| 4522 | |||
| 4523 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 4383 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 4524 | abort (); | 4384 | abort (); |
| 4525 | arg = a.arg[dp->width_arg_index].a.a_int; | 4385 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 4526 | width = arg; | 4386 | width = arg; |
| 4527 | if (arg < 0) | 4387 | if (arg < 0) |
| 4528 | { | 4388 | { |
| @@ -4544,17 +4404,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4544 | goto overflow; | 4404 | goto overflow; |
| 4545 | } | 4405 | } |
| 4546 | 4406 | ||
| 4547 | has_precision = 0; | 4407 | int has_precision = 0; |
| 4548 | precision = 0; | 4408 | size_t precision = 0; |
| 4549 | if (dp->precision_start != dp->precision_end) | 4409 | if (dp->precision_start != dp->precision_end) |
| 4550 | { | 4410 | { |
| 4551 | if (dp->precision_arg_index != ARG_NONE) | 4411 | if (dp->precision_arg_index != ARG_NONE) |
| 4552 | { | 4412 | { |
| 4553 | int arg; | ||
| 4554 | |||
| 4555 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 4413 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 4556 | abort (); | 4414 | abort (); |
| 4557 | arg = a.arg[dp->precision_arg_index].a.a_int; | 4415 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 4558 | /* "A negative precision is taken as if the precision | 4416 | /* "A negative precision is taken as if the precision |
| 4559 | were omitted." */ | 4417 | were omitted." */ |
| 4560 | if (arg >= 0) | 4418 | if (arg >= 0) |
| @@ -4575,6 +4433,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4575 | } | 4433 | } |
| 4576 | 4434 | ||
| 4577 | /* Allocate a temporary buffer of sufficient size. */ | 4435 | /* Allocate a temporary buffer of sufficient size. */ |
| 4436 | size_t tmp_length; | ||
| 4578 | if (type == TYPE_LONGDOUBLE) | 4437 | if (type == TYPE_LONGDOUBLE) |
| 4579 | tmp_length = | 4438 | tmp_length = |
| 4580 | (unsigned int) ((LDBL_DIG + 1) | 4439 | (unsigned int) ((LDBL_DIG + 1) |
| @@ -4597,6 +4456,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4597 | 4456 | ||
| 4598 | tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ | 4457 | tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ |
| 4599 | 4458 | ||
| 4459 | DCHAR_T tmpbuf[700]; | ||
| 4460 | DCHAR_T *tmp; | ||
| 4600 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) | 4461 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) |
| 4601 | tmp = tmpbuf; | 4462 | tmp = tmpbuf; |
| 4602 | else | 4463 | else |
| @@ -4612,8 +4473,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4612 | goto out_of_memory; | 4473 | goto out_of_memory; |
| 4613 | } | 4474 | } |
| 4614 | 4475 | ||
| 4615 | pad_ptr = NULL; | 4476 | DCHAR_T *pad_ptr = NULL; |
| 4616 | p = tmp; | 4477 | DCHAR_T *p = tmp; |
| 4617 | if (type == TYPE_LONGDOUBLE) | 4478 | if (type == TYPE_LONGDOUBLE) |
| 4618 | { | 4479 | { |
| 4619 | # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION) | 4480 | # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION) |
| @@ -4632,11 +4493,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4632 | } | 4493 | } |
| 4633 | else | 4494 | else |
| 4634 | { | 4495 | { |
| 4635 | int sign = 0; | ||
| 4636 | DECL_LONG_DOUBLE_ROUNDING | 4496 | DECL_LONG_DOUBLE_ROUNDING |
| 4637 | 4497 | ||
| 4638 | BEGIN_LONG_DOUBLE_ROUNDING (); | 4498 | BEGIN_LONG_DOUBLE_ROUNDING (); |
| 4639 | 4499 | ||
| 4500 | int sign = 0; | ||
| 4640 | if (signbit (arg)) /* arg < 0.0L or negative zero */ | 4501 | if (signbit (arg)) /* arg < 0.0L or negative zero */ |
| 4641 | { | 4502 | { |
| 4642 | sign = -1; | 4503 | sign = -1; |
| @@ -4665,7 +4526,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4665 | { | 4526 | { |
| 4666 | int exponent; | 4527 | int exponent; |
| 4667 | long double mantissa; | 4528 | long double mantissa; |
| 4668 | |||
| 4669 | if (arg > 0.0L) | 4529 | if (arg > 0.0L) |
| 4670 | mantissa = printf_frexpl (arg, &exponent); | 4530 | mantissa = printf_frexpl (arg, &exponent); |
| 4671 | else | 4531 | else |
| @@ -4679,9 +4539,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4679 | { | 4539 | { |
| 4680 | /* Round the mantissa. */ | 4540 | /* Round the mantissa. */ |
| 4681 | long double tail = mantissa; | 4541 | long double tail = mantissa; |
| 4682 | size_t q; | ||
| 4683 | 4542 | ||
| 4684 | for (q = precision; ; q--) | 4543 | for (size_t q = precision; ; q--) |
| 4685 | { | 4544 | { |
| 4686 | int digit = (int) tail; | 4545 | int digit = (int) tail; |
| 4687 | tail -= digit; | 4546 | tail -= digit; |
| @@ -4696,7 +4555,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4696 | tail *= 16.0L; | 4555 | tail *= 16.0L; |
| 4697 | } | 4556 | } |
| 4698 | if (tail != 0.0L) | 4557 | if (tail != 0.0L) |
| 4699 | for (q = precision; q > 0; q--) | 4558 | for (size_t q = precision; q > 0; q--) |
| 4700 | tail *= 0.0625L; | 4559 | tail *= 0.0625L; |
| 4701 | mantissa += tail; | 4560 | mantissa += tail; |
| 4702 | } | 4561 | } |
| @@ -4705,9 +4564,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4705 | *p++ = dp->conversion - 'A' + 'X'; | 4564 | *p++ = dp->conversion - 'A' + 'X'; |
| 4706 | pad_ptr = p; | 4565 | pad_ptr = p; |
| 4707 | { | 4566 | { |
| 4708 | int digit; | 4567 | int digit = (int) mantissa; |
| 4709 | |||
| 4710 | digit = (int) mantissa; | ||
| 4711 | mantissa -= digit; | 4568 | mantissa -= digit; |
| 4712 | *p++ = '0' + digit; | 4569 | *p++ = '0' + digit; |
| 4713 | if ((flags & FLAG_ALT) | 4570 | if ((flags & FLAG_ALT) |
| @@ -4754,9 +4611,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4754 | else | 4611 | else |
| 4755 | { | 4612 | { |
| 4756 | char expbuf[6 + 1]; | 4613 | char expbuf[6 + 1]; |
| 4757 | const char *ep; | ||
| 4758 | sprintf (expbuf, "%+d", exponent); | 4614 | sprintf (expbuf, "%+d", exponent); |
| 4759 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 4615 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 4760 | p++; | 4616 | p++; |
| 4761 | } | 4617 | } |
| 4762 | # endif | 4618 | # endif |
| @@ -4787,7 +4643,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4787 | else | 4643 | else |
| 4788 | { | 4644 | { |
| 4789 | int sign = 0; | 4645 | int sign = 0; |
| 4790 | |||
| 4791 | if (signbit (arg)) /* arg < 0.0 or negative zero */ | 4646 | if (signbit (arg)) /* arg < 0.0 or negative zero */ |
| 4792 | { | 4647 | { |
| 4793 | sign = -1; | 4648 | sign = -1; |
| @@ -4816,7 +4671,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4816 | { | 4671 | { |
| 4817 | int exponent; | 4672 | int exponent; |
| 4818 | double mantissa; | 4673 | double mantissa; |
| 4819 | |||
| 4820 | if (arg > 0.0) | 4674 | if (arg > 0.0) |
| 4821 | mantissa = printf_frexp (arg, &exponent); | 4675 | mantissa = printf_frexp (arg, &exponent); |
| 4822 | else | 4676 | else |
| @@ -4830,9 +4684,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4830 | { | 4684 | { |
| 4831 | /* Round the mantissa. */ | 4685 | /* Round the mantissa. */ |
| 4832 | double tail = mantissa; | 4686 | double tail = mantissa; |
| 4833 | size_t q; | ||
| 4834 | 4687 | ||
| 4835 | for (q = precision; ; q--) | 4688 | for (size_t q = precision; ; q--) |
| 4836 | { | 4689 | { |
| 4837 | int digit = (int) tail; | 4690 | int digit = (int) tail; |
| 4838 | tail -= digit; | 4691 | tail -= digit; |
| @@ -4847,7 +4700,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4847 | tail *= 16.0; | 4700 | tail *= 16.0; |
| 4848 | } | 4701 | } |
| 4849 | if (tail != 0.0) | 4702 | if (tail != 0.0) |
| 4850 | for (q = precision; q > 0; q--) | 4703 | for (size_t q = precision; q > 0; q--) |
| 4851 | tail *= 0.0625; | 4704 | tail *= 0.0625; |
| 4852 | mantissa += tail; | 4705 | mantissa += tail; |
| 4853 | } | 4706 | } |
| @@ -4856,9 +4709,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4856 | *p++ = dp->conversion - 'A' + 'X'; | 4709 | *p++ = dp->conversion - 'A' + 'X'; |
| 4857 | pad_ptr = p; | 4710 | pad_ptr = p; |
| 4858 | { | 4711 | { |
| 4859 | int digit; | 4712 | int digit = (int) mantissa; |
| 4860 | |||
| 4861 | digit = (int) mantissa; | ||
| 4862 | mantissa -= digit; | 4713 | mantissa -= digit; |
| 4863 | *p++ = '0' + digit; | 4714 | *p++ = '0' + digit; |
| 4864 | if ((flags & FLAG_ALT) | 4715 | if ((flags & FLAG_ALT) |
| @@ -4905,9 +4756,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4905 | else | 4756 | else |
| 4906 | { | 4757 | { |
| 4907 | char expbuf[6 + 1]; | 4758 | char expbuf[6 + 1]; |
| 4908 | const char *ep; | ||
| 4909 | sprintf (expbuf, "%+d", exponent); | 4759 | sprintf (expbuf, "%+d", exponent); |
| 4910 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 4760 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 4911 | p++; | 4761 | p++; |
| 4912 | } | 4762 | } |
| 4913 | # endif | 4763 | # endif |
| @@ -4920,7 +4770,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 4920 | 4770 | ||
| 4921 | /* The generated string now extends from tmp to p, with the | 4771 | /* The generated string now extends from tmp to p, with the |
| 4922 | zero padding insertion point being at pad_ptr. */ | 4772 | zero padding insertion point being at pad_ptr. */ |
| 4923 | count = p - tmp; | 4773 | size_t count = p - tmp; |
| 4924 | 4774 | ||
| 4925 | if (count < width) | 4775 | if (count < width) |
| 4926 | { | 4776 | { |
| @@ -5001,8 +4851,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5001 | || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE | 4851 | || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE |
| 5002 | /* Some systems produce wrong output for Inf, | 4852 | /* Some systems produce wrong output for Inf, |
| 5003 | -Inf, and NaN. Some systems in this category | 4853 | -Inf, and NaN. Some systems in this category |
| 5004 | (IRIX 5.3) also do so for -0.0. Therefore we | 4854 | also do so for -0.0. Therefore we treat this |
| 5005 | treat this case here as well. */ | 4855 | case here as well. */ |
| 5006 | && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) | 4856 | && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) |
| 5007 | # endif | 4857 | # endif |
| 5008 | )) | 4858 | )) |
| @@ -5011,26 +4861,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5011 | arg_type type = a.arg[dp->arg_index].type; | 4861 | arg_type type = a.arg[dp->arg_index].type; |
| 5012 | # endif | 4862 | # endif |
| 5013 | int flags = dp->flags; | 4863 | int flags = dp->flags; |
| 5014 | size_t width; | ||
| 5015 | size_t count; | ||
| 5016 | int has_precision; | ||
| 5017 | size_t precision; | ||
| 5018 | size_t tmp_length; | ||
| 5019 | DCHAR_T tmpbuf[700]; | ||
| 5020 | DCHAR_T *tmp; | ||
| 5021 | DCHAR_T *pad_ptr; | ||
| 5022 | DCHAR_T *p; | ||
| 5023 | 4864 | ||
| 5024 | width = 0; | 4865 | size_t width = 0; |
| 5025 | if (dp->width_start != dp->width_end) | 4866 | if (dp->width_start != dp->width_end) |
| 5026 | { | 4867 | { |
| 5027 | if (dp->width_arg_index != ARG_NONE) | 4868 | if (dp->width_arg_index != ARG_NONE) |
| 5028 | { | 4869 | { |
| 5029 | int arg; | ||
| 5030 | |||
| 5031 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 4870 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 5032 | abort (); | 4871 | abort (); |
| 5033 | arg = a.arg[dp->width_arg_index].a.a_int; | 4872 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 5034 | width = arg; | 4873 | width = arg; |
| 5035 | if (arg < 0) | 4874 | if (arg < 0) |
| 5036 | { | 4875 | { |
| @@ -5052,17 +4891,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5052 | goto overflow; | 4891 | goto overflow; |
| 5053 | } | 4892 | } |
| 5054 | 4893 | ||
| 5055 | has_precision = 0; | 4894 | int has_precision = 0; |
| 5056 | precision = 0; | 4895 | size_t precision = 0; |
| 5057 | if (dp->precision_start != dp->precision_end) | 4896 | if (dp->precision_start != dp->precision_end) |
| 5058 | { | 4897 | { |
| 5059 | if (dp->precision_arg_index != ARG_NONE) | 4898 | if (dp->precision_arg_index != ARG_NONE) |
| 5060 | { | 4899 | { |
| 5061 | int arg; | ||
| 5062 | |||
| 5063 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 4900 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 5064 | abort (); | 4901 | abort (); |
| 5065 | arg = a.arg[dp->precision_arg_index].a.a_int; | 4902 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 5066 | /* "A negative precision is taken as if the precision | 4903 | /* "A negative precision is taken as if the precision |
| 5067 | were omitted." */ | 4904 | were omitted." */ |
| 5068 | if (arg >= 0) | 4905 | if (arg >= 0) |
| @@ -5091,6 +4928,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5091 | precision = 6; | 4928 | precision = 6; |
| 5092 | 4929 | ||
| 5093 | /* Allocate a temporary buffer of sufficient size. */ | 4930 | /* Allocate a temporary buffer of sufficient size. */ |
| 4931 | size_t tmp_length; | ||
| 5094 | # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE | 4932 | # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE |
| 5095 | tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); | 4933 | tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); |
| 5096 | # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE | 4934 | # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE |
| @@ -5155,6 +4993,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5155 | 4993 | ||
| 5156 | tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ | 4994 | tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ |
| 5157 | 4995 | ||
| 4996 | DCHAR_T tmpbuf[700]; | ||
| 4997 | DCHAR_T *tmp; | ||
| 5158 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) | 4998 | if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) |
| 5159 | tmp = tmpbuf; | 4999 | tmp = tmpbuf; |
| 5160 | else | 5000 | else |
| @@ -5170,8 +5010,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5170 | goto out_of_memory; | 5010 | goto out_of_memory; |
| 5171 | } | 5011 | } |
| 5172 | 5012 | ||
| 5173 | pad_ptr = NULL; | 5013 | DCHAR_T *pad_ptr = NULL; |
| 5174 | p = tmp; | 5014 | DCHAR_T *p = tmp; |
| 5175 | 5015 | ||
| 5176 | # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE | 5016 | # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE |
| 5177 | # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE | 5017 | # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE |
| @@ -5193,11 +5033,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5193 | } | 5033 | } |
| 5194 | else | 5034 | else |
| 5195 | { | 5035 | { |
| 5196 | int sign = 0; | ||
| 5197 | DECL_LONG_DOUBLE_ROUNDING | 5036 | DECL_LONG_DOUBLE_ROUNDING |
| 5198 | 5037 | ||
| 5199 | BEGIN_LONG_DOUBLE_ROUNDING (); | 5038 | BEGIN_LONG_DOUBLE_ROUNDING (); |
| 5200 | 5039 | ||
| 5040 | int sign = 0; | ||
| 5201 | if (signbit (arg)) /* arg < 0.0L or negative zero */ | 5041 | if (signbit (arg)) /* arg < 0.0L or negative zero */ |
| 5202 | { | 5042 | { |
| 5203 | sign = -1; | 5043 | sign = -1; |
| @@ -5229,17 +5069,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5229 | 5069 | ||
| 5230 | if (dp->conversion == 'f' || dp->conversion == 'F') | 5070 | if (dp->conversion == 'f' || dp->conversion == 'F') |
| 5231 | { | 5071 | { |
| 5232 | char *digits; | 5072 | char *digits = |
| 5233 | size_t ndigits; | ||
| 5234 | |||
| 5235 | digits = | ||
| 5236 | scale10_round_decimal_long_double (arg, precision); | 5073 | scale10_round_decimal_long_double (arg, precision); |
| 5237 | if (digits == NULL) | 5074 | if (digits == NULL) |
| 5238 | { | 5075 | { |
| 5239 | END_LONG_DOUBLE_ROUNDING (); | 5076 | END_LONG_DOUBLE_ROUNDING (); |
| 5240 | goto out_of_memory; | 5077 | goto out_of_memory; |
| 5241 | } | 5078 | } |
| 5242 | ndigits = strlen (digits); | 5079 | size_t ndigits = strlen (digits); |
| 5243 | 5080 | ||
| 5244 | if (ndigits > precision) | 5081 | if (ndigits > precision) |
| 5245 | { | 5082 | { |
| @@ -5355,12 +5192,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5355 | else | 5192 | else |
| 5356 | { | 5193 | { |
| 5357 | /* arg > 0.0L. */ | 5194 | /* arg > 0.0L. */ |
| 5358 | int adjusted; | 5195 | exponent = floorlog10l (arg); |
| 5196 | int adjusted = 0; | ||
| 5359 | char *digits; | 5197 | char *digits; |
| 5360 | size_t ndigits; | 5198 | size_t ndigits; |
| 5361 | |||
| 5362 | exponent = floorlog10l (arg); | ||
| 5363 | adjusted = 0; | ||
| 5364 | for (;;) | 5199 | for (;;) |
| 5365 | { | 5200 | { |
| 5366 | digits = | 5201 | digits = |
| @@ -5451,9 +5286,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5451 | else | 5286 | else |
| 5452 | { | 5287 | { |
| 5453 | char expbuf[6 + 1]; | 5288 | char expbuf[6 + 1]; |
| 5454 | const char *ep; | ||
| 5455 | sprintf (expbuf, "%+.2d", exponent); | 5289 | sprintf (expbuf, "%+.2d", exponent); |
| 5456 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 5290 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 5457 | p++; | 5291 | p++; |
| 5458 | } | 5292 | } |
| 5459 | # endif | 5293 | # endif |
| @@ -5489,14 +5323,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5489 | else | 5323 | else |
| 5490 | { | 5324 | { |
| 5491 | /* arg > 0.0L. */ | 5325 | /* arg > 0.0L. */ |
| 5492 | int exponent; | 5326 | int exponent = floorlog10l (arg); |
| 5493 | int adjusted; | 5327 | int adjusted = 0; |
| 5494 | char *digits; | 5328 | char *digits; |
| 5495 | size_t ndigits; | 5329 | size_t ndigits; |
| 5496 | size_t nzeroes; | ||
| 5497 | |||
| 5498 | exponent = floorlog10l (arg); | ||
| 5499 | adjusted = 0; | ||
| 5500 | for (;;) | 5330 | for (;;) |
| 5501 | { | 5331 | { |
| 5502 | digits = | 5332 | digits = |
| @@ -5556,7 +5386,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5556 | 5386 | ||
| 5557 | /* Determine the number of trailing zeroes | 5387 | /* Determine the number of trailing zeroes |
| 5558 | that have to be dropped. */ | 5388 | that have to be dropped. */ |
| 5559 | nzeroes = 0; | 5389 | size_t nzeroes = 0; |
| 5560 | if ((flags & FLAG_ALT) == 0) | 5390 | if ((flags & FLAG_ALT) == 0) |
| 5561 | while (nzeroes < ndigits | 5391 | while (nzeroes < ndigits |
| 5562 | && digits[nzeroes] == '0') | 5392 | && digits[nzeroes] == '0') |
| @@ -5706,9 +5536,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5706 | else | 5536 | else |
| 5707 | { | 5537 | { |
| 5708 | char expbuf[6 + 1]; | 5538 | char expbuf[6 + 1]; |
| 5709 | const char *ep; | ||
| 5710 | sprintf (expbuf, "%+.2d", exponent); | 5539 | sprintf (expbuf, "%+.2d", exponent); |
| 5711 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 5540 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 5712 | p++; | 5541 | p++; |
| 5713 | } | 5542 | } |
| 5714 | # endif | 5543 | # endif |
| @@ -5808,7 +5637,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5808 | else | 5637 | else |
| 5809 | { | 5638 | { |
| 5810 | int sign = 0; | 5639 | int sign = 0; |
| 5811 | |||
| 5812 | if (signbit (arg)) /* arg < 0.0 or negative zero */ | 5640 | if (signbit (arg)) /* arg < 0.0 or negative zero */ |
| 5813 | { | 5641 | { |
| 5814 | sign = -1; | 5642 | sign = -1; |
| @@ -5840,14 +5668,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5840 | 5668 | ||
| 5841 | if (dp->conversion == 'f' || dp->conversion == 'F') | 5669 | if (dp->conversion == 'f' || dp->conversion == 'F') |
| 5842 | { | 5670 | { |
| 5843 | char *digits; | 5671 | char *digits = |
| 5844 | size_t ndigits; | ||
| 5845 | |||
| 5846 | digits = | ||
| 5847 | scale10_round_decimal_double (arg, precision); | 5672 | scale10_round_decimal_double (arg, precision); |
| 5848 | if (digits == NULL) | 5673 | if (digits == NULL) |
| 5849 | goto out_of_memory; | 5674 | goto out_of_memory; |
| 5850 | ndigits = strlen (digits); | 5675 | size_t ndigits = strlen (digits); |
| 5851 | 5676 | ||
| 5852 | if (ndigits > precision) | 5677 | if (ndigits > precision) |
| 5853 | { | 5678 | { |
| @@ -5963,12 +5788,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 5963 | else | 5788 | else |
| 5964 | { | 5789 | { |
| 5965 | /* arg > 0.0. */ | 5790 | /* arg > 0.0. */ |
| 5966 | int adjusted; | 5791 | exponent = floorlog10 (arg); |
| 5792 | int adjusted = 0; | ||
| 5967 | char *digits; | 5793 | char *digits; |
| 5968 | size_t ndigits; | 5794 | size_t ndigits; |
| 5969 | |||
| 5970 | exponent = floorlog10 (arg); | ||
| 5971 | adjusted = 0; | ||
| 5972 | for (;;) | 5795 | for (;;) |
| 5973 | { | 5796 | { |
| 5974 | digits = | 5797 | digits = |
| @@ -6070,9 +5893,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6070 | else | 5893 | else |
| 6071 | { | 5894 | { |
| 6072 | char expbuf[6 + 1]; | 5895 | char expbuf[6 + 1]; |
| 6073 | const char *ep; | ||
| 6074 | sprintf (expbuf, decimal_format, exponent); | 5896 | sprintf (expbuf, decimal_format, exponent); |
| 6075 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 5897 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 6076 | p++; | 5898 | p++; |
| 6077 | } | 5899 | } |
| 6078 | } | 5900 | } |
| @@ -6109,14 +5931,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6109 | else | 5931 | else |
| 6110 | { | 5932 | { |
| 6111 | /* arg > 0.0. */ | 5933 | /* arg > 0.0. */ |
| 6112 | int exponent; | 5934 | int exponent = floorlog10 (arg); |
| 6113 | int adjusted; | 5935 | int adjusted = 0; |
| 6114 | char *digits; | 5936 | char *digits; |
| 6115 | size_t ndigits; | 5937 | size_t ndigits; |
| 6116 | size_t nzeroes; | ||
| 6117 | |||
| 6118 | exponent = floorlog10 (arg); | ||
| 6119 | adjusted = 0; | ||
| 6120 | for (;;) | 5938 | for (;;) |
| 6121 | { | 5939 | { |
| 6122 | digits = | 5940 | digits = |
| @@ -6172,7 +5990,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6172 | 5990 | ||
| 6173 | /* Determine the number of trailing zeroes | 5991 | /* Determine the number of trailing zeroes |
| 6174 | that have to be dropped. */ | 5992 | that have to be dropped. */ |
| 6175 | nzeroes = 0; | 5993 | size_t nzeroes = 0; |
| 6176 | if ((flags & FLAG_ALT) == 0) | 5994 | if ((flags & FLAG_ALT) == 0) |
| 6177 | while (nzeroes < ndigits | 5995 | while (nzeroes < ndigits |
| 6178 | && digits[nzeroes] == '0') | 5996 | && digits[nzeroes] == '0') |
| @@ -6337,9 +6155,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6337 | else | 6155 | else |
| 6338 | { | 6156 | { |
| 6339 | char expbuf[6 + 1]; | 6157 | char expbuf[6 + 1]; |
| 6340 | const char *ep; | ||
| 6341 | sprintf (expbuf, decimal_format, exponent); | 6158 | sprintf (expbuf, decimal_format, exponent); |
| 6342 | for (ep = expbuf; (*p = *ep) != '\0'; ep++) | 6159 | for (const char *ep = expbuf; (*p = *ep) != '\0'; ep++) |
| 6343 | p++; | 6160 | p++; |
| 6344 | } | 6161 | } |
| 6345 | } | 6162 | } |
| @@ -6409,7 +6226,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6409 | 6226 | ||
| 6410 | /* The generated string now extends from tmp to p, with the | 6227 | /* The generated string now extends from tmp to p, with the |
| 6411 | zero padding insertion point being at pad_ptr. */ | 6228 | zero padding insertion point being at pad_ptr. */ |
| 6412 | count = p - tmp; | 6229 | size_t count = p - tmp; |
| 6413 | 6230 | ||
| 6414 | if (count < width) | 6231 | if (count < width) |
| 6415 | { | 6232 | { |
| @@ -6473,16 +6290,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6473 | { | 6290 | { |
| 6474 | arg_type type = a.arg[dp->arg_index].type; | 6291 | arg_type type = a.arg[dp->arg_index].type; |
| 6475 | int flags = dp->flags; | 6292 | int flags = dp->flags; |
| 6476 | #if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | ||
| 6477 | int has_width; | ||
| 6478 | #endif | ||
| 6479 | #if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | ||
| 6480 | size_t width; | ||
| 6481 | #endif | ||
| 6482 | #if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | ||
| 6483 | int has_precision; | ||
| 6484 | size_t precision; | ||
| 6485 | #endif | ||
| 6486 | #if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION | 6293 | #if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION |
| 6487 | int prec_ourselves; | 6294 | int prec_ourselves; |
| 6488 | #else | 6295 | #else |
| @@ -6511,19 +6318,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6511 | #endif | 6318 | #endif |
| 6512 | 6319 | ||
| 6513 | #if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | 6320 | #if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT |
| 6514 | has_width = 0; | 6321 | int has_width = 0; |
| 6515 | #endif | 6322 | #endif |
| 6516 | #if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | 6323 | #if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT |
| 6517 | width = 0; | 6324 | size_t width = 0; |
| 6518 | if (dp->width_start != dp->width_end) | 6325 | if (dp->width_start != dp->width_end) |
| 6519 | { | 6326 | { |
| 6520 | if (dp->width_arg_index != ARG_NONE) | 6327 | if (dp->width_arg_index != ARG_NONE) |
| 6521 | { | 6328 | { |
| 6522 | int arg; | ||
| 6523 | |||
| 6524 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 6329 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 6525 | abort (); | 6330 | abort (); |
| 6526 | arg = a.arg[dp->width_arg_index].a.a_int; | 6331 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 6527 | width = arg; | 6332 | width = arg; |
| 6528 | if (arg < 0) | 6333 | if (arg < 0) |
| 6529 | { | 6334 | { |
| @@ -6551,17 +6356,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6551 | #endif | 6356 | #endif |
| 6552 | 6357 | ||
| 6553 | #if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT | 6358 | #if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT |
| 6554 | has_precision = 0; | 6359 | int has_precision = 0; |
| 6555 | precision = 6; | 6360 | size_t precision = 6; |
| 6556 | if (dp->precision_start != dp->precision_end) | 6361 | if (dp->precision_start != dp->precision_end) |
| 6557 | { | 6362 | { |
| 6558 | if (dp->precision_arg_index != ARG_NONE) | 6363 | if (dp->precision_arg_index != ARG_NONE) |
| 6559 | { | 6364 | { |
| 6560 | int arg; | ||
| 6561 | |||
| 6562 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) | 6365 | if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) |
| 6563 | abort (); | 6366 | abort (); |
| 6564 | arg = a.arg[dp->precision_arg_index].a.a_int; | 6367 | int arg = a.arg[dp->precision_arg_index].a.a_int; |
| 6565 | /* "A negative precision is taken as if the precision | 6368 | /* "A negative precision is taken as if the precision |
| 6566 | were omitted." */ | 6369 | were omitted." */ |
| 6567 | if (arg >= 0) | 6370 | if (arg >= 0) |
| @@ -6648,19 +6451,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6648 | #if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT) | 6451 | #if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION || NEED_PRINTF_FLAG_GROUPING || NEED_PRINTF_FLAG_GROUPING_INT) |
| 6649 | switch (dp->conversion) | 6452 | switch (dp->conversion) |
| 6650 | { | 6453 | { |
| 6651 | # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO | 6454 | # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO |
| 6455 | # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO | ||
| 6652 | /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need | 6456 | /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need |
| 6653 | to perform the padding after this conversion. Functions | 6457 | to perform the padding after this conversion. Functions |
| 6654 | with unistdio extensions perform the padding based on | 6458 | with unistdio extensions perform the padding based on |
| 6655 | character count rather than element count. */ | 6459 | character count rather than element count. */ |
| 6656 | case 'c': case 's': | 6460 | case 'c': case 's': |
| 6657 | # endif | 6461 | # endif |
| 6658 | # if NEED_PRINTF_FLAG_ZERO | 6462 | # if NEED_PRINTF_FLAG_ZERO |
| 6659 | case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': | 6463 | case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': |
| 6660 | case 'a': case 'A': | 6464 | case 'a': case 'A': |
| 6661 | # endif | 6465 | # endif |
| 6662 | pad_ourselves = 1; | 6466 | pad_ourselves = 1; |
| 6663 | break; | 6467 | break; |
| 6468 | # endif | ||
| 6664 | default: | 6469 | default: |
| 6665 | pad_ourselves = prec_ourselves | group_ourselves; | 6470 | pad_ourselves = prec_ourselves | group_ourselves; |
| 6666 | break; | 6471 | break; |
| @@ -6728,11 +6533,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6728 | quick check anyway. */ | 6533 | quick check anyway. */ |
| 6729 | if (dp->width_arg_index != ARG_NONE) | 6534 | if (dp->width_arg_index != ARG_NONE) |
| 6730 | { | 6535 | { |
| 6731 | int arg; | ||
| 6732 | |||
| 6733 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) | 6536 | if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) |
| 6734 | abort (); | 6537 | abort (); |
| 6735 | arg = a.arg[dp->width_arg_index].a.a_int; | 6538 | int arg = a.arg[dp->width_arg_index].a.a_int; |
| 6736 | width = arg; | 6539 | width = arg; |
| 6737 | if (arg < 0) | 6540 | if (arg < 0) |
| 6738 | { | 6541 | { |
| @@ -6957,7 +6760,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6957 | /* The following platforms forbid %n: | 6760 | /* The following platforms forbid %n: |
| 6958 | - On glibc2 systems from 2004-10-18 or newer, the use of | 6761 | - On glibc2 systems from 2004-10-18 or newer, the use of |
| 6959 | %n in format strings in writable memory may crash the | 6762 | %n in format strings in writable memory may crash the |
| 6960 | program (if compiled with _FORTIFY_SOURCE=2). | 6763 | program (if compiled with _FORTIFY_SOURCE >= 2). |
| 6961 | - On macOS 10.13 or newer, the use of %n in format | 6764 | - On macOS 10.13 or newer, the use of %n in format |
| 6962 | strings in writable memory by default crashes the | 6765 | strings in writable memory by default crashes the |
| 6963 | program. | 6766 | program. |
| @@ -6990,7 +6793,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 6990 | on musl libc because we would run into an swprintf() bug. | 6793 | on musl libc because we would run into an swprintf() bug. |
| 6991 | See <https://www.openwall.com/lists/musl/2023/03/19/1>. */ | 6794 | See <https://www.openwall.com/lists/musl/2023/03/19/1>. */ |
| 6992 | fbp[1] = '\0'; | 6795 | fbp[1] = '\0'; |
| 6993 | # else /* AIX <= 5.1, HP-UX, IRIX, OSF/1, Solaris <= 9, BeOS */ | 6796 | # else /* AIX <= 5.1, HP-UX, Solaris <= 9, BeOS */ |
| 6994 | fbp[1] = '%'; | 6797 | fbp[1] = '%'; |
| 6995 | fbp[2] = 'n'; | 6798 | fbp[2] = 'n'; |
| 6996 | fbp[3] = '\0'; | 6799 | fbp[3] = '\0'; |
| @@ -7657,16 +7460,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7657 | ) | 7460 | ) |
| 7658 | { | 7461 | { |
| 7659 | /* The result string is not guaranteed to be ASCII. */ | 7462 | /* The result string is not guaranteed to be ASCII. */ |
| 7660 | const TCHAR_T *tmpsrc; | ||
| 7661 | DCHAR_T *tmpdst; | ||
| 7662 | size_t tmpdst_len; | ||
| 7663 | /* This code assumes that TCHAR_T is 'char'. */ | 7463 | /* This code assumes that TCHAR_T is 'char'. */ |
| 7664 | static_assert (sizeof (TCHAR_T) == 1); | 7464 | static_assert (sizeof (TCHAR_T) == 1); |
| 7465 | const TCHAR_T *tmpsrc; | ||
| 7665 | # if USE_SNPRINTF | 7466 | # if USE_SNPRINTF |
| 7666 | tmpsrc = (TCHAR_T *) (result + length); | 7467 | tmpsrc = (TCHAR_T *) (result + length); |
| 7667 | # else | 7468 | # else |
| 7668 | tmpsrc = tmp; | 7469 | tmpsrc = tmp; |
| 7669 | # endif | 7470 | # endif |
| 7471 | DCHAR_T *tmpdst; | ||
| 7472 | size_t tmpdst_len; | ||
| 7670 | # if WIDE_CHAR_VERSION | 7473 | # if WIDE_CHAR_VERSION |
| 7671 | /* Convert tmpsrc[0..count-1] to a freshly allocated | 7474 | /* Convert tmpsrc[0..count-1] to a freshly allocated |
| 7672 | wide character array. */ | 7475 | wide character array. */ |
| @@ -7744,9 +7547,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7744 | # endif | 7547 | # endif |
| 7745 | { | 7548 | { |
| 7746 | const TCHAR_T *tmpsrc; | 7549 | const TCHAR_T *tmpsrc; |
| 7747 | DCHAR_T *tmpdst; | ||
| 7748 | size_t n; | ||
| 7749 | |||
| 7750 | # if USE_SNPRINTF | 7550 | # if USE_SNPRINTF |
| 7751 | if (result == resultbuf) | 7551 | if (result == resultbuf) |
| 7752 | { | 7552 | { |
| @@ -7766,11 +7566,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7766 | tmpsrc = tmp; | 7566 | tmpsrc = tmp; |
| 7767 | ENSURE_ALLOCATION (xsum (length, count)); | 7567 | ENSURE_ALLOCATION (xsum (length, count)); |
| 7768 | # endif | 7568 | # endif |
| 7769 | tmpdst = result + length; | 7569 | DCHAR_T *tmpdst = result + length; |
| 7770 | /* Copy backwards, because of overlapping. */ | 7570 | /* Copy backwards, because of overlapping. */ |
| 7771 | tmpsrc += count; | 7571 | tmpsrc += count; |
| 7772 | tmpdst += count; | 7572 | tmpdst += count; |
| 7773 | for (n = count; n > 0; n--) | 7573 | for (size_t n = count; n > 0; n--) |
| 7774 | *--tmpdst = *--tmpsrc; | 7574 | *--tmpdst = *--tmpsrc; |
| 7775 | } | 7575 | } |
| 7776 | } | 7576 | } |
| @@ -7805,9 +7605,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7805 | /* glibc prefers to compare the width against the number | 7605 | /* glibc prefers to compare the width against the number |
| 7806 | of characters as well, but only for numeric conversion | 7606 | of characters as well, but only for numeric conversion |
| 7807 | specifiers. See | 7607 | specifiers. See |
| 7808 | <https://sourceware.org/bugzilla/show_bug.cgi?id=28943> | 7608 | <https://sourceware.org/PR28943> |
| 7809 | <https://sourceware.org/bugzilla/show_bug.cgi?id=30883> | 7609 | <https://sourceware.org/PR30883> |
| 7810 | <https://sourceware.org/bugzilla/show_bug.cgi?id=31542> */ | 7610 | <https://sourceware.org/PR31542> */ |
| 7811 | switch (dp->conversion) | 7611 | switch (dp->conversion) |
| 7812 | { | 7612 | { |
| 7813 | case 'd': case 'i': case 'u': | 7613 | case 'd': case 'i': case 'u': |
| @@ -7955,8 +7755,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7955 | { | 7755 | { |
| 7956 | /* Convert the %f result to upper case for %F. */ | 7756 | /* Convert the %f result to upper case for %F. */ |
| 7957 | DCHAR_T *rp = result + length; | 7757 | DCHAR_T *rp = result + length; |
| 7958 | size_t rc; | 7758 | for (size_t rc = count; rc > 0; rc--, rp++) |
| 7959 | for (rc = count; rc > 0; rc--, rp++) | ||
| 7960 | if (*rp >= 'a' && *rp <= 'z') | 7759 | if (*rp >= 'a' && *rp <= 'z') |
| 7961 | *rp = *rp - 'a' + 'A'; | 7760 | *rp = *rp - 'a' + 'A'; |
| 7962 | } | 7761 | } |
| @@ -7979,9 +7778,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, | |||
| 7979 | if (result != resultbuf && length + 1 < allocated) | 7778 | if (result != resultbuf && length + 1 < allocated) |
| 7980 | { | 7779 | { |
| 7981 | /* Shrink the allocated memory if possible. */ | 7780 | /* Shrink the allocated memory if possible. */ |
| 7982 | DCHAR_T *memory; | 7781 | DCHAR_T *memory = |
| 7983 | 7782 | (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); | |
| 7984 | memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); | ||
| 7985 | if (memory != NULL) | 7783 | if (memory != NULL) |
| 7986 | result = memory; | 7784 | result = memory; |
| 7987 | } | 7785 | } |
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h index ccd60e5e..27b9585b 100644 --- a/gl/vasnprintf.h +++ b/gl/vasnprintf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* vsprintf with automatic memory allocation. | 1 | /* vsprintf with automatic memory allocation. |
| 2 | Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2004, 2007-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/vasprintf.c b/gl/vasprintf.c index 30aa4469..a22305b8 100644 --- a/gl/vasprintf.c +++ b/gl/vasprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 1999, 2002, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2002, 2006-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/verify.h b/gl/verify.h index 3b01d7c2..ad45c39d 100644 --- a/gl/verify.h +++ b/gl/verify.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Compile-time assert-like macros. | 1 | /* Compile-time assert-like macros. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005-2006, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c index d3d7ef7a..444562e6 100644 --- a/gl/vsnprintf.c +++ b/gl/vsnprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 2004, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2004, 2006-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/vsnzprintf.c b/gl/vsnzprintf.c index f6e6b1d4..0d35195f 100644 --- a/gl/vsnzprintf.c +++ b/gl/vsnzprintf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Formatted output to strings. | 1 | /* Formatted output to strings. |
| 2 | Copyright (C) 2004, 2006-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2004, 2006-2026 Free Software Foundation, Inc. |
| 3 | Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. | 3 | Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -33,12 +33,9 @@ | |||
| 33 | ptrdiff_t | 33 | ptrdiff_t |
| 34 | vsnzprintf (char *str, size_t size, const char *format, va_list args) | 34 | vsnzprintf (char *str, size_t size, const char *format, va_list args) |
| 35 | { | 35 | { |
| 36 | char *output; | ||
| 37 | size_t len; | ||
| 38 | size_t lenbuf = size; | 36 | size_t lenbuf = size; |
| 39 | 37 | char *output = vasnprintf (str, &lenbuf, format, args); | |
| 40 | output = vasnprintf (str, &lenbuf, format, args); | 38 | size_t len = lenbuf; |
| 41 | len = lenbuf; | ||
| 42 | 39 | ||
| 43 | if (!output) | 40 | if (!output) |
| 44 | return -1; | 41 | return -1; |
diff --git a/gl/w32sock.h b/gl/w32sock.h index d7087a28..a3201ad9 100644 --- a/gl/w32sock.h +++ b/gl/w32sock.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* w32sock.h --- internal auxiliary functions for Windows socket functions | 1 | /* w32sock.h --- internal auxiliary functions for Windows socket functions |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/warn-on-use.h b/gl/warn-on-use.h index c0072412..97f36ea2 100644 --- a/gl/warn-on-use.h +++ b/gl/warn-on-use.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for emitting warnings if a function is used. | 1 | /* A C macro for emitting warnings if a function is used. |
| 2 | Copyright (C) 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU Lesser General Public License as published | 5 | under the terms of the GNU Lesser General Public License as published |
diff --git a/gl/wchar.in.h b/gl/wchar.in.h index a6c52eb9..a60a4dfc 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute for ISO C99 <wchar.h>, for platforms that have issues. | 1 | /* A substitute for ISO C99 <wchar.h>, for platforms that have issues. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -36,8 +36,7 @@ | |||
| 36 | && ((defined _INTTYPES_INCLUDED \ | 36 | && ((defined _INTTYPES_INCLUDED \ |
| 37 | && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ | 37 | && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ |
| 38 | || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ | 38 | || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ |
| 39 | || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ | 39 | || (defined __MINGW32__ && defined __STRING_H_SOURCED__)) |
| 40 | || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H) | ||
| 41 | /* Special invocation convention: | 40 | /* Special invocation convention: |
| 42 | - Inside glibc and uClibc header files, but not MinGW. | 41 | - Inside glibc and uClibc header files, but not MinGW. |
| 43 | - On HP-UX 11.00 we have a sequence of nested includes | 42 | - On HP-UX 11.00 we have a sequence of nested includes |
| @@ -47,10 +46,7 @@ | |||
| 47 | therefore we cannot provide the function overrides; instead include only | 46 | therefore we cannot provide the function overrides; instead include only |
| 48 | the system's <wchar.h>. | 47 | the system's <wchar.h>. |
| 49 | - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of | 48 | - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of |
| 50 | <wchar.h> is actually processed, and that doesn't include 'mbstate_t'. | 49 | <wchar.h> is actually processed, and that doesn't include 'mbstate_t'. */ |
| 51 | - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and | ||
| 52 | the latter includes <wchar.h>. But here, we have no way to detect whether | ||
| 53 | <wctype.h> is completely included or is still being included. */ | ||
| 54 | 50 | ||
| 55 | #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ | 51 | #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
| 56 | /* The glibc 2.5 /usr/include/wchar.h defines __need_wint_t but never undefines | 52 | /* The glibc 2.5 /usr/include/wchar.h defines __need_wint_t but never undefines |
| @@ -62,8 +58,6 @@ | |||
| 62 | 58 | ||
| 63 | #ifndef _@GUARD_PREFIX@_WCHAR_H | 59 | #ifndef _@GUARD_PREFIX@_WCHAR_H |
| 64 | 60 | ||
| 65 | #define _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H | ||
| 66 | |||
| 67 | #if @HAVE_FEATURES_H@ | 61 | #if @HAVE_FEATURES_H@ |
| 68 | # include <features.h> /* for __GLIBC__ */ | 62 | # include <features.h> /* for __GLIBC__ */ |
| 69 | #endif | 63 | #endif |
| @@ -82,8 +76,6 @@ | |||
| 82 | # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ | 76 | # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
| 83 | #endif | 77 | #endif |
| 84 | 78 | ||
| 85 | #undef _@GUARD_PREFIX@_ALREADY_INCLUDING_WCHAR_H | ||
| 86 | |||
| 87 | #ifndef _@GUARD_PREFIX@_WCHAR_H | 79 | #ifndef _@GUARD_PREFIX@_WCHAR_H |
| 88 | #define _@GUARD_PREFIX@_WCHAR_H | 80 | #define _@GUARD_PREFIX@_WCHAR_H |
| 89 | 81 | ||
| @@ -110,7 +102,7 @@ | |||
| 110 | /* Applies to: functions. Cannot be used on inline functions. */ | 102 | /* Applies to: functions. Cannot be used on inline functions. */ |
| 111 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE | 103 | #ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 112 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ | 104 | # if defined __cplusplus && defined __GNUC__ && !defined __clang__ |
| 113 | /* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */ | 105 | /* Work around GCC bug <https://gcc.gnu.org/PR108231> */ |
| 114 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ | 106 | # define _GL_ATTRIBUTE_DEALLOC_FREE \ |
| 115 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) | 107 | _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) |
| 116 | # else | 108 | # else |
| @@ -211,18 +203,11 @@ typedef unsigned int rpl_wint_t; | |||
| 211 | 203 | ||
| 212 | 204 | ||
| 213 | /* Override mbstate_t if it is too small. | 205 | /* Override mbstate_t if it is too small. |
| 214 | On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for | ||
| 215 | implementing mbrtowc for encodings like UTF-8. | ||
| 216 | On AIX, MSVC, and OpenBSD 6.0, mbrtowc needs to be overridden, but | 206 | On AIX, MSVC, and OpenBSD 6.0, mbrtowc needs to be overridden, but |
| 217 | mbstate_t exists and is large enough and overriding it would cause problems | 207 | mbstate_t exists and is large enough and overriding it would cause problems |
| 218 | in C++ mode. */ | 208 | in C++ mode. */ |
| 219 | #if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ | 209 | #if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ |
| 220 | # if !GNULIB_defined_mbstate_t | 210 | # if !GNULIB_defined_mbstate_t |
| 221 | # if !(defined _AIX || defined _MSC_VER || defined __OpenBSD__) | ||
| 222 | typedef int rpl_mbstate_t; | ||
| 223 | # undef mbstate_t | ||
| 224 | # define mbstate_t rpl_mbstate_t | ||
| 225 | # endif | ||
| 226 | # define GNULIB_defined_mbstate_t 1 | 211 | # define GNULIB_defined_mbstate_t 1 |
| 227 | # endif | 212 | # endif |
| 228 | #endif | 213 | #endif |
| @@ -316,7 +301,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) | |||
| 316 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) | 301 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) |
| 317 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); | 302 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); |
| 318 | # ifndef __cplusplus | 303 | # ifndef __cplusplus |
| 319 | _GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) | 304 | _GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) |
| 320 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); | 305 | _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); |
| 321 | # endif | 306 | # endif |
| 322 | _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) | 307 | _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) |
| @@ -347,7 +332,6 @@ _GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); | |||
| 347 | _GL_CXXALIASWARN (btowc); | 332 | _GL_CXXALIASWARN (btowc); |
| 348 | # endif | 333 | # endif |
| 349 | #elif defined GNULIB_POSIXCHECK | 334 | #elif defined GNULIB_POSIXCHECK |
| 350 | # undef btowc | ||
| 351 | # if HAVE_RAW_DECL_BTOWC | 335 | # if HAVE_RAW_DECL_BTOWC |
| 352 | _GL_WARN_ON_USE (btowc, "btowc is unportable - " | 336 | _GL_WARN_ON_USE (btowc, "btowc is unportable - " |
| 353 | "use gnulib module btowc for portability"); | 337 | "use gnulib module btowc for portability"); |
| @@ -365,8 +349,8 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " | |||
| 365 | _GL_FUNCDECL_RPL (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); | 349 | _GL_FUNCDECL_RPL (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); |
| 366 | _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); | 350 | _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); |
| 367 | # else | 351 | # else |
| 368 | # if !defined wctob && !@HAVE_DECL_WCTOB@ | 352 | # if !defined wctob && !@HAVE_WCTOB@ |
| 369 | /* wctob is provided by gnulib, or wctob exists but is not declared. */ | 353 | /* wctob is provided by gnulib. */ |
| 370 | _GL_FUNCDECL_SYS (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); | 354 | _GL_FUNCDECL_SYS (wctob, int, (wint_t wc), _GL_ATTRIBUTE_PURE); |
| 371 | # endif | 355 | # endif |
| 372 | _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); | 356 | _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); |
| @@ -375,7 +359,6 @@ _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); | |||
| 375 | _GL_CXXALIASWARN (wctob); | 359 | _GL_CXXALIASWARN (wctob); |
| 376 | # endif | 360 | # endif |
| 377 | #elif defined GNULIB_POSIXCHECK | 361 | #elif defined GNULIB_POSIXCHECK |
| 378 | # undef wctob | ||
| 379 | # if HAVE_RAW_DECL_WCTOB | 362 | # if HAVE_RAW_DECL_WCTOB |
| 380 | _GL_WARN_ON_USE (wctob, "wctob is unportable - " | 363 | _GL_WARN_ON_USE (wctob, "wctob is unportable - " |
| 381 | "use gnulib module wctob for portability"); | 364 | "use gnulib module wctob for portability"); |
| @@ -402,7 +385,6 @@ _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); | |||
| 402 | _GL_CXXALIASWARN (mbsinit); | 385 | _GL_CXXALIASWARN (mbsinit); |
| 403 | # endif | 386 | # endif |
| 404 | #elif defined GNULIB_POSIXCHECK | 387 | #elif defined GNULIB_POSIXCHECK |
| 405 | # undef mbsinit | ||
| 406 | # if HAVE_RAW_DECL_MBSINIT | 388 | # if HAVE_RAW_DECL_MBSINIT |
| 407 | _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " | 389 | _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " |
| 408 | "use gnulib module mbsinit for portability"); | 390 | "use gnulib module mbsinit for portability"); |
| @@ -443,7 +425,7 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " | |||
| 443 | without considering what mbsinit() does, we get test failures such as | 425 | without considering what mbsinit() does, we get test failures such as |
| 444 | assertion "mbsinit (&iter->state)" failed | 426 | assertion "mbsinit (&iter->state)" failed |
| 445 | */ | 427 | */ |
| 446 | # if GNULIB_defined_mbstate_t /* AIX, IRIX */ | 428 | # if GNULIB_defined_mbstate_t /* AIX */ |
| 447 | /* mbstate_t has at least 4 bytes. They are used as coded in | 429 | /* mbstate_t has at least 4 bytes. They are used as coded in |
| 448 | gnulib/lib/mbrtowc.c. */ | 430 | gnulib/lib/mbrtowc.c. */ |
| 449 | # define _GL_MBSTATE_INIT_SIZE 1 | 431 | # define _GL_MBSTATE_INIT_SIZE 1 |
| @@ -642,7 +624,6 @@ _GL_CXXALIAS_SYS (mbrtowc, size_t, | |||
| 642 | _GL_CXXALIASWARN (mbrtowc); | 624 | _GL_CXXALIASWARN (mbrtowc); |
| 643 | # endif | 625 | # endif |
| 644 | #elif defined GNULIB_POSIXCHECK | 626 | #elif defined GNULIB_POSIXCHECK |
| 645 | # undef mbrtowc | ||
| 646 | # if HAVE_RAW_DECL_MBRTOWC | 627 | # if HAVE_RAW_DECL_MBRTOWC |
| 647 | _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " | 628 | _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " |
| 648 | "use gnulib module mbrtowc for portability"); | 629 | "use gnulib module mbrtowc for portability"); |
| @@ -673,7 +654,6 @@ _GL_CXXALIAS_SYS (mbrlen, size_t, | |||
| 673 | _GL_CXXALIASWARN (mbrlen); | 654 | _GL_CXXALIASWARN (mbrlen); |
| 674 | # endif | 655 | # endif |
| 675 | #elif defined GNULIB_POSIXCHECK | 656 | #elif defined GNULIB_POSIXCHECK |
| 676 | # undef mbrlen | ||
| 677 | # if HAVE_RAW_DECL_MBRLEN | 657 | # if HAVE_RAW_DECL_MBRLEN |
| 678 | _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " | 658 | _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " |
| 679 | "use gnulib module mbrlen for portability"); | 659 | "use gnulib module mbrlen for portability"); |
| @@ -714,7 +694,6 @@ _GL_CXXALIAS_SYS (mbsrtowcs, size_t, | |||
| 714 | _GL_CXXALIASWARN (mbsrtowcs); | 694 | _GL_CXXALIASWARN (mbsrtowcs); |
| 715 | # endif | 695 | # endif |
| 716 | #elif defined GNULIB_POSIXCHECK | 696 | #elif defined GNULIB_POSIXCHECK |
| 717 | # undef mbsrtowcs | ||
| 718 | # if HAVE_RAW_DECL_MBSRTOWCS | 697 | # if HAVE_RAW_DECL_MBSRTOWCS |
| 719 | _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " | 698 | _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " |
| 720 | "use gnulib module mbsrtowcs for portability"); | 699 | "use gnulib module mbsrtowcs for portability"); |
| @@ -755,7 +734,6 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, | |||
| 755 | _GL_CXXALIASWARN (mbsnrtowcs); | 734 | _GL_CXXALIASWARN (mbsnrtowcs); |
| 756 | # endif | 735 | # endif |
| 757 | #elif defined GNULIB_POSIXCHECK | 736 | #elif defined GNULIB_POSIXCHECK |
| 758 | # undef mbsnrtowcs | ||
| 759 | # if HAVE_RAW_DECL_MBSNRTOWCS | 737 | # if HAVE_RAW_DECL_MBSNRTOWCS |
| 760 | _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " | 738 | _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " |
| 761 | "use gnulib module mbsnrtowcs for portability"); | 739 | "use gnulib module mbsnrtowcs for portability"); |
| @@ -786,7 +764,6 @@ _GL_CXXALIAS_SYS (wcrtomb, size_t, | |||
| 786 | _GL_CXXALIASWARN (wcrtomb); | 764 | _GL_CXXALIASWARN (wcrtomb); |
| 787 | # endif | 765 | # endif |
| 788 | #elif defined GNULIB_POSIXCHECK | 766 | #elif defined GNULIB_POSIXCHECK |
| 789 | # undef wcrtomb | ||
| 790 | # if HAVE_RAW_DECL_WCRTOMB | 767 | # if HAVE_RAW_DECL_WCRTOMB |
| 791 | _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " | 768 | _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " |
| 792 | "use gnulib module wcrtomb for portability"); | 769 | "use gnulib module wcrtomb for portability"); |
| @@ -827,7 +804,6 @@ _GL_CXXALIAS_SYS (wcsrtombs, size_t, | |||
| 827 | _GL_CXXALIASWARN (wcsrtombs); | 804 | _GL_CXXALIASWARN (wcsrtombs); |
| 828 | # endif | 805 | # endif |
| 829 | #elif defined GNULIB_POSIXCHECK | 806 | #elif defined GNULIB_POSIXCHECK |
| 830 | # undef wcsrtombs | ||
| 831 | # if HAVE_RAW_DECL_WCSRTOMBS | 807 | # if HAVE_RAW_DECL_WCSRTOMBS |
| 832 | _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " | 808 | _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " |
| 833 | "use gnulib module wcsrtombs for portability"); | 809 | "use gnulib module wcsrtombs for portability"); |
| @@ -872,7 +848,6 @@ _GL_CXXALIAS_SYS (wcsnrtombs, size_t, | |||
| 872 | _GL_CXXALIASWARN (wcsnrtombs); | 848 | _GL_CXXALIASWARN (wcsnrtombs); |
| 873 | # endif | 849 | # endif |
| 874 | #elif defined GNULIB_POSIXCHECK | 850 | #elif defined GNULIB_POSIXCHECK |
| 875 | # undef wcsnrtombs | ||
| 876 | # if HAVE_RAW_DECL_WCSNRTOMBS | 851 | # if HAVE_RAW_DECL_WCSNRTOMBS |
| 877 | _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " | 852 | _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " |
| 878 | "use gnulib module wcsnrtombs for portability"); | 853 | "use gnulib module wcsnrtombs for portability"); |
| @@ -900,7 +875,6 @@ _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); | |||
| 900 | _GL_CXXALIASWARN (wcwidth); | 875 | _GL_CXXALIASWARN (wcwidth); |
| 901 | # endif | 876 | # endif |
| 902 | #elif defined GNULIB_POSIXCHECK | 877 | #elif defined GNULIB_POSIXCHECK |
| 903 | # undef wcwidth | ||
| 904 | # if HAVE_RAW_DECL_WCWIDTH | 878 | # if HAVE_RAW_DECL_WCWIDTH |
| 905 | _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " | 879 | _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " |
| 906 | "use gnulib module wcwidth for portability"); | 880 | "use gnulib module wcwidth for portability"); |
| @@ -933,7 +907,6 @@ _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, | |||
| 933 | _GL_CXXALIASWARN (wmemchr); | 907 | _GL_CXXALIASWARN (wmemchr); |
| 934 | # endif | 908 | # endif |
| 935 | #elif defined GNULIB_POSIXCHECK | 909 | #elif defined GNULIB_POSIXCHECK |
| 936 | # undef wmemchr | ||
| 937 | # if HAVE_RAW_DECL_WMEMCHR | 910 | # if HAVE_RAW_DECL_WMEMCHR |
| 938 | _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " | 911 | _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " |
| 939 | "use gnulib module wmemchr for portability"); | 912 | "use gnulib module wmemchr for portability"); |
| @@ -970,7 +943,6 @@ _GL_CXXALIAS_SYS (wmemcmp, int, | |||
| 970 | _GL_CXXALIASWARN (wmemcmp); | 943 | _GL_CXXALIASWARN (wmemcmp); |
| 971 | # endif | 944 | # endif |
| 972 | #elif defined GNULIB_POSIXCHECK | 945 | #elif defined GNULIB_POSIXCHECK |
| 973 | # undef wmemcmp | ||
| 974 | # if HAVE_RAW_DECL_WMEMCMP | 946 | # if HAVE_RAW_DECL_WMEMCMP |
| 975 | _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " | 947 | _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " |
| 976 | "use gnulib module wmemcmp for portability"); | 948 | "use gnulib module wmemcmp for portability"); |
| @@ -994,7 +966,6 @@ _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, | |||
| 994 | _GL_CXXALIASWARN (wmemcpy); | 966 | _GL_CXXALIASWARN (wmemcpy); |
| 995 | # endif | 967 | # endif |
| 996 | #elif defined GNULIB_POSIXCHECK | 968 | #elif defined GNULIB_POSIXCHECK |
| 997 | # undef wmemcpy | ||
| 998 | # if HAVE_RAW_DECL_WMEMCPY | 969 | # if HAVE_RAW_DECL_WMEMCPY |
| 999 | _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " | 970 | _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " |
| 1000 | "use gnulib module wmemcpy for portability"); | 971 | "use gnulib module wmemcpy for portability"); |
| @@ -1017,7 +988,6 @@ _GL_CXXALIAS_SYS (wmemmove, wchar_t *, | |||
| 1017 | _GL_CXXALIASWARN (wmemmove); | 988 | _GL_CXXALIASWARN (wmemmove); |
| 1018 | # endif | 989 | # endif |
| 1019 | #elif defined GNULIB_POSIXCHECK | 990 | #elif defined GNULIB_POSIXCHECK |
| 1020 | # undef wmemmove | ||
| 1021 | # if HAVE_RAW_DECL_WMEMMOVE | 991 | # if HAVE_RAW_DECL_WMEMMOVE |
| 1022 | _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " | 992 | _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " |
| 1023 | "use gnulib module wmemmove for portability"); | 993 | "use gnulib module wmemmove for portability"); |
| @@ -1053,7 +1023,6 @@ _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, | |||
| 1053 | _GL_CXXALIASWARN (wmempcpy); | 1023 | _GL_CXXALIASWARN (wmempcpy); |
| 1054 | # endif | 1024 | # endif |
| 1055 | #elif defined GNULIB_POSIXCHECK | 1025 | #elif defined GNULIB_POSIXCHECK |
| 1056 | # undef wmempcpy | ||
| 1057 | # if HAVE_RAW_DECL_WMEMPCPY | 1026 | # if HAVE_RAW_DECL_WMEMPCPY |
| 1058 | _GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " | 1027 | _GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " |
| 1059 | "use gnulib module wmempcpy for portability"); | 1028 | "use gnulib module wmempcpy for portability"); |
| @@ -1072,7 +1041,6 @@ _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); | |||
| 1072 | _GL_CXXALIASWARN (wmemset); | 1041 | _GL_CXXALIASWARN (wmemset); |
| 1073 | # endif | 1042 | # endif |
| 1074 | #elif defined GNULIB_POSIXCHECK | 1043 | #elif defined GNULIB_POSIXCHECK |
| 1075 | # undef wmemset | ||
| 1076 | # if HAVE_RAW_DECL_WMEMSET | 1044 | # if HAVE_RAW_DECL_WMEMSET |
| 1077 | _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " | 1045 | _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " |
| 1078 | "use gnulib module wmemset for portability"); | 1046 | "use gnulib module wmemset for portability"); |
| @@ -1090,7 +1058,6 @@ _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); | |||
| 1090 | _GL_CXXALIASWARN (wcslen); | 1058 | _GL_CXXALIASWARN (wcslen); |
| 1091 | # endif | 1059 | # endif |
| 1092 | #elif defined GNULIB_POSIXCHECK | 1060 | #elif defined GNULIB_POSIXCHECK |
| 1093 | # undef wcslen | ||
| 1094 | # if HAVE_RAW_DECL_WCSLEN | 1061 | # if HAVE_RAW_DECL_WCSLEN |
| 1095 | _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " | 1062 | _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " |
| 1096 | "use gnulib module wcslen for portability"); | 1063 | "use gnulib module wcslen for portability"); |
| @@ -1110,7 +1077,6 @@ _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen), | |||
| 1110 | _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); | 1077 | _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); |
| 1111 | _GL_CXXALIASWARN (wcsnlen); | 1078 | _GL_CXXALIASWARN (wcsnlen); |
| 1112 | #elif defined GNULIB_POSIXCHECK | 1079 | #elif defined GNULIB_POSIXCHECK |
| 1113 | # undef wcsnlen | ||
| 1114 | # if HAVE_RAW_DECL_WCSNLEN | 1080 | # if HAVE_RAW_DECL_WCSNLEN |
| 1115 | _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " | 1081 | _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " |
| 1116 | "use gnulib module wcsnlen for portability"); | 1082 | "use gnulib module wcsnlen for portability"); |
| @@ -1130,7 +1096,6 @@ _GL_CXXALIAS_SYS (wcscpy, wchar_t *, | |||
| 1130 | _GL_CXXALIASWARN (wcscpy); | 1096 | _GL_CXXALIASWARN (wcscpy); |
| 1131 | # endif | 1097 | # endif |
| 1132 | #elif defined GNULIB_POSIXCHECK | 1098 | #elif defined GNULIB_POSIXCHECK |
| 1133 | # undef wcscpy | ||
| 1134 | # if HAVE_RAW_DECL_WCSCPY | 1099 | # if HAVE_RAW_DECL_WCSCPY |
| 1135 | _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " | 1100 | _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " |
| 1136 | "use gnulib module wcscpy for portability"); | 1101 | "use gnulib module wcscpy for portability"); |
| @@ -1151,7 +1116,6 @@ _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, | |||
| 1151 | (wchar_t *restrict dest, const wchar_t *restrict src)); | 1116 | (wchar_t *restrict dest, const wchar_t *restrict src)); |
| 1152 | _GL_CXXALIASWARN (wcpcpy); | 1117 | _GL_CXXALIASWARN (wcpcpy); |
| 1153 | #elif defined GNULIB_POSIXCHECK | 1118 | #elif defined GNULIB_POSIXCHECK |
| 1154 | # undef wcpcpy | ||
| 1155 | # if HAVE_RAW_DECL_WCPCPY | 1119 | # if HAVE_RAW_DECL_WCPCPY |
| 1156 | _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " | 1120 | _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " |
| 1157 | "use gnulib module wcpcpy for portability"); | 1121 | "use gnulib module wcpcpy for portability"); |
| @@ -1175,7 +1139,6 @@ _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, | |||
| 1175 | _GL_CXXALIASWARN (wcsncpy); | 1139 | _GL_CXXALIASWARN (wcsncpy); |
| 1176 | # endif | 1140 | # endif |
| 1177 | #elif defined GNULIB_POSIXCHECK | 1141 | #elif defined GNULIB_POSIXCHECK |
| 1178 | # undef wcsncpy | ||
| 1179 | # if HAVE_RAW_DECL_WCSNCPY | 1142 | # if HAVE_RAW_DECL_WCSNCPY |
| 1180 | _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " | 1143 | _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " |
| 1181 | "use gnulib module wcsncpy for portability"); | 1144 | "use gnulib module wcsncpy for portability"); |
| @@ -1199,7 +1162,6 @@ _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, | |||
| 1199 | const wchar_t *restrict src, size_t n)); | 1162 | const wchar_t *restrict src, size_t n)); |
| 1200 | _GL_CXXALIASWARN (wcpncpy); | 1163 | _GL_CXXALIASWARN (wcpncpy); |
| 1201 | #elif defined GNULIB_POSIXCHECK | 1164 | #elif defined GNULIB_POSIXCHECK |
| 1202 | # undef wcpncpy | ||
| 1203 | # if HAVE_RAW_DECL_WCPNCPY | 1165 | # if HAVE_RAW_DECL_WCPNCPY |
| 1204 | _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " | 1166 | _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " |
| 1205 | "use gnulib module wcpncpy for portability"); | 1167 | "use gnulib module wcpncpy for portability"); |
| @@ -1219,7 +1181,6 @@ _GL_CXXALIAS_SYS (wcscat, wchar_t *, | |||
| 1219 | _GL_CXXALIASWARN (wcscat); | 1181 | _GL_CXXALIASWARN (wcscat); |
| 1220 | # endif | 1182 | # endif |
| 1221 | #elif defined GNULIB_POSIXCHECK | 1183 | #elif defined GNULIB_POSIXCHECK |
| 1222 | # undef wcscat | ||
| 1223 | # if HAVE_RAW_DECL_WCSCAT | 1184 | # if HAVE_RAW_DECL_WCSCAT |
| 1224 | _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " | 1185 | _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " |
| 1225 | "use gnulib module wcscat for portability"); | 1186 | "use gnulib module wcscat for portability"); |
| @@ -1258,7 +1219,6 @@ _GL_CXXALIAS_SYS (wcsncat, wchar_t *, | |||
| 1258 | _GL_CXXALIASWARN (wcsncat); | 1219 | _GL_CXXALIASWARN (wcsncat); |
| 1259 | # endif | 1220 | # endif |
| 1260 | #elif defined GNULIB_POSIXCHECK | 1221 | #elif defined GNULIB_POSIXCHECK |
| 1261 | # undef wcsncat | ||
| 1262 | # if HAVE_RAW_DECL_WCSNCAT | 1222 | # if HAVE_RAW_DECL_WCSNCAT |
| 1263 | _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " | 1223 | _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " |
| 1264 | "use gnulib module wcsncat for portability"); | 1224 | "use gnulib module wcsncat for portability"); |
| @@ -1287,7 +1247,6 @@ _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); | |||
| 1287 | _GL_CXXALIASWARN (wcscmp); | 1247 | _GL_CXXALIASWARN (wcscmp); |
| 1288 | # endif | 1248 | # endif |
| 1289 | #elif defined GNULIB_POSIXCHECK | 1249 | #elif defined GNULIB_POSIXCHECK |
| 1290 | # undef wcscmp | ||
| 1291 | # if HAVE_RAW_DECL_WCSCMP | 1250 | # if HAVE_RAW_DECL_WCSCMP |
| 1292 | _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " | 1251 | _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " |
| 1293 | "use gnulib module wcscmp for portability"); | 1252 | "use gnulib module wcscmp for portability"); |
| @@ -1324,7 +1283,6 @@ _GL_CXXALIAS_SYS (wcsncmp, int, | |||
| 1324 | _GL_CXXALIASWARN (wcsncmp); | 1283 | _GL_CXXALIASWARN (wcsncmp); |
| 1325 | # endif | 1284 | # endif |
| 1326 | #elif defined GNULIB_POSIXCHECK | 1285 | #elif defined GNULIB_POSIXCHECK |
| 1327 | # undef wcsncmp | ||
| 1328 | # if HAVE_RAW_DECL_WCSNCMP | 1286 | # if HAVE_RAW_DECL_WCSNCMP |
| 1329 | _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " | 1287 | _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " |
| 1330 | "use gnulib module wcsncmp for portability"); | 1288 | "use gnulib module wcsncmp for portability"); |
| @@ -1344,7 +1302,6 @@ _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2), | |||
| 1344 | _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); | 1302 | _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); |
| 1345 | _GL_CXXALIASWARN (wcscasecmp); | 1303 | _GL_CXXALIASWARN (wcscasecmp); |
| 1346 | #elif defined GNULIB_POSIXCHECK | 1304 | #elif defined GNULIB_POSIXCHECK |
| 1347 | # undef wcscasecmp | ||
| 1348 | # if HAVE_RAW_DECL_WCSCASECMP | 1305 | # if HAVE_RAW_DECL_WCSCASECMP |
| 1349 | _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " | 1306 | _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " |
| 1350 | "use gnulib module wcscasecmp for portability"); | 1307 | "use gnulib module wcscasecmp for portability"); |
| @@ -1366,7 +1323,6 @@ _GL_CXXALIAS_SYS (wcsncasecmp, int, | |||
| 1366 | (const wchar_t *s1, const wchar_t *s2, size_t n)); | 1323 | (const wchar_t *s1, const wchar_t *s2, size_t n)); |
| 1367 | _GL_CXXALIASWARN (wcsncasecmp); | 1324 | _GL_CXXALIASWARN (wcsncasecmp); |
| 1368 | #elif defined GNULIB_POSIXCHECK | 1325 | #elif defined GNULIB_POSIXCHECK |
| 1369 | # undef wcsncasecmp | ||
| 1370 | # if HAVE_RAW_DECL_WCSNCASECMP | 1326 | # if HAVE_RAW_DECL_WCSNCASECMP |
| 1371 | _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " | 1327 | _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " |
| 1372 | "use gnulib module wcsncasecmp for portability"); | 1328 | "use gnulib module wcsncasecmp for portability"); |
| @@ -1385,7 +1341,6 @@ _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); | |||
| 1385 | _GL_CXXALIASWARN (wcscoll); | 1341 | _GL_CXXALIASWARN (wcscoll); |
| 1386 | # endif | 1342 | # endif |
| 1387 | #elif defined GNULIB_POSIXCHECK | 1343 | #elif defined GNULIB_POSIXCHECK |
| 1388 | # undef wcscoll | ||
| 1389 | # if HAVE_RAW_DECL_WCSCOLL | 1344 | # if HAVE_RAW_DECL_WCSCOLL |
| 1390 | _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " | 1345 | _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " |
| 1391 | "use gnulib module wcscoll for portability"); | 1346 | "use gnulib module wcscoll for portability"); |
| @@ -1407,7 +1362,6 @@ _GL_CXXALIAS_SYS (wcsxfrm, size_t, | |||
| 1407 | _GL_CXXALIASWARN (wcsxfrm); | 1362 | _GL_CXXALIASWARN (wcsxfrm); |
| 1408 | # endif | 1363 | # endif |
| 1409 | #elif defined GNULIB_POSIXCHECK | 1364 | #elif defined GNULIB_POSIXCHECK |
| 1410 | # undef wcsxfrm | ||
| 1411 | # if HAVE_RAW_DECL_WCSXFRM | 1365 | # if HAVE_RAW_DECL_WCSXFRM |
| 1412 | _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " | 1366 | _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " |
| 1413 | "use gnulib module wcsxfrm for portability"); | 1367 | "use gnulib module wcsxfrm for portability"); |
| @@ -1458,7 +1412,6 @@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, | |||
| 1458 | # endif | 1412 | # endif |
| 1459 | # endif | 1413 | # endif |
| 1460 | # if defined GNULIB_POSIXCHECK | 1414 | # if defined GNULIB_POSIXCHECK |
| 1461 | # undef wcsdup | ||
| 1462 | # if HAVE_RAW_DECL_WCSDUP | 1415 | # if HAVE_RAW_DECL_WCSDUP |
| 1463 | _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " | 1416 | _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " |
| 1464 | "use gnulib module wcsdup for portability"); | 1417 | "use gnulib module wcsdup for portability"); |
| @@ -1518,7 +1471,6 @@ _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); | |||
| 1518 | _GL_CXXALIASWARN (wcschr); | 1471 | _GL_CXXALIASWARN (wcschr); |
| 1519 | # endif | 1472 | # endif |
| 1520 | #elif defined GNULIB_POSIXCHECK | 1473 | #elif defined GNULIB_POSIXCHECK |
| 1521 | # undef wcschr | ||
| 1522 | # if HAVE_RAW_DECL_WCSCHR | 1474 | # if HAVE_RAW_DECL_WCSCHR |
| 1523 | _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " | 1475 | _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " |
| 1524 | "use gnulib module wcschr for portability"); | 1476 | "use gnulib module wcschr for portability"); |
| @@ -1549,7 +1501,6 @@ _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); | |||
| 1549 | _GL_CXXALIASWARN (wcsrchr); | 1501 | _GL_CXXALIASWARN (wcsrchr); |
| 1550 | # endif | 1502 | # endif |
| 1551 | #elif defined GNULIB_POSIXCHECK | 1503 | #elif defined GNULIB_POSIXCHECK |
| 1552 | # undef wcsrchr | ||
| 1553 | # if HAVE_RAW_DECL_WCSRCHR | 1504 | # if HAVE_RAW_DECL_WCSRCHR |
| 1554 | _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " | 1505 | _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " |
| 1555 | "use gnulib module wcsrchr for portability"); | 1506 | "use gnulib module wcsrchr for portability"); |
| @@ -1569,7 +1520,6 @@ _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); | |||
| 1569 | _GL_CXXALIASWARN (wcscspn); | 1520 | _GL_CXXALIASWARN (wcscspn); |
| 1570 | # endif | 1521 | # endif |
| 1571 | #elif defined GNULIB_POSIXCHECK | 1522 | #elif defined GNULIB_POSIXCHECK |
| 1572 | # undef wcscspn | ||
| 1573 | # if HAVE_RAW_DECL_WCSCSPN | 1523 | # if HAVE_RAW_DECL_WCSCSPN |
| 1574 | _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " | 1524 | _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " |
| 1575 | "use gnulib module wcscspn for portability"); | 1525 | "use gnulib module wcscspn for portability"); |
| @@ -1589,7 +1539,6 @@ _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); | |||
| 1589 | _GL_CXXALIASWARN (wcsspn); | 1539 | _GL_CXXALIASWARN (wcsspn); |
| 1590 | # endif | 1540 | # endif |
| 1591 | #elif defined GNULIB_POSIXCHECK | 1541 | #elif defined GNULIB_POSIXCHECK |
| 1592 | # undef wcsspn | ||
| 1593 | # if HAVE_RAW_DECL_WCSSPN | 1542 | # if HAVE_RAW_DECL_WCSSPN |
| 1594 | _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " | 1543 | _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " |
| 1595 | "use gnulib module wcsspn for portability"); | 1544 | "use gnulib module wcsspn for portability"); |
| @@ -1623,7 +1572,6 @@ _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, | |||
| 1623 | _GL_CXXALIASWARN (wcspbrk); | 1572 | _GL_CXXALIASWARN (wcspbrk); |
| 1624 | # endif | 1573 | # endif |
| 1625 | #elif defined GNULIB_POSIXCHECK | 1574 | #elif defined GNULIB_POSIXCHECK |
| 1626 | # undef wcspbrk | ||
| 1627 | # if HAVE_RAW_DECL_WCSPBRK | 1575 | # if HAVE_RAW_DECL_WCSPBRK |
| 1628 | _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " | 1576 | _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " |
| 1629 | "use gnulib module wcspbrk for portability"); | 1577 | "use gnulib module wcspbrk for portability"); |
| @@ -1676,7 +1624,6 @@ _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, | |||
| 1676 | _GL_CXXALIASWARN (wcsstr); | 1624 | _GL_CXXALIASWARN (wcsstr); |
| 1677 | # endif | 1625 | # endif |
| 1678 | #elif defined GNULIB_POSIXCHECK | 1626 | #elif defined GNULIB_POSIXCHECK |
| 1679 | # undef wcsstr | ||
| 1680 | # if HAVE_RAW_DECL_WCSSTR | 1627 | # if HAVE_RAW_DECL_WCSSTR |
| 1681 | _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " | 1628 | _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " |
| 1682 | "use gnulib module wcsstr for portability"); | 1629 | "use gnulib module wcsstr for portability"); |
| @@ -1711,7 +1658,6 @@ _GL_CXXALIAS_SYS (wcstok, wchar_t *, | |||
| 1711 | _GL_CXXALIASWARN (wcstok); | 1658 | _GL_CXXALIASWARN (wcstok); |
| 1712 | # endif | 1659 | # endif |
| 1713 | #elif defined GNULIB_POSIXCHECK | 1660 | #elif defined GNULIB_POSIXCHECK |
| 1714 | # undef wcstok | ||
| 1715 | # if HAVE_RAW_DECL_WCSTOK | 1661 | # if HAVE_RAW_DECL_WCSTOK |
| 1716 | _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " | 1662 | _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " |
| 1717 | "use gnulib module wcstok for portability"); | 1663 | "use gnulib module wcstok for portability"); |
| @@ -1741,7 +1687,6 @@ _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); | |||
| 1741 | _GL_CXXALIASWARN (wcswidth); | 1687 | _GL_CXXALIASWARN (wcswidth); |
| 1742 | # endif | 1688 | # endif |
| 1743 | #elif defined GNULIB_POSIXCHECK | 1689 | #elif defined GNULIB_POSIXCHECK |
| 1744 | # undef wcswidth | ||
| 1745 | # if HAVE_RAW_DECL_WCSWIDTH | 1690 | # if HAVE_RAW_DECL_WCSWIDTH |
| 1746 | _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " | 1691 | _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " |
| 1747 | "use gnulib module wcswidth for portability"); | 1692 | "use gnulib module wcswidth for portability"); |
| @@ -1783,7 +1728,6 @@ _GL_CXXALIAS_SYS (wcsftime, size_t, | |||
| 1783 | _GL_CXXALIASWARN (wcsftime); | 1728 | _GL_CXXALIASWARN (wcsftime); |
| 1784 | # endif | 1729 | # endif |
| 1785 | #elif defined GNULIB_POSIXCHECK | 1730 | #elif defined GNULIB_POSIXCHECK |
| 1786 | # undef wcsftime | ||
| 1787 | # if HAVE_RAW_DECL_WCSFTIME | 1731 | # if HAVE_RAW_DECL_WCSFTIME |
| 1788 | _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " | 1732 | _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " |
| 1789 | "use gnulib module wcsftime for portability"); | 1733 | "use gnulib module wcsftime for portability"); |
diff --git a/gl/wcrtomb.c b/gl/wcrtomb.c index c9ebcf0c..a9b8de78 100644 --- a/gl/wcrtomb.c +++ b/gl/wcrtomb.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert wide character to multibyte character. | 1 | /* Convert wide character to multibyte character. |
| 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -36,7 +36,7 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps) | |||
| 36 | return (size_t)(-1); | 36 | return (size_t)(-1); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | #if !HAVE_WCRTOMB /* IRIX 6.5 */ \ | 39 | #if !HAVE_WCRTOMB /* HP-UX 11.00, mingw */ \ |
| 40 | || WCRTOMB_RETVAL_BUG /* Solaris 11.3, MSVC */ \ | 40 | || WCRTOMB_RETVAL_BUG /* Solaris 11.3, MSVC */ \ |
| 41 | || WCRTOMB_C_LOCALE_BUG /* Android */ | 41 | || WCRTOMB_C_LOCALE_BUG /* Android */ |
| 42 | if (s == NULL) | 42 | if (s == NULL) |
| @@ -62,7 +62,7 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps) | |||
| 62 | # else | 62 | # else |
| 63 | return wcrtomb (s, wc, ps); | 63 | return wcrtomb (s, wc, ps); |
| 64 | # endif | 64 | # endif |
| 65 | #else /* IRIX 6.5 */ | 65 | #else /* HP-UX 11.00, mingw */ |
| 66 | /* Fallback for platforms that don't have wcrtomb(). | 66 | /* Fallback for platforms that don't have wcrtomb(). |
| 67 | Implement on top of wctomb(). | 67 | Implement on top of wctomb(). |
| 68 | This code is not multithread-safe. */ | 68 | This code is not multithread-safe. */ |
diff --git a/gl/wctype-h.c b/gl/wctype-h.c index 098014a9..f773d0cb 100644 --- a/gl/wctype-h.c +++ b/gl/wctype-h.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Inline functions for <wctype.h>. | 1 | /* Inline functions for <wctype.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/wctype-impl.h b/gl/wctype-impl.h index 8bb83be7..675ea31c 100644 --- a/gl/wctype-impl.h +++ b/gl/wctype-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Get descriptor for a wide character property. | 1 | /* Get descriptor for a wide character property. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -27,11 +27,11 @@ wctype (const char* name) | |||
| 27 | switch (name[2]) | 27 | switch (name[2]) |
| 28 | { | 28 | { |
| 29 | case 'n': | 29 | case 'n': |
| 30 | if (strcmp (name + 3, "um") == 0) | 30 | if (streq (name + 3, "um")) |
| 31 | return (wctype_t) iswalnum; | 31 | return (wctype_t) iswalnum; |
| 32 | break; | 32 | break; |
| 33 | case 'p': | 33 | case 'p': |
| 34 | if (strcmp (name + 3, "ha") == 0) | 34 | if (streq (name + 3, "ha")) |
| 35 | return (wctype_t) iswalpha; | 35 | return (wctype_t) iswalpha; |
| 36 | break; | 36 | break; |
| 37 | default: | 37 | default: |
| @@ -43,34 +43,34 @@ wctype (const char* name) | |||
| 43 | } | 43 | } |
| 44 | break; | 44 | break; |
| 45 | case 'b': | 45 | case 'b': |
| 46 | if (strcmp (name + 1, "lank") == 0) | 46 | if (streq (name + 1, "lank")) |
| 47 | return (wctype_t) iswblank; | 47 | return (wctype_t) iswblank; |
| 48 | break; | 48 | break; |
| 49 | case 'c': | 49 | case 'c': |
| 50 | if (strcmp (name + 1, "ntrl") == 0) | 50 | if (streq (name + 1, "ntrl")) |
| 51 | return (wctype_t) iswcntrl; | 51 | return (wctype_t) iswcntrl; |
| 52 | break; | 52 | break; |
| 53 | case 'd': | 53 | case 'd': |
| 54 | if (strcmp (name + 1, "igit") == 0) | 54 | if (streq (name + 1, "igit")) |
| 55 | return (wctype_t) iswdigit; | 55 | return (wctype_t) iswdigit; |
| 56 | break; | 56 | break; |
| 57 | case 'g': | 57 | case 'g': |
| 58 | if (strcmp (name + 1, "raph") == 0) | 58 | if (streq (name + 1, "raph")) |
| 59 | return (wctype_t) iswgraph; | 59 | return (wctype_t) iswgraph; |
| 60 | break; | 60 | break; |
| 61 | case 'l': | 61 | case 'l': |
| 62 | if (strcmp (name + 1, "ower") == 0) | 62 | if (streq (name + 1, "ower")) |
| 63 | return (wctype_t) iswlower; | 63 | return (wctype_t) iswlower; |
| 64 | break; | 64 | break; |
| 65 | case 'p': | 65 | case 'p': |
| 66 | switch (name[1]) | 66 | switch (name[1]) |
| 67 | { | 67 | { |
| 68 | case 'r': | 68 | case 'r': |
| 69 | if (strcmp (name + 2, "int") == 0) | 69 | if (streq (name + 2, "int")) |
| 70 | return (wctype_t) iswprint; | 70 | return (wctype_t) iswprint; |
| 71 | break; | 71 | break; |
| 72 | case 'u': | 72 | case 'u': |
| 73 | if (strcmp (name + 2, "nct") == 0) | 73 | if (streq (name + 2, "nct")) |
| 74 | return (wctype_t) iswpunct; | 74 | return (wctype_t) iswpunct; |
| 75 | break; | 75 | break; |
| 76 | default: | 76 | default: |
| @@ -78,15 +78,15 @@ wctype (const char* name) | |||
| 78 | } | 78 | } |
| 79 | break; | 79 | break; |
| 80 | case 's': | 80 | case 's': |
| 81 | if (strcmp (name + 1, "pace") == 0) | 81 | if (streq (name + 1, "pace")) |
| 82 | return (wctype_t) iswspace; | 82 | return (wctype_t) iswspace; |
| 83 | break; | 83 | break; |
| 84 | case 'u': | 84 | case 'u': |
| 85 | if (strcmp (name + 1, "pper") == 0) | 85 | if (streq (name + 1, "pper")) |
| 86 | return (wctype_t) iswupper; | 86 | return (wctype_t) iswupper; |
| 87 | break; | 87 | break; |
| 88 | case 'x': | 88 | case 'x': |
| 89 | if (strcmp (name + 1, "digit") == 0) | 89 | if (streq (name + 1, "digit")) |
| 90 | return (wctype_t) iswxdigit; | 90 | return (wctype_t) iswxdigit; |
| 91 | break; | 91 | break; |
| 92 | default: | 92 | default: |
diff --git a/gl/wctype.c b/gl/wctype.c index b421ad38..205b244c 100644 --- a/gl/wctype.c +++ b/gl/wctype.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Get descriptor for a wide character property. | 1 | /* Get descriptor for a wide character property. |
| 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2026 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2011. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
diff --git a/gl/wctype.in.h b/gl/wctype.in.h index aa4a8e7d..15f310ce 100644 --- a/gl/wctype.in.h +++ b/gl/wctype.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute for ISO C99 <wctype.h>, for platforms that lack it. | 1 | /* A substitute for ISO C99 <wctype.h>, for platforms that lack it. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -264,27 +264,7 @@ rpl_towupper (wint_t wc) | |||
| 264 | 264 | ||
| 265 | # else | 265 | # else |
| 266 | 266 | ||
| 267 | /* IRIX 5.3 has macros but no functions, its isw* macros refer to an | 267 | /* On some old platforms the functions are broken. */ |
| 268 | undefined variable _ctmp_ and to <ctype.h> macros like _P, and they | ||
| 269 | refer to system functions like _iswctype that are not in the | ||
| 270 | standard C library. Rather than try to get ancient buggy | ||
| 271 | implementations like this to work, just disable them. */ | ||
| 272 | # undef iswalnum | ||
| 273 | # undef iswalpha | ||
| 274 | # undef iswblank | ||
| 275 | # undef iswcntrl | ||
| 276 | # undef iswdigit | ||
| 277 | # undef iswgraph | ||
| 278 | # undef iswlower | ||
| 279 | # undef iswprint | ||
| 280 | # undef iswpunct | ||
| 281 | # undef iswspace | ||
| 282 | # undef iswupper | ||
| 283 | # undef iswxdigit | ||
| 284 | # undef towlower | ||
| 285 | # undef towupper | ||
| 286 | |||
| 287 | /* Linux libc5 has <wctype.h> and the functions but they are broken. */ | ||
| 288 | # if @REPLACE_ISWCNTRL@ | 268 | # if @REPLACE_ISWCNTRL@ |
| 289 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 269 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 290 | # define iswalnum rpl_iswalnum | 270 | # define iswalnum rpl_iswalnum |
| @@ -673,7 +653,6 @@ _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); | |||
| 673 | _GL_CXXALIASWARN (wctype); | 653 | _GL_CXXALIASWARN (wctype); |
| 674 | # endif | 654 | # endif |
| 675 | #elif defined GNULIB_POSIXCHECK | 655 | #elif defined GNULIB_POSIXCHECK |
| 676 | # undef wctype | ||
| 677 | # if HAVE_RAW_DECL_WCTYPE | 656 | # if HAVE_RAW_DECL_WCTYPE |
| 678 | _GL_WARN_ON_USE (wctype, "wctype is unportable - " | 657 | _GL_WARN_ON_USE (wctype, "wctype is unportable - " |
| 679 | "use gnulib module wctype for portability"); | 658 | "use gnulib module wctype for portability"); |
| @@ -701,7 +680,6 @@ _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); | |||
| 701 | _GL_CXXALIASWARN (iswctype); | 680 | _GL_CXXALIASWARN (iswctype); |
| 702 | # endif | 681 | # endif |
| 703 | #elif defined GNULIB_POSIXCHECK | 682 | #elif defined GNULIB_POSIXCHECK |
| 704 | # undef iswctype | ||
| 705 | # if HAVE_RAW_DECL_ISWCTYPE | 683 | # if HAVE_RAW_DECL_ISWCTYPE |
| 706 | _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " | 684 | _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " |
| 707 | "use gnulib module iswctype for portability"); | 685 | "use gnulib module iswctype for portability"); |
| @@ -755,7 +733,6 @@ _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); | |||
| 755 | _GL_CXXALIASWARN (wctrans); | 733 | _GL_CXXALIASWARN (wctrans); |
| 756 | # endif | 734 | # endif |
| 757 | #elif defined GNULIB_POSIXCHECK | 735 | #elif defined GNULIB_POSIXCHECK |
| 758 | # undef wctrans | ||
| 759 | # if HAVE_RAW_DECL_WCTRANS | 736 | # if HAVE_RAW_DECL_WCTRANS |
| 760 | _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " | 737 | _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " |
| 761 | "use gnulib module wctrans for portability"); | 738 | "use gnulib module wctrans for portability"); |
| @@ -783,7 +760,6 @@ _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); | |||
| 783 | _GL_CXXALIASWARN (towctrans); | 760 | _GL_CXXALIASWARN (towctrans); |
| 784 | # endif | 761 | # endif |
| 785 | #elif defined GNULIB_POSIXCHECK | 762 | #elif defined GNULIB_POSIXCHECK |
| 786 | # undef towctrans | ||
| 787 | # if HAVE_RAW_DECL_TOWCTRANS | 763 | # if HAVE_RAW_DECL_TOWCTRANS |
| 788 | _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " | 764 | _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " |
| 789 | "use gnulib module towctrans for portability"); | 765 | "use gnulib module towctrans for portability"); |
diff --git a/gl/wcwidth.c b/gl/wcwidth.c index 6e7141d0..ffcc9778 100644 --- a/gl/wcwidth.c +++ b/gl/wcwidth.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Determine the number of screen columns needed for a character. | 1 | /* Determine the number of screen columns needed for a character. |
| 2 | Copyright (C) 2006-2007, 2010-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2006-2007, 2010-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-initguard.h b/gl/windows-initguard.h index 4f45e5bb..e7da4735 100644 --- a/gl/windows-initguard.h +++ b/gl/windows-initguard.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Init guards, somewhat like spinlocks (native Windows implementation). | 1 | /* Init guards, somewhat like spinlocks (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-mutex.c b/gl/windows-mutex.c index 87b75735..a8460fab 100644 --- a/gl/windows-mutex.c +++ b/gl/windows-mutex.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Plain mutexes (native Windows implementation). | 1 | /* Plain mutexes (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-mutex.h b/gl/windows-mutex.h index dc6b41e0..38eab652 100644 --- a/gl/windows-mutex.h +++ b/gl/windows-mutex.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Plain mutexes (native Windows implementation). | 1 | /* Plain mutexes (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-once.c b/gl/windows-once.c index bd9e672a..b3c8a982 100644 --- a/gl/windows-once.c +++ b/gl/windows-once.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Once-only control (native Windows implementation). | 1 | /* Once-only control (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-once.h b/gl/windows-once.h index b27ae538..886ddb45 100644 --- a/gl/windows-once.h +++ b/gl/windows-once.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Once-only control (native Windows implementation). | 1 | /* Once-only control (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-recmutex.c b/gl/windows-recmutex.c index 09341d56..fd6f04db 100644 --- a/gl/windows-recmutex.c +++ b/gl/windows-recmutex.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Plain recursive mutexes (native Windows implementation). | 1 | /* Plain recursive mutexes (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-recmutex.h b/gl/windows-recmutex.h index 25a883d4..1b5773c1 100644 --- a/gl/windows-recmutex.h +++ b/gl/windows-recmutex.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Plain recursive mutexes (native Windows implementation). | 1 | /* Plain recursive mutexes (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/windows-rwlock.c b/gl/windows-rwlock.c index 313f14ca..4a5fbfc2 100644 --- a/gl/windows-rwlock.c +++ b/gl/windows-rwlock.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Read-write locks (native Windows implementation). | 1 | /* Read-write locks (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -46,9 +46,6 @@ glwthread_waitqueue_init (glwthread_waitqueue_t *wq) | |||
| 46 | static HANDLE | 46 | static HANDLE |
| 47 | glwthread_waitqueue_add (glwthread_waitqueue_t *wq) | 47 | glwthread_waitqueue_add (glwthread_waitqueue_t *wq) |
| 48 | { | 48 | { |
| 49 | HANDLE event; | ||
| 50 | unsigned int index; | ||
| 51 | |||
| 52 | if (wq->count == wq->alloc) | 49 | if (wq->count == wq->alloc) |
| 53 | { | 50 | { |
| 54 | unsigned int new_alloc = 2 * wq->alloc + 1; | 51 | unsigned int new_alloc = 2 * wq->alloc + 1; |
| @@ -64,14 +61,13 @@ glwthread_waitqueue_add (glwthread_waitqueue_t *wq) | |||
| 64 | unsigned int old_count = wq->count; | 61 | unsigned int old_count = wq->count; |
| 65 | unsigned int old_alloc = wq->alloc; | 62 | unsigned int old_alloc = wq->alloc; |
| 66 | unsigned int old_offset = wq->offset; | 63 | unsigned int old_offset = wq->offset; |
| 67 | unsigned int i; | ||
| 68 | if (old_offset + old_count > old_alloc) | 64 | if (old_offset + old_count > old_alloc) |
| 69 | { | 65 | { |
| 70 | unsigned int limit = old_offset + old_count - old_alloc; | 66 | unsigned int limit = old_offset + old_count - old_alloc; |
| 71 | for (i = 0; i < limit; i++) | 67 | for (unsigned int i = 0; i < limit; i++) |
| 72 | new_array[old_alloc + i] = new_array[i]; | 68 | new_array[old_alloc + i] = new_array[i]; |
| 73 | } | 69 | } |
| 74 | for (i = 0; i < old_count; i++) | 70 | for (unsigned int i = 0; i < old_count; i++) |
| 75 | new_array[i] = new_array[old_offset + i]; | 71 | new_array[i] = new_array[old_offset + i]; |
| 76 | wq->offset = 0; | 72 | wq->offset = 0; |
| 77 | } | 73 | } |
| @@ -80,11 +76,11 @@ glwthread_waitqueue_add (glwthread_waitqueue_t *wq) | |||
| 80 | } | 76 | } |
| 81 | /* Whether the created event is a manual-reset one or an auto-reset one, | 77 | /* Whether the created event is a manual-reset one or an auto-reset one, |
| 82 | does not matter, since we will wait on it only once. */ | 78 | does not matter, since we will wait on it only once. */ |
| 83 | event = CreateEvent (NULL, TRUE, FALSE, NULL); | 79 | HANDLE event = CreateEvent (NULL, TRUE, FALSE, NULL); |
| 84 | if (event == INVALID_HANDLE_VALUE) | 80 | if (event == INVALID_HANDLE_VALUE) |
| 85 | /* No way to allocate an event. */ | 81 | /* No way to allocate an event. */ |
| 86 | return INVALID_HANDLE_VALUE; | 82 | return INVALID_HANDLE_VALUE; |
| 87 | index = wq->offset + wq->count; | 83 | unsigned int index = wq->offset + wq->count; |
| 88 | if (index >= wq->alloc) | 84 | if (index >= wq->alloc) |
| 89 | index -= wq->alloc; | 85 | index -= wq->alloc; |
| 90 | wq->array[index] = event; | 86 | wq->array[index] = event; |
| @@ -107,9 +103,7 @@ glwthread_waitqueue_notify_first (glwthread_waitqueue_t *wq) | |||
| 107 | static void | 103 | static void |
| 108 | glwthread_waitqueue_notify_all (glwthread_waitqueue_t *wq) | 104 | glwthread_waitqueue_notify_all (glwthread_waitqueue_t *wq) |
| 109 | { | 105 | { |
| 110 | unsigned int i; | 106 | for (unsigned int i = 0; i < wq->count; i++) |
| 111 | |||
| 112 | for (i = 0; i < wq->count; i++) | ||
| 113 | { | 107 | { |
| 114 | unsigned int index = wq->offset + i; | 108 | unsigned int index = wq->offset + i; |
| 115 | if (index >= wq->alloc) | 109 | if (index >= wq->alloc) |
| @@ -160,10 +154,9 @@ glwthread_rwlock_rdlock (glwthread_rwlock_t *lock) | |||
| 160 | HANDLE event = glwthread_waitqueue_add (&lock->waiting_readers); | 154 | HANDLE event = glwthread_waitqueue_add (&lock->waiting_readers); |
| 161 | if (event != INVALID_HANDLE_VALUE) | 155 | if (event != INVALID_HANDLE_VALUE) |
| 162 | { | 156 | { |
| 163 | DWORD result; | ||
| 164 | LeaveCriticalSection (&lock->lock); | 157 | LeaveCriticalSection (&lock->lock); |
| 165 | /* Wait until another thread signals this event. */ | 158 | /* Wait until another thread signals this event. */ |
| 166 | result = WaitForSingleObject (event, INFINITE); | 159 | DWORD result = WaitForSingleObject (event, INFINITE); |
| 167 | if (result == WAIT_FAILED || result == WAIT_TIMEOUT) | 160 | if (result == WAIT_FAILED || result == WAIT_TIMEOUT) |
| 168 | abort (); | 161 | abort (); |
| 169 | CloseHandle (event); | 162 | CloseHandle (event); |
| @@ -217,10 +210,9 @@ glwthread_rwlock_wrlock (glwthread_rwlock_t *lock) | |||
| 217 | HANDLE event = glwthread_waitqueue_add (&lock->waiting_writers); | 210 | HANDLE event = glwthread_waitqueue_add (&lock->waiting_writers); |
| 218 | if (event != INVALID_HANDLE_VALUE) | 211 | if (event != INVALID_HANDLE_VALUE) |
| 219 | { | 212 | { |
| 220 | DWORD result; | ||
| 221 | LeaveCriticalSection (&lock->lock); | 213 | LeaveCriticalSection (&lock->lock); |
| 222 | /* Wait until another thread signals this event. */ | 214 | /* Wait until another thread signals this event. */ |
| 223 | result = WaitForSingleObject (event, INFINITE); | 215 | DWORD result = WaitForSingleObject (event, INFINITE); |
| 224 | if (result == WAIT_FAILED || result == WAIT_TIMEOUT) | 216 | if (result == WAIT_FAILED || result == WAIT_TIMEOUT) |
| 225 | abort (); | 217 | abort (); |
| 226 | CloseHandle (event); | 218 | CloseHandle (event); |
diff --git a/gl/windows-rwlock.h b/gl/windows-rwlock.h index b1b4063a..5b0a6613 100644 --- a/gl/windows-rwlock.h +++ b/gl/windows-rwlock.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Read-write locks (native Windows implementation). | 1 | /* Read-write locks (native Windows implementation). |
| 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/xalloc-die.c b/gl/xalloc-die.c index db1ee8ff..1a51976e 100644 --- a/gl/xalloc-die.c +++ b/gl/xalloc-die.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Report a memory allocation failure and exit. | 1 | /* Report a memory allocation failure and exit. |
| 2 | 2 | ||
| 3 | Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2025 Free Software | 3 | Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2026 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| @@ -26,7 +26,7 @@ | |||
| 26 | #include "exitfail.h" | 26 | #include "exitfail.h" |
| 27 | 27 | ||
| 28 | #include "gettext.h" | 28 | #include "gettext.h" |
| 29 | #define _(msgid) dgettext ("gnulib", msgid) | 29 | #define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid) |
| 30 | 30 | ||
| 31 | void | 31 | void |
| 32 | xalloc_die (void) | 32 | xalloc_die (void) |
diff --git a/gl/xalloc-oversized.h b/gl/xalloc-oversized.h index 0f66bd06..cecdaec5 100644 --- a/gl/xalloc-oversized.h +++ b/gl/xalloc-oversized.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* xalloc-oversized.h -- memory allocation size checking | 1 | /* xalloc-oversized.h -- memory allocation size checking |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
diff --git a/gl/xalloc.h b/gl/xalloc.h index 438e5caa..d3948270 100644 --- a/gl/xalloc.h +++ b/gl/xalloc.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* xalloc.h -- malloc with out-of-memory checking | 1 | /* xalloc.h -- malloc with out-of-memory checking |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/gl/xmalloc.c b/gl/xmalloc.c index 8a715807..6adc43c0 100644 --- a/gl/xmalloc.c +++ b/gl/xmalloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* xmalloc.c -- malloc with out of memory checking | 1 | /* xmalloc.c -- malloc with out of memory checking |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-2000, 2002-2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1990-2000, 2002-2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -15,10 +15,8 @@ | |||
| 15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define XALLOC_INLINE _GL_EXTERN_INLINE | 18 | #define XALLOC_INLINE _GL_EXTERN_INLINE |
| 21 | 19 | #include <config.h> | |
| 22 | #include "xalloc.h" | 20 | #include "xalloc.h" |
| 23 | 21 | ||
| 24 | #include "ialloc.h" | 22 | #include "ialloc.h" |
| @@ -29,7 +27,13 @@ | |||
| 29 | #include <stdint.h> | 27 | #include <stdint.h> |
| 30 | #include <string.h> | 28 | #include <string.h> |
| 31 | 29 | ||
| 32 | static void * _GL_ATTRIBUTE_PURE | 30 | /* Pacify GCC up to at least 15.2, which otherwise would incorrectly |
| 31 | complain about check_nonnull. */ | ||
| 32 | #if _GL_GNUC_PREREQ (4, 6) | ||
| 33 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" | ||
| 34 | #endif | ||
| 35 | |||
| 36 | static void * | ||
| 33 | check_nonnull (void *p) | 37 | check_nonnull (void *p) |
| 34 | { | 38 | { |
| 35 | if (!p) | 39 | if (!p) |
| @@ -224,13 +228,13 @@ x2nrealloc (void *p, size_t *pn, size_t s) | |||
| 224 | void * | 228 | void * |
| 225 | xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s) | 229 | xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s) |
| 226 | { | 230 | { |
| 227 | idx_t n0 = *pn; | ||
| 228 | |||
| 229 | /* The approximate size to use for initial small allocation | 231 | /* The approximate size to use for initial small allocation |
| 230 | requests. This is the largest "small" request for the GNU C | 232 | requests. This is the largest "small" request for the GNU C |
| 231 | library malloc. */ | 233 | library malloc. */ |
| 232 | enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; | 234 | enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; |
| 233 | 235 | ||
| 236 | idx_t n0 = *pn; | ||
| 237 | |||
| 234 | /* If the array is tiny, grow it to about (but no greater than) | 238 | /* If the array is tiny, grow it to about (but no greater than) |
| 235 | DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%. | 239 | DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%. |
| 236 | Adjust the growth according to three constraints: N_INCR_MIN, | 240 | Adjust the growth according to three constraints: N_INCR_MIN, |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Checked size_t computations. | 1 | /* Checked size_t computations. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -15,7 +15,6 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #include <config.h> | ||
| 19 | |||
| 20 | #define XSIZE_INLINE _GL_EXTERN_INLINE | 18 | #define XSIZE_INLINE _GL_EXTERN_INLINE |
| 19 | #include <config.h> | ||
| 21 | #include "xsize.h" | 20 | #include "xsize.h" |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* xsize.h -- Checked size_t computations. | 1 | /* xsize.h -- Checked size_t computations. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2003, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
