From: Bruno Haible Date: Sat, 31 May 2025 23:17:42 +0000 (+0200) Subject: Fix compilation error on Solaris 11 (regr. 2025-05-28). X-Git-Tag: v0.26~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1054fd3dac4feadd0f878e9ed0972b85d1bf8a13;p=thirdparty%2Fgettext.git Fix compilation error on Solaris 11 (regr. 2025-05-28). * gnulib-local/lib/gettext.h (gettext, dgettext, dcgettext): On Solaris, use 'char *' as return type. --- diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index 6d3ffa707..e7b1f88b3 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -64,21 +64,32 @@ /* Use inline functions, to avoid warnings warning: format not a string literal and no format arguments that don't occur with enabled NLS. */ +/* The return type 'const char *' serves the purpose of producing warnings + for invalid uses of the value returned from these functions. */ __attribute__ ((__always_inline__, __gnu_inline__)) extern inline -const char * +# if !defined(__sun) +const +# endif +char * gettext (const char *msgid) { return msgid; } __attribute__ ((__always_inline__, __gnu_inline__)) extern inline -const char * +# if !defined(__sun) +const +# endif +char * dgettext (const char *domain, const char *msgid) { (void) domain; return msgid; } __attribute__ ((__always_inline__, __gnu_inline__)) extern inline -const char * +# if !defined(__sun) +const +# endif +char * dcgettext (const char *domain, const char *msgid, int category) { (void) domain;