[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
*printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed
From: |
Bruno Haible |
Subject: |
*printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed |
Date: |
Tue, 30 Apr 2024 14:58:20 +0200 |
The configure test
checking whether printf supports the 'n' directive...
leads to some interactive behaviour not only on Windows, but also on Ubuntu,
depending on the contents of $HOME/.config/apport/settings.
Since 2024-02-21, the result of this configure test is not needed any more
in most situations. Therefore, it's a good optimization to not even the
perform the test if it's not needed.
2024-04-30 Bruno Haible <bruno@clisp.org>
*printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Don't require
gl_PRINTF_DIRECTIVE_N if gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
Likewise.
diff --git a/m4/dprintf-posix.m4 b/m4/dprintf-posix.m4
index ea9a5f516b..8f74f5a578 100644
--- a/m4/dprintf-posix.m4
+++ b/m4/dprintf-posix.m4
@@ -1,5 +1,5 @@
# dprintf-posix.m4
-# serial 9
+# serial 10
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_DPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/fprintf-posix.m4 b/m4/fprintf-posix.m4
index bf8e0554bd..1d21d806c4 100644
--- a/m4/fprintf-posix.m4
+++ b/m4/fprintf-posix.m4
@@ -1,5 +1,5 @@
# fprintf-posix.m4
-# serial 20
+# serial 21
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_FPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/obstack-printf-posix.m4 b/m4/obstack-printf-posix.m4
index 9f5b00d370..2de42a61ac 100644
--- a/m4/obstack-printf-posix.m4
+++ b/m4/obstack-printf-posix.m4
@@ -1,5 +1,5 @@
# obstack-printf-posix.m4
-# serial 10
+# serial 11
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@ AC_DEFUN([gl_FUNC_OBSTACK_PRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/snprintf-posix.m4 b/m4/snprintf-posix.m4
index 5df7b8d835..10d1e5d355 100644
--- a/m4/snprintf-posix.m4
+++ b/m4/snprintf-posix.m4
@@ -1,5 +1,5 @@
# snprintf-posix.m4
-# serial 21
+# serial 22
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_SNPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/sprintf-posix.m4 b/m4/sprintf-posix.m4
index 3cbab1e599..0f5db45ff1 100644
--- a/m4/sprintf-posix.m4
+++ b/m4/sprintf-posix.m4
@@ -1,5 +1,5 @@
# sprintf-posix.m4
-# serial 18
+# serial 19
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_SPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vasnprintf-posix.m4 b/m4/vasnprintf-posix.m4
index 55fd957985..6796acaafc 100644
--- a/m4/vasnprintf-posix.m4
+++ b/m4/vasnprintf-posix.m4
@@ -1,5 +1,5 @@
# vasnprintf-posix.m4
-# serial 19
+# serial 20
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,7 @@ AC_DEFUN_ONCE([gl_FUNC_VASNPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vasprintf-posix.m4 b/m4/vasprintf-posix.m4
index c0c35a96c4..e22afe7e15 100644
--- a/m4/vasprintf-posix.m4
+++ b/m4/vasprintf-posix.m4
@@ -1,5 +1,5 @@
# vasprintf-posix.m4
-# serial 19
+# serial 20
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_VASPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vdprintf-posix.m4 b/m4/vdprintf-posix.m4
index 0a2f65a67c..9ce7a25c52 100644
--- a/m4/vdprintf-posix.m4
+++ b/m4/vdprintf-posix.m4
@@ -1,5 +1,5 @@
# vdprintf-posix.m4
-# serial 9
+# serial 10
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_VDPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vfprintf-posix.m4 b/m4/vfprintf-posix.m4
index c51b81233a..f66bb3bc74 100644
--- a/m4/vfprintf-posix.m4
+++ b/m4/vfprintf-posix.m4
@@ -1,5 +1,5 @@
# vfprintf-posix.m4
-# serial 20
+# serial 21
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_VFPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vsnprintf-posix.m4 b/m4/vsnprintf-posix.m4
index 83373ff926..8d806272a7 100644
--- a/m4/vsnprintf-posix.m4
+++ b/m4/vsnprintf-posix.m4
@@ -1,5 +1,5 @@
# vsnprintf-posix.m4
-# serial 22
+# serial 23
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_VSNPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
diff --git a/m4/vsprintf-posix.m4 b/m4/vsprintf-posix.m4
index c6a7120cf9..b23673ce0c 100644
--- a/m4/vsprintf-posix.m4
+++ b/m4/vsprintf-posix.m4
@@ -1,5 +1,5 @@
# vsprintf-posix.m4
-# serial 18
+# serial 19
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_FUNC_VSPRINTF_IS_POSIX]
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+
m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
AC_REQUIRE([gl_PRINTF_POSITIONS])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- *printf: Don't invoke gl_PRINTF_DIRECTIVE_N when it's not needed,
Bruno Haible <=