gengenrtl needs to link with libintl

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Nov 3 08:35:00 GMT 2001


> > However, I still think there should be a better way to turn
> > internationalization ON and OFF in obstack.c.  Maybe obstack
> > should do something similar to gcc/intl.h.  It defines
> > gettext(msgid) to (msgid) when ENABLE_NLS is undefined.
> 
> If glibc has a suitable patch, please feel free to post it to
> gcc-patches for libiberty too.  I saw a similar patch for regex go by,
> they might already have one for obstack.

I just looked at the current version of obstack.c in glibc.  It uses
`ENABLE_NLS':

/* Define the error handler.  */
# ifndef _
#  if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
#   include <libintl.h>
#   ifndef _
#    define _(Str) gettext (Str)
#   endif
#  else
#   define _(Str) (Str)
#  endif
# endif

Thus, I think we should undefine ENABLE_NLS rather than HAVE_LIBINTL_H
to disable NLS when building generator files.  However, configure for
libiberty needs to be modified to add an `--enable-nls' option.  Similar
patches should be done for getopt.c and regex.c which also may use
NLS.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc-patches mailing list