Hi Bruno,
Bruno Haible via Gnulib discussion list <[email protected]> writes:
> AC_SUBST([LTLIBINTL])
> +AH_BOTTOM([
> +/* The text domainname for Gnulib messages. Ordinarily this is "gnulib",
> + but packages that do their own translations of Gnulib can use something
> + different by defining GNULIB_TEXT_DOMAIN in their config.h file. */
> +#ifndef GNULIB_TEXT_DOMAIN
> +# define GNULIB_TEXT_DOMAIN/**/"gnulib"
> +#endif
> +])
This creates the following in gnulib-comp.m4 file:
AC_DEFUN([gl_INIT],
[
# Lots of lines snipped.
AH_BOTTOM([
/* The text domainname for Gnulib messages. Ordinarily this is "gnulib",
but packages that do their own translations of Gnulib can use something
different by defining GNULIB_TEXT_DOMAIN in their config.h file. */
#ifndef GNULIB_TEXT_DOMAIN
# define GNULIB_TEXT_DOMAIN/**/"gnulib"
#endif
])
# Lots of lines snipped.
])
This means after the "#endif" there is a line with 2 spaces. Since
AH_BOTTOM emits the text after we pop the ignored -Wtrailing-whitespace
warning, this triggers it.
I have pushed the attatched patch to fix it.
I don't expect AH_BOTTOM to be used frequently, so breaking our m4 style
this one time makes more sense than having gnulib-tool deal with this.
Collin
>From f9e44d5d9147f4669eaaba10b20c4dcd93509b73 Mon Sep 17 00:00:00 2001
Message-ID: <f9e44d5d9147f4669eaaba10b20c4dcd93509b73.1757810101.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 13 Sep 2025 17:34:21 -0700
Subject: [PATCH] gettext-h: Avoid -Wtrailing-whitespace in config.h.
* modules/gettext-h (configure.ac): Move the closing bracket and
parentheses of AH_BOTTOM to the preceding line.
---
ChangeLog | 6 ++++++
modules/gettext-h | 3 +--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7a2bd5d592..b818c46a7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-09-13 Collin Funk <[email protected]>
+
+ gettext-h: Avoid -Wtrailing-whitespace in config.h.
+ * modules/gettext-h (configure.ac): Move the closing bracket and
+ parentheses of AH_BOTTOM to the preceding line.
+
2025-09-13 Bruno Haible <[email protected]>
pagealign_alloc: Don't waste large amounts of memory (regr. 2025-09-10).
diff --git a/modules/gettext-h b/modules/gettext-h
index 1820137422..876514e324 100644
--- a/modules/gettext-h
+++ b/modules/gettext-h
@@ -17,8 +17,7 @@ AH_BOTTOM([
different by defining GNULIB_TEXT_DOMAIN in their config.h file. */
#ifndef GNULIB_TEXT_DOMAIN
# define GNULIB_TEXT_DOMAIN/**/"gnulib"
-#endif
-])
+#endif])
Makefile.am:
lib_SOURCES += gettext.h
--
2.51.0