Karl Berry wrote:
> A user reported (thanks Christian) some gettext-related problems in the
> texinfo 4.6 release, which uses gettext 0.12.1, and I need advice. His
> message is appended.
>
> 1) (Least important.) texinfo's system.h said:
> #ifndef HAVE_LC_MESSAGES
> #define LC_MESSAGES (-1)
> #endif
> I can easily fix the warning by saying
> #if !defined (HAVE_LC_MESSAGES) && !defined (LC_MESSAGES)
> but from looking at the documentation, it seems to me that
> HAVE_LC_MESSAGES is supposed to be obsolete. But lcmessage is still in
> my aclocal. Any particular recommendation? Just remove the whole thing?
The gettext doc says:
On all POSIX conformant systems the locale categories `LC_CTYPE',
`LC_MESSAGES', `LC_COLLATE', `LC_MONETARY', `LC_NUMERIC', and `LC_TIME'
are available. On some systems which are only ISO C compliant,
`LC_MESSAGES' is missing, but a substitute for it is defined in GNU
gettext's `<libintl.h>'.
This means that you don't need to define a substitute for LC_MESSAGES
any more. Just include <locale.h> and <libintl.h>.
The stuff in aclocal.m4 is still needed by AM_GNU_GETTEXT, of course.
> 2) as for conflicting setlocale declarations, it seems locale.h is
> getting included twice, once from libintl.h and once from system.h.
> It's just a guess, but maybe the const declarations are different.
> Christian, you can probably work around it by removing one #include
> or the other. The real fix will hopefully come when I ansify the
> texinfo sources. Gettext folks, if you have any thoughts along these
> lines ...
Including the same file twice should always be ok. Be careful to include
<config.h> (which is the one which defines 'const') _before_ any system
include files.