I did:
> 2026-08-26 Bruno Haible <[email protected]>
>
> gettext-h: Get rid of gcc -Wunused-value warnings for textdomain.
> * lib/gettext.h (textdomain): Define as inline function.
This breaks on Solaris:
In file included from ../../../jitter/gnulib-local/argp-help.c:48:
../../../jitter/gnulib-local/gettext.h:213:1: error: conflicting types for
‘textdomain’; have ‘const char *(const char *)’
213 | textdomain (const char *domainname)
| ^~~~~~~~~~
In file included from /usr/include/locale.h:12,
from ./locale.h:41,
from ../../../jitter/gnulib-local/gettext.h:47:
/usr/include/libintl.h:57:14: note: previous declaration of ‘textdomain’ with
type ‘char *(const char *)’
57 | extern char *textdomain(const char *);
| ^~~~~~~~~~
*** Error code 1
This patch should fix it.
2026-08-31 Bruno Haible <[email protected]>
gettext-h: Fix compilation error on Solaris (regression 2026-08-26).
* lib/gettext.h (textdomain): Change return type to 'char *' on Solaris.
diff --git a/lib/gettext.h b/lib/gettext.h
index f201b98227..2f4b1c9d86 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -209,10 +209,18 @@ dcngettext (const char *domain, const char *msgid1, const
char *msgid2, unsigned
(n == 1 ? msgid1 : msgid2);
}
__attribute__ ((_LIBGETTEXT_INLINE))
-extern inline const char *
+extern inline
+# if !defined(__sun)
+const
+# endif
+char *
textdomain (const char *domainname)
{
- return domainname;
+ return
+# ifdef __sun
+ (char *)
+# endif
+ domainname;
}
# if defined __GNUC__ && __GNUC__ >= 9 && !defined __clang__
# pragma GCC diagnostic pop