diff options
Diffstat (limited to 'gl/m4/printf.m4')
| -rw-r--r-- | gl/m4/printf.m4 | 35 |
1 files changed, 9 insertions, 26 deletions
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";; |
