bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Usage of "inline" in gettext.h


From: Lasse Collin
Subject: Usage of "inline" in gettext.h
Date: Tue, 7 Aug 2007 14:45:26 +0300
User-agent: KMail/1.9.6

I'm using gettext 0.16.1. There is a comment in gettext.h about usage of 
const:

/* Disabled NLS.
   The casts to 'const char *' serve the purpose of producing warnings
   for invalid uses of the value returned from these functions.
   On pre-ANSI systems without 'const', the config.h file is supposed to
   contain "#define const".  */

So it suggest using AC_C_CONST in configure.ac. That's good. Because 
gettext.h is always copied into the package, there can always be a 
check in the package's build configuration, that checks if const works.

#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static const char *

Is this a left-over from the past, or why the same thing cannot be done 
with the inline keyword (use AC_C_INLINE)? To me, it sounds like a bad 
idea to support inline only with C++ compilers and GCC, since GCC 
probably isn't the only C compiler supporting C99's inline.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode




reply via email to

[Prev in Thread] Current Thread [Next in Thread]