[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in __GNU_GETTEXT_SUPPORTED_REVISION macro definition in gettext.
From: |
Martin Jacobs |
Subject: |
Re: Bug in __GNU_GETTEXT_SUPPORTED_REVISION macro definition in gettext.m4 |
Date: |
Sun, 17 Jan 2010 22:03:43 +0100 (MET) |
Hi,
thanks for your explanation.
My system is an SuSE 8.1 based system using
glibc-2.2.5
Compiler is gcc-3.4.6.B
Gettext 0.17 is compiled and installed with "my" bugfix. With
that I could compile and install coreutils 7.6, bison 2.4,
...
On Sat, 16 Jan 2010, Bruno Haible wrote:
> Hi,
>
> Martin Jacobs wrote:
> > file m4/gettext.m4 defines
> >
> > #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
> > #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
> > #endif
> > changequote(,)dnl
> > typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
> > changequote([,])dnl
> >
> > This makes test compilation fail on systems that are lacking
> > __GNU_GETTEXT_SUPPORTED_REVISION in libintl.h because test
> > code calls this macro with argument value 0 which is expanded
> > to 0 and makes array declaration fail with negative array
> > dimension.
>
> This is as expected. Systems that don't have __GNU_GETTEXT_SUPPORTED_REVISION
> defined in libintl.h are, for example, Solaris or glibc 2.0 systems. These
> systems support only the first revision of GNU .mo files, namely major = 0,
> minor = 0, and don't support formatstring macros in msgid or msgstr.
>
> > Changing that macro definition to
> >
> > #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 1 : -1)
> >
> > makes configure and compilation happy and work fine.
>
> But then the use of <inttypes.h> formatstring macros in msgid or msgstr
> will not work, i.e. the program will malfunction.
>
> If you have been compiling a program on such a platform, you need to install
> GNU gettext in order to get the support for <inttypes.h> formatstring macros
> in msgid.
GNU gettext 0.17 is installed. How can I verify that support
of <inttypes.h> formatstring macros?
>
> Bruno
>
Martin
--
Dipl-Ing. Martin Jacobs * Windsbach * address@hidden und
address@hidden * ICQ:153921785
Registered Linux User #87175, http://counter.li.org/