Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: RFA: fix locale configure checks
Date: Tue, 25 Nov 2008 23:12:00 -0000	[thread overview]
Message-ID: <m3myfnu3eu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m363pujdyh.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu\, 21 Aug 2008 14\:44\:06 -0600")

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> Today while exploring the charset code I happened to notice that gdb
Tom> never calls setlocale.

Tom> The code is there, but configure never does the checks that might
Tom> define HAVE_LOCALE_H, HAVE_SETLOCALE, or HAVE_LC_MESSAGES.

Tom> This patch fixes the problem.  I just copied what GCC does here.

I've updated this patch to account for recent changes to configure.ac.

I am re-regtesting it, but I don't anticipate any problems.
Ok if it passes?

Tom

2008-11-25  Tom Tromey  <tromey@redhat.com>

	* config.in, configure: Rebuild.
	* configure.ac: Check for locale.h, setlocale.  Call
	AM_LC_MESSAGES.
	* acinclude.m4: Include lcmessage.m4.

diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 4e8f590..2a951e2 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -26,6 +26,9 @@ sinclude(../config/tcl.m4)
 dnl For dependency tracking macros.
 sinclude([../config/depstand.m4])
 
+dnl For AM_LC_MESSAGES
+sinclude([../config/lcmessage.m4])
+
 #
 # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
 # makes configure think it's cross compiling. If --target wasn't used, then
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 8725aa6..4e0cf7d 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -696,7 +696,7 @@ AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
 		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
 		  sys/types.h sys/wait.h wait.h termios.h termio.h \
-		  sgtty.h unistd.h elf_hp.h ctype.h time.h])
+		  sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h])
 AC_CHECK_HEADERS(link.h, [], [],
 [#if HAVE_SYS_TYPES_H
 # include <sys/types.h>
@@ -740,6 +740,7 @@ AC_CHECK_HEADERS(term.h, [], [],
 
 AC_CHECK_DECLS([free, malloc, realloc, strerror, strstr, getopt,
                 snprintf, vsnprintf])
+AM_LC_MESSAGES
 
 # ----------------------- #
 # Checks for structures.  #
@@ -775,7 +776,7 @@ AC_FUNC_VFORK
 AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid \
                 getgid poll pread64 sbrk setpgid setpgrp setsid \
 		sigaction sigprocmask sigsetmask socketpair syscall \
-		ttrace wborder])
+		ttrace wborder setlocale])
 
 # Check the return and argument types of ptrace.  No canned test for
 # this, so roll our own.


  reply	other threads:[~2008-11-25 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 20:45 Tom Tromey
2008-11-25 23:12 ` Tom Tromey [this message]
2008-11-26  3:04   ` Thiago Jung Bauermann
2008-11-26 10:01     ` Tom Tromey
2008-12-09 11:05   ` Joel Brobecker
2008-12-09 17:20     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3myfnu3eu.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox