* gdb_locale.h: New file.
* Makefile.in (GDB_CFLAGS): Define LOCALEDIR. (defs_h): Added gdb_locale.h. * configure, config.in: Rebuilt. * configure.in (PACKAGE): Define. * defs.h: Include gdb_locale.h. * main.c (captured_main): Call setlocale, bindtextdomain,
This commit is contained in:
parent
3558860c61
commit
0fbb3da7b7
8 changed files with 446 additions and 334 deletions
|
@ -1,3 +1,14 @@
|
|||
2002-06-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb_locale.h: New file.
|
||||
* Makefile.in (GDB_CFLAGS): Define LOCALEDIR.
|
||||
(defs_h): Added gdb_locale.h.
|
||||
* configure, config.in: Rebuilt.
|
||||
* configure.in (PACKAGE): Define.
|
||||
* defs.h: Include gdb_locale.h.
|
||||
* main.c (captured_main): Call setlocale, bindtextdomain,
|
||||
textdomain.
|
||||
|
||||
2002-06-21 Dave Brolley <brolley@redhat.com>
|
||||
|
||||
From Stan Shebs, Jim Blandy, Mark Salter, Kevin Buettner:
|
||||
|
|
|
@ -312,7 +312,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
|
|||
# your system doesn't have fcntl.h in /usr/include (which is where it
|
||||
# should be according to Posix).
|
||||
DEFS = @DEFS@
|
||||
GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config $(DEFS)
|
||||
GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS)
|
||||
|
||||
# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
|
||||
# from the config directory.
|
||||
|
@ -619,7 +619,7 @@ completer_h = completer.h
|
|||
cp_abi_h = cp-abi.h
|
||||
dcache_h = dcache.h
|
||||
defs_h = defs.h $(xm_h) $(tm_h) $(nm_h) config.status config.h \
|
||||
gdbarch.h ui-file.h $(INCLUDE_DIR)/gdb/signals.h
|
||||
gdbarch.h ui-file.h $(INCLUDE_DIR)/gdb/signals.h gdb_locale.h
|
||||
doublest_h = doublest.h $(floatformat_h)
|
||||
dwarf2cfi_h = dwarf2cfi.h
|
||||
event_loop_h = event-loop.h
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
|
@ -376,9 +379,15 @@
|
|||
/* Define if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/syscall.h> header file. */
|
||||
#undef HAVE_SYS_SYSCALL_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the <sys/user.h> header file. */
|
||||
#undef HAVE_SYS_USER_H
|
||||
|
||||
|
@ -439,6 +448,9 @@
|
|||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Name of this package. */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define if sigsetjmp is available. */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
|
|
691
gdb/configure
vendored
691
gdb/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -33,10 +33,11 @@ AM_PROG_CC_STDC
|
|||
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
dnl gdb doesn't use gettext, but bfd does. We call this to ensure we
|
||||
dnl link with the correct libraries.
|
||||
dnl Set up for gettext. PACKAGE is used when we call bindtextdomain.
|
||||
ALL_LINGUAS=
|
||||
CY_GNU_GETTEXT
|
||||
AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
|
||||
|
||||
|
||||
dnl List of object files added by configure.
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "gdb_locale.h"
|
||||
|
||||
/* For ``enum target_signal''. */
|
||||
#include "gdb/signals.h"
|
||||
|
||||
|
|
46
gdb/gdb_locale.h
Normal file
46
gdb/gdb_locale.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
/* GDB-friendly replacement for <locale.h>.
|
||||
Copyright 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef GDB_LOCALE_H
|
||||
#define GDB_LOCALE_H
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(String) gettext (String)
|
||||
# ifdef gettext_noop
|
||||
# define N_(String) gettext_noop (String)
|
||||
# else
|
||||
# define N_(String) (String)
|
||||
# endif
|
||||
#else
|
||||
# define gettext(Msgid) (Msgid)
|
||||
# define dgettext(Domainname, Msgid) (Msgid)
|
||||
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
||||
# define textdomain(Domainname) while (0) /* nothing */
|
||||
# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
|
||||
# define _(String) (String)
|
||||
# define N_(String) (String)
|
||||
#endif
|
||||
|
||||
#endif /* GDB_LOCALE_H */
|
|
@ -157,6 +157,15 @@ captured_main (void *data)
|
|||
|
||||
long time_at_startup = get_run_time ();
|
||||
|
||||
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
|
||||
setlocale (LC_MESSAGES, "");
|
||||
#endif
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
setlocale (LC_CTYPE, "");
|
||||
#endif
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
START_PROGRESS (argv[0], 0);
|
||||
|
||||
#ifdef MPW
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue