This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ENABLE_NLS in libiberty



Merged bits from glibc.  Note that libiberty's configure doesn't
support this, but nor does it support HAVE_LIBINTL_H either.

2001-11-12  Jim Meyering  <meyering@lucent.com>

	* obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
	this code would end up calling gettext even in packages built
	with --disable-nls.
	* getopt.c (_): Likewise.
	* regex.c (_): Likewise.

Index: getopt.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/getopt.c,v
retrieving revision 1.6
diff -p -3 -r1.6 getopt.c
*** getopt.c	2000/12/29 19:37:03	1.6
--- getopt.c	2001/11/13 03:35:49
***************
*** 82,88 ****
  #ifndef _
  /* This is for other GNU distributions with internationalized messages.
     When compiling libc, the _ macro is predefined.  */
! # ifdef HAVE_LIBINTL_H
  #  include <libintl.h>
  #  define _(msgid)	gettext (msgid)
  # else
--- 82,88 ----
  #ifndef _
  /* This is for other GNU distributions with internationalized messages.
     When compiling libc, the _ macro is predefined.  */
! # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
  #  include <libintl.h>
  #  define _(msgid)	gettext (msgid)
  # else
Index: obstack.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/obstack.c,v
retrieving revision 1.4
diff -p -3 -r1.4 obstack.c
*** obstack.c	2000/12/29 19:37:03	1.4
--- obstack.c	2001/11/13 03:36:02
*************** _obstack_memory_used (h)
*** 451,457 ****
  
  /* Define the error handler.  */
  #ifndef _
! # ifdef HAVE_LIBINTL_H
  #  include <libintl.h>
  #  ifndef _
  #   define _(Str) gettext (Str)
--- 451,457 ----
  
  /* Define the error handler.  */
  #ifndef _
! # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
  #  include <libintl.h>
  #  ifndef _
  #   define _(Str) gettext (Str)
Index: regex.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/regex.c,v
retrieving revision 1.5
diff -p -3 -r1.5 regex.c
*** regex.c	2001/08/23 15:19:05	1.5
--- regex.c	2001/11/13 03:36:41
***************
*** 95,101 ****
  # endif
  
  /* This is for other GNU distributions with internationalized messages.  */
! # if HAVE_LIBINTL_H || defined _LIBC
  #  include <libintl.h>
  #  ifdef _LIBC
  #   undef gettext
--- 95,101 ----
  # endif
  
  /* This is for other GNU distributions with internationalized messages.  */
! # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
  #  include <libintl.h>
  #  ifdef _LIBC
  #   undef gettext


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]