aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-09-20 00:24:01 +0000
committerKevin Buettner <kevinb@redhat.com>2002-09-20 00:24:01 +0000
commit234b45d446cc127c7cbb5bfb39151b86795ffe3d (patch)
tree6a83f0d391193971249cf36509e216aae3e86a91 /gdb
parentbb7eb0390bd1fe1972169391683eeb79cbd986fd (diff)
downloadgdb-234b45d446cc127c7cbb5bfb39151b86795ffe3d.zip
gdb-234b45d446cc127c7cbb5bfb39151b86795ffe3d.tar.gz
gdb-234b45d446cc127c7cbb5bfb39151b86795ffe3d.tar.bz2
Add support for distinct host and target character sets.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog31
-rw-r--r--gdb/Makefile.in13
-rw-r--r--gdb/acinclude.m468
-rw-r--r--gdb/aclocal.m468
-rw-r--r--gdb/c-exp.y26
-rw-r--r--gdb/c-lang.c62
-rw-r--r--gdb/charset.c1274
-rw-r--r--gdb/charset.h120
-rwxr-xr-xgdb/configure985
-rw-r--r--gdb/configure.in12
-rw-r--r--gdb/utils.c89
11 files changed, 2264 insertions, 484 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f3cd1c4..c4872a5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,34 @@
+2002-09-19 Jim Blandy <jimb@redhat.com>
+
+ Add support for distinct host and target character sets.
+ * charset.c, charset.h: New files.
+ * c-exp.y: #include "charset.h".
+ (yylex): Convert character and string literals to the target
+ character set, before returning them as the semantic value of the
+ token.
+ * c-lang.c: #include "charset.h".
+ (c_emit_char): Use charset-specific methods to recognize
+ characters with backslash escape forms, to decide which characters
+ to print literally and which to print using numeric escape
+ sequences, and to convert target characters to host characters
+ before printing.
+ * utils.c: #include "charset.h".
+ (no_control_char_error): New function.
+ (parse_escape): Use charset-specific methods to recognize
+ backslash escapes, parse `control character' notation, and convert
+ characters from the host character set to the target character set.
+ * configure.in: Set the default host character set.
+ Check where to find iconv, and what its argument types might be.
+ * acinclude.m4 (AM_ICONV): New macro, borrowed from GCC.
+ * Makefile.in (SFILES): List charset.c.
+ (COMMON_OBS): List charset.o.
+ (charset.o): New rule.
+ (charset_h): New header dependency variable.
+ (c-lang.o, utils.o, c-exp.tab.o): Note dependency on $(charset_h).
+ (LIBICONV): New variable, set by configure.
+ (CLIBS): Include $(LIBICONV) here.
+ * aclocal.m4, config.in, configure: Regenerated.
+
2002-09-19 Joel Brobecker <brobecker@gnat.com>
* ada-exp.y: Add missing semicolons to end rules. Fixes a
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index cd84280..ce88570 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -138,6 +138,9 @@ INTL_DEPS = @INTLDEPS@
INTL_SRC = $(srcdir)/$(INTL_DIR)
INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
+# Where is the ICONV library? This can be empty if libc has iconv.
+LIBICONV = @LIBICONV@
+
#
# CLI sub directory definitons
#
@@ -369,6 +372,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
-lmmalloc -lintl -liberty
CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \
$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ $(LIBICONV) \
$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
$(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
@@ -526,6 +530,7 @@ TARGET_FLAGS_TO_PASS = \
SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
+ charset.c \
buildsym.c c-exp.y c-lang.c c-typeprint.c c-valprint.c \
coffread.c \
complaints.c completer.c corefile.c cp-valprint.c dbxread.c \
@@ -767,6 +772,8 @@ tuiSourceWin_h = $(srcdir)/tui/tuiSourceWin.h
tuiStack_h = $(srcdir)/tui/tuiStack.h
tuiWin_h = $(srcdir)/tui/tuiWin.h
+charset_h = charset.h
+
# Header files that need to have srcdir added. Note that in the cases
# where we use a macro like $(gdbcmd_h), things are carefully arranged
# so that each .h file is listed exactly once (M-x tags-search works
@@ -818,6 +825,7 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
+ charset.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o linespec.o infcmd.o infrun.o \
expprint.o environ.o stack.o thread.o \
@@ -1439,6 +1447,7 @@ z8k-tdep.o: $(srcdir)/z8k-tdep.c
c-exp.tab.o: c-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
$(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) \
+ $(charset_h) \
$(symfile_h) $(objfiles_h)
jv-exp.tab.o: jv-exp.tab.c jv-lang.h $(defs_h) $(expression_h) \
@@ -2578,4 +2587,8 @@ xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/xdr_rdb.h
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c
+charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) gdb_assert.h
+
+c-lang.o: $(charset_h)
+utils.o: $(charset_h)
### end of the gdb Makefile.in.
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 12f4c48..8aa4602 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -976,3 +976,71 @@ case "x$am_cv_prog_cc_stdc" in
*) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ AC_ARG_WITH([libiconv-prefix],
+[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
+ for dir in `echo "$withval" | tr : ' '`; do
+ if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+ if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+ done
+ ])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+ LIBICONV=
+ if test "$am_cv_lib_iconv" = yes; then
+ LIBICONV="-liconv"
+ fi
+ AC_SUBST(LIBICONV)
+])
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 5b9d643..8701621 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -879,6 +879,74 @@ ifelse(yes,no,[
AC_DEFUN([CY_GNU_GETTEXT],)
])
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ AC_ARG_WITH([libiconv-prefix],
+[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
+ for dir in `echo "$withval" | tr : ' '`; do
+ if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+ if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+ done
+ ])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+ LIBICONV=
+ if test "$am_cv_lib_iconv" = yes; then
+ LIBICONV="-liconv"
+ fi
+ AC_SUBST(LIBICONV)
+])
+
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index c6fc52c..376f6d5 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -49,6 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h" /* Required by objfiles.h. */
#include "symfile.h" /* Required by objfiles.h. */
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
+#include "charset.h"
/* Flag indicating we're dealing with HP-compiled objects */
extern int hp_som_som_object_present;
@@ -1314,6 +1315,15 @@ yylex ()
c = parse_escape (&lexptr);
else if (c == '\'')
error ("Empty character constant.");
+ else if (! host_char_to_target (c, &c))
+ {
+ int toklen = lexptr - tokstart + 1;
+ char *tok = alloca (toklen + 1);
+ memcpy (tok, tokstart, toklen);
+ tok[toklen] = '\0';
+ error ("There is no character corresponding to %s in the target "
+ "character set `%s'.", tok, target_charset ());
+ }
yylval.typed_val_int.val = c;
yylval.typed_val_int.type = builtin_type_char;
@@ -1464,6 +1474,8 @@ yylex ()
tempbufindex = 0;
do {
+ char *char_start_pos = tokptr;
+
/* Grow the static temp buffer if necessary, including allocating
the first one on demand. */
if (tempbufindex + 1 >= tempbufsize)
@@ -1486,7 +1498,19 @@ yylex ()
tempbuf[tempbufindex++] = c;
break;
default:
- tempbuf[tempbufindex++] = *tokptr++;
+ c = *tokptr++;
+ if (! host_char_to_target (c, &c))
+ {
+ int len = tokptr - char_start_pos;
+ char *copy = alloca (len + 1);
+ memcpy (copy, char_start_pos, len);
+ copy[len] = '\0';
+
+ error ("There is no character corresponding to `%s' "
+ "in the target character set `%s'.",
+ copy, target_charset ());
+ }
+ tempbuf[tempbufindex++] = c;
break;
}
} while ((*tokptr != '"') && (*tokptr != '\0'));
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 9c30483..6bbd6d9 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -29,6 +29,7 @@
#include "valprint.h"
#include "macroscope.h"
#include "gdb_assert.h"
+#include "charset.h"
extern void _initialize_c_language (void);
static void c_emit_char (int c, struct ui_file * stream, int quoter);
@@ -40,55 +41,30 @@ static void c_emit_char (int c, struct ui_file * stream, int quoter);
static void
c_emit_char (register int c, struct ui_file *stream, int quoter)
{
+ const char *escape;
+ int host_char;
+
c &= 0xFF; /* Avoid sign bit follies */
- if (PRINT_LITERAL_FORM (c))
+ escape = c_target_char_has_backslash_escape (c);
+ if (escape)
{
- if (c == '\\' || c == quoter)
- {
- fputs_filtered ("\\", stream);
- }
- fprintf_filtered (stream, "%c", c);
+ if (quoter == '"' && strcmp (escape, "0") == 0)
+ /* Print nulls embedded in double quoted strings as \000 to
+ prevent ambiguity. */
+ fprintf_filtered (stream, "\\000");
+ else
+ fprintf_filtered (stream, "\\%s", escape);
}
- else
+ else if (target_char_to_host (c, &host_char)
+ && host_char_print_literally (host_char))
{
- switch (c)
- {
- case '\n':
- fputs_filtered ("\\n", stream);
- break;
- case '\b':
- fputs_filtered ("\\b", stream);
- break;
- case '\t':
- fputs_filtered ("\\t", stream);
- break;
- case '\f':
- fputs_filtered ("\\f", stream);
- break;
- case '\r':
- fputs_filtered ("\\r", stream);
- break;
- case '\013':
- fputs_filtered ("\\v", stream);
- break;
- case '\033':
- fputs_filtered ("\\e", stream);
- break;
- case '\007':
- fputs_filtered ("\\a", stream);
- break;
- case '\0':
- if (quoter == '\'')
- fputs_filtered ("\\0", stream);
- else
- fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
- break;
- default:
- fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
- break;
- }
+ if (host_char == '\\' || host_char == quoter)
+ fputs_filtered ("\\", stream);
+ fprintf_filtered (stream, "%c", host_char);
}
+ else
+ fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
}
void
diff --git a/gdb/charset.c b/gdb/charset.c
new file mode 100644
index 0000000..00e1065
--- /dev/null
+++ b/gdb/charset.c
@@ -0,0 +1,1274 @@
+/* Character set conversion support for GDB.
+ Copyright 2001 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. */
+
+#include "defs.h"
+#include "charset.h"
+#include "gdbcmd.h"
+#include "gdb_assert.h"
+
+#include <stddef.h>
+#include <string.h>
+#include <ctype.h>
+
+#ifdef HAVE_ICONV
+#include <iconv.h>
+#endif
+
+
+/* How GDB's character set support works
+
+ GDB has two global settings:
+
+ - The `current host character set' is the character set GDB should
+ use in talking to the user, and which (hopefully) the user's
+ terminal knows how to display properly.
+
+ - The `current target character set' is the character set the
+ program being debugged uses.
+
+ There are commands to set each of these, and mechanisms for
+ choosing reasonable default values. GDB has a global list of
+ character sets that it can use as its host or target character
+ sets.
+
+ The header file `charset.h' declares various functions that
+ different pieces of GDB need to perform tasks like:
+
+ - printing target strings and characters to the user's terminal
+ (mostly target->host conversions),
+
+ - building target-appropriate representations of strings and
+ characters the user enters in expressions (mostly host->target
+ conversions),
+
+ and so on.
+
+ Now, many of these operations are specific to a particular
+ host/target character set pair. If GDB supports N character sets,
+ there are N^2 possible pairs. This means that, the larger GDB's
+ repertoire of character sets gets, the more expensive it gets to add
+ new character sets.
+
+ To make sure that GDB can do the right thing for every possible
+ pairing of host and target character set, while still allowing
+ GDB's repertoire to scale, we use a two-tiered approach:
+
+ - We maintain a global table of "translations" --- groups of
+ functions specific to a particular pair of character sets.
+
+ - However, a translation can be incomplete: some functions can be
+ omitted. Where there is not a translation to specify exactly
+ what function to use, we provide reasonable defaults. The
+ default behaviors try to use the "iconv" library functions, which
+ support a wide range of character sets. However, even if iconv
+ is not available, there are fallbacks to support trivial
+ translations: when the host and target character sets are the
+ same. */
+
+
+/* The character set and translation structures. */
+
+
+/* A character set GDB knows about. GDB only supports character sets
+ with stateless encodings, in which every character is one byte
+ long. */
+struct charset {
+
+ /* A singly-linked list of all known charsets. */
+ struct charset *next;
+
+ /* The name of the character set. Comparisons on character set
+ names are case-insensitive. */
+ const char *name;
+
+ /* Non-zero iff this character set can be used as a host character
+ set. At present, GDB basically assumes that the host character
+ set is a superset of ASCII. */
+ int valid_host_charset;
+
+ /* Pointers to charset-specific functions that depend only on a
+ single character set, and data pointers to pass to them. */
+ int (*host_char_print_literally) (void *baton,
+ int host_char);
+ void *host_char_print_literally_baton;
+
+ int (*target_char_to_control_char) (void *baton,
+ int target_char,
+ int *target_ctrl_char);
+ void *target_char_to_control_char_baton;
+};
+
+
+/* A translation from one character set to another. */
+struct translation {
+
+ /* A singly-linked list of all known translations. */
+ struct translation *next;
+
+ /* This structure describes functions going from the FROM character
+ set to the TO character set. Comparisons on character set names
+ are case-insensitive. */
+ const char *from, *to;
+
+ /* Pointers to translation-specific functions, and data pointers to
+ pass to them. These pointers can be zero, indicating that GDB
+ should fall back on the default behavior. We hope the default
+ behavior will be correct for many from/to pairs, reducing the
+ number of translations that need to be registered explicitly. */
+
+ /* TARGET_CHAR is in the `from' charset.
+ Returns a string in the `to' charset. */
+ const char *(*c_target_char_has_backslash_escape) (void *baton,
+ int target_char);
+ void *c_target_char_has_backslash_escape_baton;
+
+ /* HOST_CHAR is in the `from' charset.
+ TARGET_CHAR points to a char in the `to' charset. */
+ int (*c_parse_backslash) (void *baton, int host_char, int *target_char);
+ void *c_parse_backslash_baton;
+
+ /* This is used for the host_char_to_target and target_char_to_host
+ functions. */
+ int (*convert_char) (void *baton, int from, int *to);
+ void *convert_char_baton;
+};
+
+
+
+/* The global lists of character sets and translations. */
+
+
+/* Character set names are always compared ignoring case. */
+static int
+strcmp_case_insensitive (const char *p, const char *q)
+{
+ while (*p && *q && tolower (*p) == tolower (*q))
+ p++, q++;
+
+ return tolower (*p) - tolower (*q);
+}
+
+
+/* The global list of all the charsets GDB knows about. */
+static struct charset *all_charsets;
+
+
+static void
+register_charset (struct charset *cs)
+{
+ struct charset **ptr;
+
+ /* Put the new charset on the end, so that the list ends up in the
+ same order as the registrations in the _initialize function. */
+ for (ptr = &all_charsets; *ptr; ptr = &(*ptr)->next)
+ ;
+
+ cs->next = 0;
+ *ptr = cs;
+}
+
+
+static struct charset *
+lookup_charset (const char *name)
+{
+ struct charset *cs;
+
+ for (cs = all_charsets; cs; cs = cs->next)
+ if (! strcmp_case_insensitive (name, cs->name))
+ return cs;
+
+ return NULL;
+}
+
+
+/* The global list of translations. */
+static struct translation *all_translations;
+
+
+static void
+register_translation (struct translation *t)
+{
+ t->next = all_translations;
+ all_translations = t;
+}
+
+
+static struct translation *
+lookup_translation (const char *from, const char *to)
+{
+ struct translation *t;
+
+ for (t = all_translations; t; t = t->next)
+ if (! strcmp_case_insensitive (from, t->from)
+ && ! strcmp_case_insensitive (to, t->to))
+ return t;
+
+ return 0;
+}
+
+
+
+/* Constructing charsets. */
+
+/* Allocate, initialize and return a straightforward charset.
+ Use this function, rather than creating the structures yourself,
+ so that we can add new fields to the structure in the future without
+ having to tweak all the old charset descriptions. */
+static struct charset *
+simple_charset (const char *name,
+ int valid_host_charset,
+ int (*host_char_print_literally) (void *baton, int host_char),
+ void *host_char_print_literally_baton,
+ int (*target_char_to_control_char) (void *baton,
+ int target_char,
+ int *target_ctrl_char),
+ void *target_char_to_control_char_baton)
+{
+ struct charset *cs = xmalloc (sizeof (*cs));
+
+ memset (cs, 0, sizeof (*cs));
+ cs->name = name;
+ cs->valid_host_charset = valid_host_charset;
+ cs->host_char_print_literally = host_char_print_literally;
+ cs->host_char_print_literally_baton = host_char_print_literally_baton;
+ cs->target_char_to_control_char = target_char_to_control_char;
+ cs->target_char_to_control_char_baton = target_char_to_control_char_baton;
+
+ return cs;
+}
+
+
+
+/* ASCII functions. */
+
+static int
+ascii_print_literally (void *baton, int c)
+{
+ c &= 0xff;
+
+ return (0x20 <= c && c <= 0x7e);
+}
+
+
+static int
+ascii_to_control (void *baton, int c, int *ctrl_char)
+{
+ *ctrl_char = (c & 037);
+ return 1;
+}
+
+
+/* ISO-8859 family functions. */
+
+
+static int
+iso_8859_print_literally (void *baton, int c)
+{
+ c &= 0xff;
+
+ return ((0x20 <= c && c <= 0x7e) /* ascii printables */
+ || (! sevenbit_strings && 0xA0 <= c)); /* iso 8859 printables */
+}
+
+
+static int
+iso_8859_to_control (void *baton, int c, int *ctrl_char)
+{
+ *ctrl_char = (c & 0200) | (c & 037);
+ return 1;
+}
+
+
+/* Construct an ISO-8859-like character set. */
+static struct charset *
+iso_8859_family_charset (const char *name)
+{
+ return simple_charset (name, 1,
+ iso_8859_print_literally, 0,
+ iso_8859_to_control, 0);
+}
+
+
+
+/* EBCDIC family functions. */
+
+
+static int
+ebcdic_print_literally (void *baton, int c)
+{
+ c &= 0xff;
+
+ return (64 <= c && c <= 254);
+}
+
+
+static int
+ebcdic_to_control (void *baton, int c, int *ctrl_char)
+{
+ /* There are no control character equivalents in EBCDIC. Use
+ numeric escapes. */
+ return 0;
+}
+
+
+/* Construct an EBCDIC-like character set. */
+static struct charset *
+ebcdic_family_charset (const char *name)
+{
+ return simple_charset (name, 0,
+ ebcdic_print_literally, 0,
+ ebcdic_to_control, 0);
+}
+
+
+
+
+
+/* Fallback functions using iconv. */
+
+#if defined(HAVE_ICONV)
+
+struct cached_iconv {
+ struct charset *from, *to;
+ iconv_t i;
+};
+
+
+/* Make sure the iconv cache *CI contains an iconv descriptor
+ translating from FROM to TO. If it already does, fine; otherwise,
+ close any existing descriptor, and open up a new one. On success,
+ return zero; on failure, return -1 and set errno. */
+static int
+check_iconv_cache (struct cached_iconv *ci,
+ struct charset *from,
+ struct charset *to)
+{
+ iconv_t i;
+
+ /* Does the cached iconv descriptor match the conversion we're trying
+ to do now? */
+ if (ci->from == from
+ && ci->to == to
+ && ci->i != (iconv_t) 0)
+ return 0;
+
+ /* It doesn't. If we actually had any iconv descriptor open at
+ all, close it now. */
+ if (ci->i != (iconv_t) 0)
+ {
+ i = ci->i;
+ ci->i = (iconv_t) 0;
+
+ if (iconv_close (i) == -1)
+ error ("Error closing `iconv' descriptor for "
+ "`%s'-to-`%s' character conversion: %s",
+ ci->from->name, ci->to->name, safe_strerror (errno));
+ }
+
+ /* Open a new iconv descriptor for the required conversion. */
+ i = iconv_open (to->name, from->name);
+ if (i == (iconv_t) -1)
+ return -1;
+
+ ci->i = i;
+ ci->from = from;
+ ci->to = to;
+
+ return 0;
+}
+
+
+/* Convert FROM_CHAR using the cached iconv conversion *CI. Return
+ non-zero if the conversion was successful, zero otherwise. */
+static int
+cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
+{
+ char from;
+ ICONV_CONST char *from_ptr = &from;
+ char to, *to_ptr = &to;
+ size_t from_left = sizeof (from), to_left = sizeof (to);
+
+ gdb_assert (ci->i != (iconv_t) 0);
+
+ from = from_char;
+ if (iconv (ci->i, &from_ptr, &from_left, &to_ptr, &to_left)
+ == (size_t) -1)
+ {
+ /* These all suggest that the input or output character sets
+ have multi-byte encodings of some characters, which means
+ it's unsuitable for use as a GDB character set. We should
+ never have selected it. */
+ gdb_assert (errno != E2BIG && errno != EINVAL);
+
+ /* This suggests a bug in the code managing *CI. */
+ gdb_assert (errno != EBADF);
+
+ /* This seems to mean that there is no equivalent character in
+ the `to' character set. */
+ if (errno == EILSEQ)
+ return 0;
+
+ /* Anything else is mysterious. */
+ internal_error ("Error converting character `%d' from `%s' to `%s' "
+ "character set: %s",
+ from_char, ci->from->name, ci->to->name,
+ safe_strerror (errno));
+ }
+
+ /* If the pointers weren't advanced across the input, that also
+ suggests something was wrong. */
+ gdb_assert (from_left == 0 && to_left == 0);
+
+ *to_char = (unsigned char) to;
+ return 1;
+}
+
+
+static void
+register_iconv_charsets ()
+{
+ /* Here we should check whether various character sets were
+ recognized by the local iconv implementation.
+
+ The first implementation registered a bunch of character sets
+ recognized by iconv, but then we discovered that iconv on Solaris
+ and iconv on GNU/Linux had no character sets in common. So we
+ replaced them with the hard-coded tables that appear later in the
+ file. */
+}
+
+#endif /* defined (HAVE_ICONV) */
+
+
+/* Fallback routines for systems without iconv. */
+
+#if ! defined (HAVE_ICONV)
+struct cached_iconv { char nothing; };
+
+static int
+check_iconv_cache (struct cached_iconv *ci,
+ struct charset *from,
+ struct charset *to)
+{
+ errno = EINVAL;
+ return -1;
+}
+
+static int
+cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
+{
+ /* This function should never be called. */
+ gdb_assert (0);
+}
+
+static void
+register_iconv_charsets ()
+{
+}
+
+#endif /* ! defined(HAVE_ICONV) */
+
+
+/* Default trivial conversion functions. */
+
+static int
+identity_either_char_to_other (void *baton, int either_char, int *other_char)
+{
+ *other_char = either_char;
+ return 1;
+}
+
+
+
+/* Default non-trivial conversion functions. */
+
+
+static char backslashable[] = "abefnrtv";
+static char *backslashed[] = {"a", "b", "e", "f", "n", "r", "t", "v", "0"};
+static char represented[] = "\a\b\e\f\n\r\t\v";
+
+
+/* Translate TARGET_CHAR into the host character set, and see if it
+ matches any of our standard escape sequences. */
+static const char *
+default_c_target_char_has_backslash_escape (void *baton, int target_char)
+{
+ int host_char;
+ const char *ix;
+
+ /* If target_char has no equivalent in the host character set,
+ assume it doesn't have a backslashed form. */
+ if (! target_char_to_host (target_char, &host_char))
+ return NULL;
+
+ ix = strchr (represented, host_char);
+ if (ix)
+ return backslashed[ix - represented];
+ else
+ return NULL;
+}
+
+
+/* Translate the backslash the way we would in the host character set,
+ and then try to translate that into the target character set. */
+static int
+default_c_parse_backslash (void *baton, int host_char, int *target_char)
+{
+ const char *ix;
+
+ ix = strchr (backslashable, host_char);
+
+ if (! ix)
+ return 0;
+ else
+ return host_char_to_target (represented[ix - backslashable],
+ target_char);
+}
+
+
+/* Convert using a cached iconv descriptor. */
+static int
+iconv_convert (void *baton, int from_char, int *to_char)
+{
+ struct cached_iconv *ci = baton;
+ return cached_iconv_convert (ci, from_char, to_char);
+}
+
+
+
+/* Conversion tables. */
+
+
+/* I'd much rather fall back on iconv whenever possible. But the
+ character set names you use with iconv aren't standardized at all,
+ a lot of platforms have really meager character set coverage, etc.
+ I wanted to have at least something we could use to exercise the
+ test suite on all platforms.
+
+ In the long run, we should have a configure-time process explore
+ somehow which character sets the host platform supports, and some
+ arrangement that allows GDB users to use platform-indepedent names
+ for character sets. */
+
+
+/* We generated these tables using iconv on a GNU/Linux machine. */
+
+
+static int ascii_to_iso_8859_1_table[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 32 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 48 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 64 */
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 80 */
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 96 */
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, /* 112 */
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, /* 128 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 208 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 224 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 240 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int ascii_to_ebcdic_us_table[] = {
+ 0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31, /* 32 */
+ 64, 90,127,123, 91,108, 80,125, 77, 93, 92, 78,107, 96, 75, 97, /* 48 */
+ 240,241,242,243,244,245,246,247,248,249,122, 94, 76,126,110,111, /* 64 */
+ 124,193,194,195,196,197,198,199,200,201,209,210,211,212,213,214, /* 80 */
+ 215,216,217,226,227,228,229,230,231,232,233, -1,224, -1, -1,109, /* 96 */
+ 121,129,130,131,132,133,134,135,136,137,145,146,147,148,149,150, /* 112 */
+ 151,152,153,162,163,164,165,166,167,168,169,192, 79,208,161, 7, /* 128 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 208 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 224 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 240 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int ascii_to_ibm1047_table[] = {
+ 0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31, /* 32 */
+ 64, 90,127,123, 91,108, 80,125, 77, 93, 92, 78,107, 96, 75, 97, /* 48 */
+ 240,241,242,243,244,245,246,247,248,249,122, 94, 76,126,110,111, /* 64 */
+ 124,193,194,195,196,197,198,199,200,201,209,210,211,212,213,214, /* 80 */
+ 215,216,217,226,227,228,229,230,231,232,233,173,224,189, 95,109, /* 96 */
+ 121,129,130,131,132,133,134,135,136,137,145,146,147,148,149,150, /* 112 */
+ 151,152,153,162,163,164,165,166,167,168,169,192, 79,208,161, 7, /* 128 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 208 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 224 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 240 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int iso_8859_1_to_ascii_table[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 32 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 48 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 64 */
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 80 */
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 96 */
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, /* 112 */
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, /* 128 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 208 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 224 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 240 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int iso_8859_1_to_ebcdic_us_table[] = {
+ 0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31, /* 32 */
+ 64, 90,127,123, 91,108, 80,125, 77, 93, 92, 78,107, 96, 75, 97, /* 48 */
+ 240,241,242,243,244,245,246,247,248,249,122, 94, 76,126,110,111, /* 64 */
+ 124,193,194,195,196,197,198,199,200,201,209,210,211,212,213,214, /* 80 */
+ 215,216,217,226,227,228,229,230,231,232,233, -1,224, -1, -1,109, /* 96 */
+ 121,129,130,131,132,133,134,135,136,137,145,146,147,148,149,150, /* 112 */
+ 151,152,153,162,163,164,165,166,167,168,169,192, 79,208,161, 7, /* 128 */
+ 32, 33, 34, 35, 36, 21, 6, 23, 40, 41, 42, 43, 44, 9, 10, 27, /* 144 */
+ 48, 49, 26, 51, 52, 53, 54, 8, 56, 57, 58, 59, 4, 20, 62,255, /* 160 */
+ -1, -1, 74, -1, -1, -1,106, -1, -1, -1, -1, -1, 95, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 208 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 224 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 240 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int iso_8859_1_to_ibm1047_table[] = {
+ 0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31, /* 32 */
+ 64, 90,127,123, 91,108, 80,125, 77, 93, 92, 78,107, 96, 75, 97, /* 48 */
+ 240,241,242,243,244,245,246,247,248,249,122, 94, 76,126,110,111, /* 64 */
+ 124,193,194,195,196,197,198,199,200,201,209,210,211,212,213,214, /* 80 */
+ 215,216,217,226,227,228,229,230,231,232,233,173,224,189, 95,109, /* 96 */
+ 121,129,130,131,132,133,134,135,136,137,145,146,147,148,149,150, /* 112 */
+ 151,152,153,162,163,164,165,166,167,168,169,192, 79,208,161, 7, /* 128 */
+ 32, 33, 34, 35, 36, 21, 6, 23, 40, 41, 42, 43, 44, 9, 10, 27, /* 144 */
+ 48, 49, 26, 51, 52, 53, 54, 8, 56, 57, 58, 59, 4, 20, 62,255, /* 160 */
+ 65,170, 74,177,159,178,106,181,187,180,154,138,176,202,175,188, /* 176 */
+ 144,143,234,250,190,160,182,179,157,218,155,139,183,184,185,171, /* 192 */
+ 100,101, 98,102, 99,103,158,104,116,113,114,115,120,117,118,119, /* 208 */
+ 172,105,237,238,235,239,236,191,128,253,254,251,252,186,174, 89, /* 224 */
+ 68, 69, 66, 70, 67, 71,156, 72, 84, 81, 82, 83, 88, 85, 86, 87, /* 240 */
+ 140, 73,205,206,203,207,204,225,112,221,222,219,220,141,142,223 /* 256 */
+};
+
+
+static int ebcdic_us_to_ascii_table[] = {
+ 0, 1, 2, 3, -1, 9, -1,127, -1, -1, -1, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, -1, -1, 8, -1, 24, 25, -1, -1, 28, 29, 30, 31, /* 32 */
+ -1, -1, -1, -1, -1, 10, 23, 27, -1, -1, -1, -1, -1, 5, 6, 7, /* 48 */
+ -1, -1, 22, -1, -1, -1, -1, 4, -1, -1, -1, -1, 20, 21, -1, 26, /* 64 */
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 46, 60, 40, 43,124, /* 80 */
+ 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 36, 42, 41, 59, -1, /* 96 */
+ 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 37, 95, 62, 63, /* 112 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 58, 35, 64, 39, 61, 34, /* 128 */
+ -1, 97, 98, 99,100,101,102,103,104,105, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1,106,107,108,109,110,111,112,113,114, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1,126,115,116,117,118,119,120,121,122, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, /* 208 */
+ 125, 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, /* 224 */
+ 92, -1, 83, 84, 85, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, -1, /* 240 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int ebcdic_us_to_iso_8859_1_table[] = {
+ 0, 1, 2, 3,156, 9,134,127,151,141,142, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19,157,133, 8,135, 24, 25,146,143, 28, 29, 30, 31, /* 32 */
+ 128,129,130,131,132, 10, 23, 27,136,137,138,139,140, 5, 6, 7, /* 48 */
+ 144,145, 22,147,148,149,150, 4,152,153,154,155, 20, 21,158, 26, /* 64 */
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,162, 46, 60, 40, 43,124, /* 80 */
+ 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 36, 42, 41, 59,172, /* 96 */
+ 45, 47, -1, -1, -1, -1, -1, -1, -1, -1,166, 44, 37, 95, 62, 63, /* 112 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 58, 35, 64, 39, 61, 34, /* 128 */
+ -1, 97, 98, 99,100,101,102,103,104,105, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1,106,107,108,109,110,111,112,113,114, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1,126,115,116,117,118,119,120,121,122, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, /* 208 */
+ 125, 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, /* 224 */
+ 92, -1, 83, 84, 85, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, -1, /* 240 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1,159 /* 256 */
+};
+
+
+static int ebcdic_us_to_ibm1047_table[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 32 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 48 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 64 */
+ 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, 75, 76, 77, 78, 79, /* 80 */
+ 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, 91, 92, 93, 94,176, /* 96 */
+ 96, 97, -1, -1, -1, -1, -1, -1, -1, -1,106,107,108,109,110,111, /* 112 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,121,122,123,124,125,126,127, /* 128 */
+ -1,129,130,131,132,133,134,135,136,137, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1,145,146,147,148,149,150,151,152,153, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1,161,162,163,164,165,166,167,168,169, -1, -1, -1, -1, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ 192,193,194,195,196,197,198,199,200,201, -1, -1, -1, -1, -1, -1, /* 208 */
+ 208,209,210,211,212,213,214,215,216,217, -1, -1, -1, -1, -1, -1, /* 224 */
+ 224, -1,226,227,228,229,230,231,232,233, -1, -1, -1, -1, -1, -1, /* 240 */
+ 240,241,242,243,244,245,246,247,248,249, -1, -1, -1, -1, -1,255 /* 256 */
+};
+
+
+static int ibm1047_to_ascii_table[] = {
+ 0, 1, 2, 3, -1, 9, -1,127, -1, -1, -1, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, -1, -1, 8, -1, 24, 25, -1, -1, 28, 29, 30, 31, /* 32 */
+ -1, -1, -1, -1, -1, 10, 23, 27, -1, -1, -1, -1, -1, 5, 6, 7, /* 48 */
+ -1, -1, 22, -1, -1, -1, -1, 4, -1, -1, -1, -1, 20, 21, -1, 26, /* 64 */
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 46, 60, 40, 43,124, /* 80 */
+ 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 36, 42, 41, 59, 94, /* 96 */
+ 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 37, 95, 62, 63, /* 112 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 96, 58, 35, 64, 39, 61, 34, /* 128 */
+ -1, 97, 98, 99,100,101,102,103,104,105, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1,106,107,108,109,110,111,112,113,114, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1,126,115,116,117,118,119,120,121,122, -1, -1, -1, 91, -1, -1, /* 176 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, /* 192 */
+ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, /* 208 */
+ 125, 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, /* 224 */
+ 92, -1, 83, 84, 85, 86, 87, 88, 89, 90, -1, -1, -1, -1, -1, -1, /* 240 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1 /* 256 */
+};
+
+
+static int ibm1047_to_iso_8859_1_table[] = {
+ 0, 1, 2, 3,156, 9,134,127,151,141,142, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19,157,133, 8,135, 24, 25,146,143, 28, 29, 30, 31, /* 32 */
+ 128,129,130,131,132, 10, 23, 27,136,137,138,139,140, 5, 6, 7, /* 48 */
+ 144,145, 22,147,148,149,150, 4,152,153,154,155, 20, 21,158, 26, /* 64 */
+ 32,160,226,228,224,225,227,229,231,241,162, 46, 60, 40, 43,124, /* 80 */
+ 38,233,234,235,232,237,238,239,236,223, 33, 36, 42, 41, 59, 94, /* 96 */
+ 45, 47,194,196,192,193,195,197,199,209,166, 44, 37, 95, 62, 63, /* 112 */
+ 248,201,202,203,200,205,206,207,204, 96, 58, 35, 64, 39, 61, 34, /* 128 */
+ 216, 97, 98, 99,100,101,102,103,104,105,171,187,240,253,254,177, /* 144 */
+ 176,106,107,108,109,110,111,112,113,114,170,186,230,184,198,164, /* 160 */
+ 181,126,115,116,117,118,119,120,121,122,161,191,208, 91,222,174, /* 176 */
+ 172,163,165,183,169,167,182,188,189,190,221,168,175, 93,180,215, /* 192 */
+ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73,173,244,246,242,243,245, /* 208 */
+ 125, 74, 75, 76, 77, 78, 79, 80, 81, 82,185,251,252,249,250,255, /* 224 */
+ 92,247, 83, 84, 85, 86, 87, 88, 89, 90,178,212,214,210,211,213, /* 240 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,179,219,220,217,218,159 /* 256 */
+};
+
+
+static int ibm1047_to_ebcdic_us_table[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 16 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 32 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 48 */
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 64 */
+ 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, 75, 76, 77, 78, 79, /* 80 */
+ 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, 91, 92, 93, 94, -1, /* 96 */
+ 96, 97, -1, -1, -1, -1, -1, -1, -1, -1,106,107,108,109,110,111, /* 112 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,121,122,123,124,125,126,127, /* 128 */
+ -1,129,130,131,132,133,134,135,136,137, -1, -1, -1, -1, -1, -1, /* 144 */
+ -1,145,146,147,148,149,150,151,152,153, -1, -1, -1, -1, -1, -1, /* 160 */
+ -1,161,162,163,164,165,166,167,168,169, -1, -1, -1, -1, -1, -1, /* 176 */
+ 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 192 */
+ 192,193,194,195,196,197,198,199,200,201, -1, -1, -1, -1, -1, -1, /* 208 */
+ 208,209,210,211,212,213,214,215,216,217, -1, -1, -1, -1, -1, -1, /* 224 */
+ 224, -1,226,227,228,229,230,231,232,233, -1, -1, -1, -1, -1, -1, /* 240 */
+ 240,241,242,243,244,245,246,247,248,249, -1, -1, -1, -1, -1,255 /* 256 */
+};
+
+
+static int
+table_convert_char (void *baton, int from, int *to)
+{
+ int *table = (int *) baton;
+
+ if (0 <= from && from <= 255
+ && table[from] != -1)
+ {
+ *to = table[from];
+ return 1;
+ }
+ else
+ return 0;
+}
+
+
+static struct translation *
+table_translation (const char *from, const char *to, int *table,
+ const char *(*c_target_char_has_backslash_escape)
+ (void *baton, int target_char),
+ void *c_target_char_has_backslash_escape_baton,
+ int (*c_parse_backslash) (void *baton,
+ int host_char,
+ int *target_char),
+ void *c_parse_backslash_baton)
+{
+ struct translation *t = xmalloc (sizeof (*t));
+
+ memset (t, 0, sizeof (*t));
+ t->from = from;
+ t->to = to;
+ t->c_target_char_has_backslash_escape = c_target_char_has_backslash_escape;
+ t->c_target_char_has_backslash_escape_baton
+ = c_target_char_has_backslash_escape_baton;
+ t->c_parse_backslash = c_parse_backslash;
+ t->c_parse_backslash_baton = c_parse_backslash_baton;
+ t->convert_char = table_convert_char;
+ t->convert_char_baton = (void *) table;
+
+ return t;
+}
+
+
+static struct translation *
+simple_table_translation (const char *from, const char *to, int *table)
+{
+ return table_translation (from, to, table, 0, 0, 0, 0);
+}
+
+
+
+/* Setting and retrieving the host and target charsets. */
+
+
+/* The current host and target character sets. */
+static struct charset *current_host_charset, *current_target_charset;
+
+/* The current functions and batons we should use for the functions in
+ charset.h. */
+
+static const char *(*c_target_char_has_backslash_escape_func)
+ (void *baton, int target_char);
+static void *c_target_char_has_backslash_escape_baton;
+
+static int (*c_parse_backslash_func) (void *baton,
+ int host_char,
+ int *target_char);
+static void *c_parse_backslash_baton;
+
+static int (*host_char_to_target_func) (void *baton,
+ int host_char,
+ int *target_char);
+static void *host_char_to_target_baton;
+
+static int (*target_char_to_host_func) (void *baton,
+ int target_char,
+ int *host_char);
+static void *target_char_to_host_baton;
+
+
+/* Cached iconv conversions, that might be useful to fallback
+ routines. */
+static struct cached_iconv cached_iconv_host_to_target;
+static struct cached_iconv cached_iconv_target_to_host;
+
+
+/* Set the host and target character sets to HOST and TARGET. */
+static void
+set_host_and_target_charsets (struct charset *host, struct charset *target)
+{
+ struct translation *h2t, *t2h;
+
+ /* If they're not both initialized yet, then just do nothing for
+ now. As soon as we're done running our initialize function,
+ everything will be initialized. */
+ if (! host || ! target)
+ {
+ current_host_charset = host;
+ current_target_charset = target;
+ return;
+ }
+
+ h2t = lookup_translation (host->name, target->name);
+ t2h = lookup_translation (target->name, host->name);
+
+ /* If the translations don't provide conversion functions, make sure
+ iconv can back them up. Do this *before* modifying any state. */
+ if (host != target)
+ {
+ if (! h2t || ! h2t->convert_char)
+ {
+ if (check_iconv_cache (&cached_iconv_host_to_target, host, target)
+ < 0)
+ error ("GDB can't convert from the `%s' character set to `%s'.",
+ host->name, target->name);
+ }
+ if (! t2h || ! t2h->convert_char)
+ {
+ if (check_iconv_cache (&cached_iconv_target_to_host, target, host)
+ < 0)
+ error ("GDB can't convert from the `%s' character set to `%s'.",
+ target->name, host->name);
+ }
+ }
+
+ if (t2h && t2h->c_target_char_has_backslash_escape)
+ {
+ c_target_char_has_backslash_escape_func
+ = t2h->c_target_char_has_backslash_escape;
+ c_target_char_has_backslash_escape_baton
+ = t2h->c_target_char_has_backslash_escape_baton;
+ }
+ else
+ c_target_char_has_backslash_escape_func
+ = default_c_target_char_has_backslash_escape;
+
+ if (h2t && h2t->c_parse_backslash)
+ {
+ c_parse_backslash_func = h2t->c_parse_backslash;
+ c_parse_backslash_baton = h2t->c_parse_backslash_baton;
+ }
+ else
+ c_parse_backslash_func = default_c_parse_backslash;
+
+ if (h2t && h2t->convert_char)
+ {
+ host_char_to_target_func = h2t->convert_char;
+ host_char_to_target_baton = h2t->convert_char_baton;
+ }
+ else if (host == target)
+ host_char_to_target_func = identity_either_char_to_other;
+ else
+ {
+ host_char_to_target_func = iconv_convert;
+ host_char_to_target_baton = &cached_iconv_host_to_target;
+ }
+
+ if (t2h && t2h->convert_char)
+ {
+ target_char_to_host_func = t2h->convert_char;
+ target_char_to_host_baton = t2h->convert_char_baton;
+ }
+ else if (host == target)
+ target_char_to_host_func = identity_either_char_to_other;
+ else
+ {
+ target_char_to_host_func = iconv_convert;
+ target_char_to_host_baton = &cached_iconv_target_to_host;
+ }
+
+ current_host_charset = host;
+ current_target_charset = target;
+}
+
+
+static struct charset *
+lookup_charset_or_error (const char *name)
+{
+ struct charset *cs = lookup_charset (name);
+
+ if (! cs)
+ error ("GDB doesn't know of any character set named `%s'.", name);
+
+ return cs;
+}
+
+
+static void
+check_valid_host_charset (struct charset *cs)
+{
+ if (! cs->valid_host_charset)
+ error ("GDB can't use `%s' as its host character set.", cs->name);
+}
+
+
+void
+set_host_charset (const char *charset)
+{
+ struct charset *cs = lookup_charset_or_error (charset);
+ check_valid_host_charset (cs);
+ set_host_and_target_charsets (cs, current_target_charset);
+}
+
+
+const char *
+host_charset ()
+{
+ return current_host_charset->name;
+}
+
+
+void
+set_target_charset (const char *charset)
+{
+ struct charset *cs = lookup_charset_or_error (charset);
+
+ set_host_and_target_charsets (current_host_charset, cs);
+}
+
+
+const char *
+target_charset ()
+{
+ return current_target_charset->name;
+}
+
+
+
+/* Public character management functions. */
+
+
+const char *
+c_target_char_has_backslash_escape (int target_char)
+{
+ return ((*c_target_char_has_backslash_escape_func)
+ (c_target_char_has_backslash_escape_baton, target_char));
+}
+
+
+int
+c_parse_backslash (int host_char, int *target_char)
+{
+ return (*c_parse_backslash_func) (c_parse_backslash_baton,
+ host_char, target_char);
+}
+
+
+int
+host_char_print_literally (int host_char)
+{
+ return ((*current_host_charset->host_char_print_literally)
+ (current_host_charset->host_char_print_literally_baton,
+ host_char));
+}
+
+
+int
+target_char_to_control_char (int target_char, int *target_ctrl_char)
+{
+ return ((*current_target_charset->target_char_to_control_char)
+ (current_target_charset->target_char_to_control_char_baton,
+ target_char, target_ctrl_char));
+}
+
+
+int
+host_char_to_target (int host_char, int *target_char)
+{
+ return ((*host_char_to_target_func)
+ (host_char_to_target_baton, host_char, target_char));
+}
+
+
+int
+target_char_to_host (int target_char, int *host_char)
+{
+ return ((*target_char_to_host_func)
+ (target_char_to_host_baton, target_char, host_char));
+}
+
+
+
+/* Commands. */
+
+
+/* List the valid character sets. If HOST_ONLY is non-zero, list only
+ those character sets which can be used as GDB's host character set. */
+static void
+list_charsets (int host_only)
+{
+ struct charset *cs;
+
+ printf_filtered ("Valid character sets are:\n");
+
+ for (cs = all_charsets; cs; cs = cs->next)
+ if (host_only && cs->valid_host_charset)
+ printf_filtered (" %s\n", cs->name);
+ else
+ printf_filtered (" %s %s\n",
+ cs->name,
+ cs->valid_host_charset ? "*" : " ");
+
+ if (! host_only)
+ printf_filtered ("* - can be used as a host character set\n");
+}
+
+
+static void
+set_charset_command (char *arg, int from_tty)
+{
+ if (! arg || arg[0] == '\0')
+ list_charsets (0);
+ else
+ {
+ struct charset *cs = lookup_charset_or_error (arg);
+ check_valid_host_charset (cs);
+ set_host_and_target_charsets (cs, cs);
+ }
+}
+
+
+static void
+set_host_charset_command (char *arg, int from_tty)
+{
+ if (! arg || arg[0] == '\0')
+ list_charsets (1);
+ else
+ {
+ struct charset *cs = lookup_charset_or_error (arg);
+ check_valid_host_charset (cs);
+ set_host_and_target_charsets (cs, current_target_charset);
+ }
+}
+
+
+static void
+set_target_charset_command (char *arg, int from_tty)
+{
+ if (! arg || arg[0] == '\0')
+ list_charsets (0);
+ else
+ {
+ struct charset *cs = lookup_charset_or_error (arg);
+ set_host_and_target_charsets (current_host_charset, cs);
+ }
+}
+
+
+static void
+show_charset_command (char *arg, int from_tty)
+{
+ if (current_host_charset == current_target_charset)
+ {
+ printf_filtered ("The current host and target character set is `%s'.\n",
+ host_charset ());
+ }
+ else
+ {
+ printf_filtered ("The current host character set is `%s'.\n",
+ host_charset ());
+ printf_filtered ("The current target character set is `%s'.\n",
+ target_charset ());
+ }
+}
+
+
+
+/* The charset.c module initialization function. */
+
+#ifndef GDB_DEFAULT_HOST_CHARSET
+#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
+#endif
+
+#ifndef GDB_DEFAULT_TARGET_CHARSET
+#define GDB_DEFAULT_TARGET_CHARSET "ISO-8859-1"
+#endif
+
+void
+_initialize_charset (void)
+{
+ /* Register all the character set GDB knows about.
+
+ You should use the same names that iconv does, where possible, to
+ take advantage of the iconv-based default behaviors.
+
+ CAUTION: if you register a character set, you must also register
+ as many translations as are necessary to make that character set
+ interoperate correctly with all the other character sets. We do
+ provide default behaviors when no translation is available, or
+ when a translation's function pointer for a particular operation
+ is zero. Hopefully, these defaults will be correct often enough
+ that we won't need to provide too many translations. */
+ register_charset (simple_charset ("ascii", 1,
+ ascii_print_literally, 0,
+ ascii_to_control, 0));
+ register_charset (iso_8859_family_charset ("iso-8859-1"));
+ register_charset (ebcdic_family_charset ("ebcdic-us"));
+ register_charset (ebcdic_family_charset ("ibm1047"));
+ register_iconv_charsets ();
+
+ {
+ struct { char *from; char *to; int *table; } tlist[] = {
+ { "ascii", "iso-8859-1", ascii_to_iso_8859_1_table },
+ { "ascii", "ebcdic-us", ascii_to_ebcdic_us_table },
+ { "ascii", "ibm1047", ascii_to_ibm1047_table },
+ { "iso-8859-1", "ascii", iso_8859_1_to_ascii_table },
+ { "iso-8859-1", "ebcdic-us", iso_8859_1_to_ebcdic_us_table },
+ { "iso-8859-1", "ibm1047", iso_8859_1_to_ibm1047_table },
+ { "ebcdic-us", "ascii", ebcdic_us_to_ascii_table },
+ { "ebcdic-us", "iso-8859-1", ebcdic_us_to_iso_8859_1_table },
+ { "ebcdic-us", "ibm1047", ebcdic_us_to_ibm1047_table },
+ { "ibm1047", "ascii", ibm1047_to_ascii_table },
+ { "ibm1047", "iso-8859-1", ibm1047_to_iso_8859_1_table },
+ { "ibm1047", "ebcdic-us", ibm1047_to_ebcdic_us_table }
+ };
+
+ int i;
+
+ for (i = 0; i < (sizeof (tlist) / sizeof (tlist[0])); i++)
+ register_translation (simple_table_translation (tlist[i].from,
+ tlist[i].to,
+ tlist[i].table));
+ }
+
+ set_host_charset (GDB_DEFAULT_HOST_CHARSET);
+ set_target_charset (GDB_DEFAULT_TARGET_CHARSET);
+
+ add_cmd ("charset", class_support, set_charset_command,
+ "Use CHARSET as the host and target character set.\n"
+ "The `host character set' is the one used by the system GDB is running on.\n"
+ "The `target character set' is the one used by the program being debugged.\n"
+ "You may only use supersets of ASCII for your host character set; GDB does\n"
+ "not support any others.\n"
+ "To see a list of the character sets GDB supports, type `set charset'\n"
+ "with no argument.",
+ &setlist);
+
+ add_cmd ("host-charset", class_support, set_host_charset_command,
+ "Use CHARSET as the host character set.\n"
+ "The `host character set' is the one used by the system GDB is running on.\n"
+ "You may only use supersets of ASCII for your host character set; GDB does\n"
+ "not support any others.\n"
+ "To see a list of the character sets GDB supports, type `set host-charset'\n"
+ "with no argument.",
+ &setlist);
+
+ add_cmd ("target-charset", class_support, set_target_charset_command,
+ "Use CHARSET as the target character set.\n"
+ "The `target character set' is the one used by the program being debugged.\n"
+ "GDB translates characters and strings between the host and target\n"
+ "character sets as needed.\n"
+ "To see a list of the character sets GDB supports, type `set target-charset'\n"
+ "with no argument.",
+ &setlist);
+
+ add_cmd ("charset", class_support, show_charset_command,
+ "Show the current host and target character sets.",
+ &showlist);
+ add_alias_cmd ("host-charset", "charset", class_alias, 1, &showlist);
+ add_alias_cmd ("target-charset", "charset", class_alias, 1, &showlist);
+}
diff --git a/gdb/charset.h b/gdb/charset.h
new file mode 100644
index 0000000..10578cb
--- /dev/null
+++ b/gdb/charset.h
@@ -0,0 +1,120 @@
+/* Character set conversion support for GDB.
+ Copyright 2001 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 CHARSET_H
+#define CHARSET_H
+
+
+/* If the target program uses a different character set than the host,
+ GDB has some support for translating between the two; GDB converts
+ characters and strings to the host character set before displaying
+ them, and converts characters and strings appearing in expressions
+ entered by the user to the target character set.
+
+ At the moment, GDB only supports single-byte, stateless character
+ sets. This includes the ISO-8859 family (ASCII extended with
+ accented characters, and (I think) Cyrillic, for European
+ languages), and the EBCDIC family (used on IBM's mainframes).
+ Unfortunately, it excludes many Asian scripts, the fixed- and
+ variable-width Unicode encodings, and other desireable things.
+ Patches are welcome! (For example, it would be nice if the Java
+ string support could simply get absorbed into some more general
+ multi-byte encoding support.)
+
+ Furthermore, GDB's code pretty much assumes that the host character
+ set is some superset of ASCII; there are plenty if ('0' + n)
+ expressions and the like.
+
+ When the `iconv' library routine supports a character set meeting
+ the requirements above, it's easy to plug an entry into GDB's table
+ that uses iconv to handle the details. */
+
+
+/* Set the host character set to CHARSET. CHARSET must be a superset
+ of ASCII, since GDB's code assumes this. */
+void set_host_charset (const char *charset);
+
+
+/* Set the target character set to CHARSET. */
+void set_target_charset (const char *charset);
+
+
+/* Return the name of the current host/target character set. The
+ result is owned by the charset module; the caller should not free
+ it. */
+const char *host_charset (void);
+const char *target_charset (void);
+
+
+/* In general, the set of C backslash escapes (\n, \f) is specific to
+ the character set. Not all character sets will have form feed
+ characters, for example.
+
+ The following functions allow GDB to parse and print control
+ characters in a character-set-independent way. They are both
+ language-specific (to C and C++) and character-set-specific.
+ Putting them here is a compromise. */
+
+
+/* If the target character TARGET_CHAR have a backslash escape in the
+ C language (i.e., a character like 'n' or 't'), return the host
+ character string that should follow the backslash. Otherwise,
+ return zero.
+
+ When this function returns non-zero, the string it returns is
+ statically allocated; the caller is not responsible for freeing it. */
+const char *c_target_char_has_backslash_escape (int target_char);
+
+
+/* If the host character HOST_CHAR is a valid backslash escape in the
+ C language for the target character set, return non-zero, and set
+ *TARGET_CHAR to the target character the backslash escape represents.
+ Otherwise, return zero. */
+int c_parse_backslash (int host_char, int *target_char);
+
+
+/* Return non-zero if the host character HOST_CHAR can be printed
+ literally --- that is, if it can be readably printed as itself in a
+ character or string constant. Return zero if it should be printed
+ using some kind of numeric escape, like '\031' in C, '^(25)' in
+ Chill, or #25 in Pascal. */
+int host_char_print_literally (int host_char);
+
+
+/* If the host character HOST_CHAR has an equivalent in the target
+ character set, set *TARGET_CHAR to that equivalent, and return
+ non-zero. Otherwise, return zero. */
+int host_char_to_target (int host_char, int *target_char);
+
+
+/* If the target character TARGET_CHAR has an equivalent in the host
+ character set, set *HOST_CHAR to that equivalent, and return
+ non-zero. Otherwise, return zero. */
+int target_char_to_host (int target_char, int *host_char);
+
+
+/* If the target character TARGET_CHAR has a corresponding control
+ character (also in the target character set), set *TARGET_CTRL_CHAR
+ to the control character, and return non-zero. Otherwise, return
+ zero. */
+int target_char_to_control_char (int target_char, int *target_ctrl_char);
+
+
+#endif /* CHARSET_H */
diff --git a/gdb/configure b/gdb/configure
index 9befcab..e8a83ab 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -62,6 +62,8 @@ ac_help="$ac_help
--enable-sim Link gdb with simulator"
ac_help="$ac_help
--enable-shared Use shared libraries"
+ac_help="$ac_help
+ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -79,7 +81,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -194,7 +195,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -365,11 +365,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -535,16 +530,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -585,7 +576,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:580: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -611,7 +602,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:615: checking for $ac_word" >&5
+echo "configure:606: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -641,7 +632,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:645: checking for $ac_word" >&5
+echo "configure:636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -692,7 +683,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:696: checking for $ac_word" >&5
+echo "configure:687: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -724,7 +715,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -735,12 +726,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 739 "configure"
+#line 730 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -766,12 +757,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:775: checking whether we are using GNU C" >&5
+echo "configure:766: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -780,7 +771,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -799,7 +790,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:794: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -831,7 +822,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:835: checking how to run the C preprocessor" >&5
+echo "configure:826: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -846,13 +837,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 850 "configure"
+#line 841 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -863,13 +854,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
+#line 858 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -880,13 +871,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 884 "configure"
+#line 875 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -911,9 +902,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:915: checking for AIX" >&5
+echo "configure:906: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 908 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -935,7 +926,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:939: checking for POSIXized ISC" >&5
+echo "configure:930: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -959,7 +950,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:954: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -976,7 +967,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 980 "configure"
+#line 971 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1013,7 +1004,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1084,7 +1075,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1088: checking host system type" >&5
+echo "configure:1079: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1105,7 +1096,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1109: checking target system type" >&5
+echo "configure:1100: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1123,7 +1114,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1127: checking build system type" >&5
+echo "configure:1118: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1148,7 +1139,7 @@ test "$host_alias" != "$target_alias" &&
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1143: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1177,7 +1168,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1181: checking for $ac_word" >&5
+echo "configure:1172: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1205,12 +1196,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1209: checking for ANSI C header files" >&5
+echo "configure:1200: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1214 "configure"
+#line 1205 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1218,7 +1209,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1235,7 +1226,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1239 "configure"
+#line 1230 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1253,7 +1244,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1257 "configure"
+#line 1248 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1274,7 +1265,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1278 "configure"
+#line 1269 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1285,7 +1276,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1309,12 +1300,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1313: checking for working const" >&5
+echo "configure:1304: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
+#line 1309 "configure"
#include "confdefs.h"
int main() {
@@ -1363,7 +1354,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1384,21 +1375,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1388: checking for inline" >&5
+echo "configure:1379: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
+#line 1386 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1424,12 +1415,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1428: checking for off_t" >&5
+echo "configure:1419: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1433 "configure"
+#line 1424 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1457,12 +1448,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1461: checking for size_t" >&5
+echo "configure:1452: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1466 "configure"
+#line 1457 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1492,19 +1483,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1496: checking for working alloca.h" >&5
+echo "configure:1487: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1501 "configure"
+#line 1492 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1525,12 +1516,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1529: checking for alloca" >&5
+echo "configure:1520: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1534 "configure"
+#line 1525 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1558,7 +1549,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1590,12 +1581,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1594: checking whether alloca needs Cray hooks" >&5
+echo "configure:1585: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
+#line 1590 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1620,12 +1611,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1624: checking for $ac_func" >&5
+echo "configure:1615: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1629 "configure"
+#line 1620 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1648,7 +1639,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1675,7 +1666,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1679: checking stack direction for C alloca" >&5
+echo "configure:1670: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1683,7 +1674,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1687 "configure"
+#line 1678 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1702,7 +1693,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -1723,21 +1714,21 @@ EOF
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1731: checking for $ac_hdr" >&5
+echo "configure:1722: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1736 "configure"
+#line 1727 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1766,12 +1757,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1770: checking for $ac_func" >&5
+echo "configure:1761: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1775 "configure"
+#line 1766 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1794,7 +1785,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1819,7 +1810,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1823: checking for working mmap" >&5
+echo "configure:1814: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1827,7 +1818,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1831 "configure"
+#line 1822 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1855,11 +1846,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -1967,7 +1971,7 @@ main()
}
EOF
-if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -1995,17 +1999,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_hdr" >&5
+echo "configure:2003: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2004 "configure"
+#line 2008 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2035,12 +2039,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2039: checking for $ac_func" >&5
+echo "configure:2043: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2044 "configure"
+#line 2048 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2063,7 +2067,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2092,12 +2096,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2096: checking for $ac_func" >&5
+echo "configure:2100: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2101 "configure"
+#line 2105 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2120,7 +2124,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2154,19 +2158,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2158: checking for LC_MESSAGES" >&5
+echo "configure:2162: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2163 "configure"
+#line 2167 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2187,7 +2191,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2191: checking whether NLS is requested" >&5
+echo "configure:2195: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2207,7 +2211,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2211: checking whether included gettext is requested" >&5
+echo "configure:2215: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2226,17 +2230,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2230: checking for libintl.h" >&5
+echo "configure:2234: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2235 "configure"
+#line 2239 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2253,19 +2257,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2257: checking for gettext in libc" >&5
+echo "configure:2261: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2262 "configure"
+#line 2266 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -2281,7 +2285,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2285: checking for bindtextdomain in -lintl" >&5
+echo "configure:2289: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2289,7 +2293,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
+#line 2297 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2300,7 +2304,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2316,19 +2320,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2320: checking for gettext in libintl" >&5
+echo "configure:2324: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2325 "configure"
+#line 2329 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -2356,7 +2360,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2360: checking for $ac_word" >&5
+echo "configure:2364: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2390,12 +2394,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2394: checking for $ac_func" >&5
+echo "configure:2398: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2399 "configure"
+#line 2403 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2418,7 +2422,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2445,7 +2449,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2449: checking for $ac_word" >&5
+echo "configure:2453: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2481,7 +2485,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2485: checking for $ac_word" >&5
+echo "configure:2489: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2513,7 +2517,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+#line 2521 "configure"
#include "confdefs.h"
int main() {
@@ -2521,7 +2525,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2553,7 +2557,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2557: checking for $ac_word" >&5
+echo "configure:2561: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2587,7 +2591,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2591: checking for $ac_word" >&5
+echo "configure:2595: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2623,7 +2627,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2627: checking for $ac_word" >&5
+echo "configure:2631: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2713,7 +2717,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2717: checking for catalogs to be installed" >&5
+echo "configure:2721: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2741,17 +2745,17 @@ echo "configure:2717: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2745: checking for linux/version.h" >&5
+echo "configure:2749: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2750 "configure"
+#line 2754 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2875,12 +2879,12 @@ EOF
fi
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2884: checking for $ac_word" >&5
+echo "configure:2888: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2921,7 +2925,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2925: checking for a BSD compatible install" >&5
+echo "configure:2929: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2982,7 +2986,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2986: checking for $ac_word" >&5
+echo "configure:2990: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3014,7 +3018,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3018: checking for $ac_word" >&5
+echo "configure:3022: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3046,7 +3050,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3050: checking for $ac_word" >&5
+echo "configure:3054: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3081,7 +3085,7 @@ fi
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3085: checking for $ac_word" >&5
+echo "configure:3089: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3113,7 +3117,7 @@ fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_word" >&5
+echo "configure:3121: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3147,7 +3151,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_word" >&5
+echo "configure:3155: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3181,7 +3185,7 @@ test -n "$YACC" || YACC="yacc"
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3185: checking for $ac_word" >&5
+echo "configure:3189: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3232,12 +3236,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3236: checking return type of signal handlers" >&5
+echo "configure:3240: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3241 "configure"
+#line 3245 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3254,7 +3258,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3274,12 +3278,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3278: checking for ANSI C header files" >&5
+echo "configure:3282: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3283 "configure"
+#line 3287 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3287,7 +3291,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3304,7 +3308,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3308 "configure"
+#line 3312 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3322,7 +3326,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3326 "configure"
+#line 3330 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3343,7 +3347,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3347 "configure"
+#line 3351 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3354,7 +3358,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3398,17 +3402,17 @@ for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3402: checking for $ac_hdr" >&5
+echo "configure:3406: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3407 "configure"
+#line 3411 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3435,12 +3439,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3439: checking whether stat file-mode macros are broken" >&5
+echo "configure:3443: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3444 "configure"
+#line 3448 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3492,12 +3496,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3496: checking for working const" >&5
+echo "configure:3500: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3501 "configure"
+#line 3505 "configure"
#include "confdefs.h"
int main() {
@@ -3546,7 +3550,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3567,21 +3571,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3571: checking for inline" >&5
+echo "configure:3575: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3578 "configure"
+#line 3582 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3611,12 +3615,12 @@ for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3615: checking for $ac_func" >&5
+echo "configure:3619: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3620 "configure"
+#line 3624 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3639,7 +3643,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3666,19 +3670,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3670: checking for working alloca.h" >&5
+echo "configure:3674: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3675 "configure"
+#line 3679 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3699,12 +3703,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3703: checking for alloca" >&5
+echo "configure:3707: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3708 "configure"
+#line 3712 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3732,7 +3736,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3764,12 +3768,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3768: checking whether alloca needs Cray hooks" >&5
+echo "configure:3772: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3773 "configure"
+#line 3777 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3794,12 +3798,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3798: checking for $ac_func" >&5
+echo "configure:3802: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3803 "configure"
+#line 3807 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3822,7 +3826,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3849,7 +3853,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3853: checking stack direction for C alloca" >&5
+echo "configure:3857: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3857,7 +3861,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
+#line 3865 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3876,7 +3880,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3898,12 +3902,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3902: checking for pid_t" >&5
+echo "configure:3906: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3907 "configure"
+#line 3911 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3932,17 +3936,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3936: checking for vfork.h" >&5
+echo "configure:3940: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
+#line 3945 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3967,18 +3971,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3971: checking for working vfork" >&5
+echo "configure:3975: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3977: checking for vfork" >&5
+echo "configure:3981: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3982 "configure"
+#line 3986 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -4001,7 +4005,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -4023,7 +4027,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 4027 "configure"
+#line 4031 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -4118,7 +4122,7 @@ main() {
}
}
EOF
-if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -4142,7 +4146,7 @@ fi
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4146: checking whether setpgrp takes no argument" >&5
+echo "configure:4150: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4150,7 +4154,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4154 "configure"
+#line 4158 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -4170,7 +4174,7 @@ main()
}
EOF
-if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -4195,12 +4199,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4199: checking whether setpgrp takes no argument" >&5
+echo "configure:4203: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4204 "configure"
+#line 4208 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -4214,7 +4218,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -4238,12 +4242,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:4242: checking for sigsetjmp" >&5
+echo "configure:4246: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4247 "configure"
+#line 4251 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -4252,7 +4256,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -4275,19 +4279,19 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4279: checking for r_fs in struct reg" >&5
+echo "configure:4283: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4284 "configure"
+#line 4288 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -4307,19 +4311,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4311: checking for r_gs in struct reg" >&5
+echo "configure:4315: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4316 "configure"
+#line 4320 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -4341,19 +4345,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4345: checking for PTRACE_GETREGS" >&5
+echo "configure:4349: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4350 "configure"
+#line 4354 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -4375,19 +4379,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4379: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4383: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 4388 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -4409,12 +4413,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4413: checking for PT_GETDBREGS" >&5
+echo "configure:4417: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4418 "configure"
+#line 4422 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4422,7 +4426,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -4444,12 +4448,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:4448: checking for PT_GETXMMREGS" >&5
+echo "configure:4452: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4453 "configure"
+#line 4457 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4457,7 +4461,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -4479,7 +4483,7 @@ fi
echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4483: checking for socketpair in -lsocket" >&5
+echo "configure:4487: checking for socketpair in -lsocket" >&5
ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4487,7 +4491,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4491 "configure"
+#line 4495 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4498,7 +4502,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4528,12 +4532,12 @@ fi
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4532: checking for $ac_func" >&5
+echo "configure:4536: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4537 "configure"
+#line 4541 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4556,7 +4560,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4583,12 +4587,12 @@ done
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4587: checking whether malloc must be declared" >&5
+echo "configure:4591: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4592 "configure"
+#line 4596 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4609,7 +4613,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4630,12 +4634,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4634: checking whether realloc must be declared" >&5
+echo "configure:4638: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4639 "configure"
+#line 4643 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4656,7 +4660,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4677,12 +4681,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4681: checking whether free must be declared" >&5
+echo "configure:4685: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4686 "configure"
+#line 4690 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4703,7 +4707,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4724,12 +4728,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4728: checking whether strerror must be declared" >&5
+echo "configure:4732: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4733 "configure"
+#line 4737 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4750,7 +4754,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -4771,12 +4775,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4775: checking whether strdup must be declared" >&5
+echo "configure:4779: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4780 "configure"
+#line 4784 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4797,7 +4801,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -4818,12 +4822,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4822: checking whether strstr must be declared" >&5
+echo "configure:4826: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4827 "configure"
+#line 4831 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4844,7 +4848,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4865,12 +4869,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:4869: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:4873: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4874 "configure"
+#line 4878 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4891,7 +4895,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -4917,9 +4921,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4921: checking for HPUX save_state structure" >&5
+echo "configure:4925: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 4923 "configure"
+#line 4927 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4934,7 +4938,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4938 "configure"
+#line 4942 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -5004,12 +5008,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5008: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5012: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5013 "configure"
+#line 5017 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5018,7 +5022,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5040,12 +5044,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5044: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:5048: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5049 "configure"
+#line 5053 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5054,7 +5058,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -5076,12 +5080,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5080: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:5084: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5085 "configure"
+#line 5089 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5090,7 +5094,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -5112,12 +5116,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5116: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:5120: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5121 "configure"
+#line 5125 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5126,7 +5130,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -5148,12 +5152,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5152: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:5156: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5157 "configure"
+#line 5161 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5162,7 +5166,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -5184,12 +5188,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5188: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:5192: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5193 "configure"
+#line 5197 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5198,7 +5202,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -5220,12 +5224,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5224: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:5228: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5229 "configure"
+#line 5233 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5234,7 +5238,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -5256,12 +5260,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5260: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:5264: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5265 "configure"
+#line 5269 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5270,7 +5274,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -5292,12 +5296,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5296: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5300: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5301 "configure"
+#line 5305 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5306,7 +5310,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -5328,12 +5332,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5332: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5336: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5337 "configure"
+#line 5341 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5342,7 +5346,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -5364,12 +5368,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5368: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5372: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5373 "configure"
+#line 5377 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5378,7 +5382,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -5400,12 +5404,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5404: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5408: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5409 "configure"
+#line 5413 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5414,7 +5418,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -5436,12 +5440,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5440: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5444: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5445 "configure"
+#line 5449 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5450,7 +5454,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -5472,12 +5476,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5476: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5480: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5481 "configure"
+#line 5485 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5486,7 +5490,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -5513,7 +5517,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5517: checking whether prfpregset_t type is broken" >&5
+echo "configure:5521: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5521,7 +5525,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 5525 "configure"
+#line 5529 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -5531,7 +5535,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -5556,12 +5560,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5560: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5564: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5565 "configure"
+#line 5569 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -5574,7 +5578,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -5598,19 +5602,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5602: checking for member l_addr in struct link_map" >&5
+echo "configure:5606: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5607 "configure"
+#line 5611 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -5632,12 +5636,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5636: checking for member lm_addr in struct link_map" >&5
+echo "configure:5640: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5641 "configure"
+#line 5645 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -5645,7 +5649,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -5667,12 +5671,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5671: checking for member som_addr in struct so_map" >&5
+echo "configure:5675: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5676 "configure"
+#line 5680 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -5683,7 +5687,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -5705,12 +5709,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5709: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5713: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5714 "configure"
+#line 5718 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -5718,7 +5722,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -5744,7 +5748,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5748: checking for main in -lm" >&5
+echo "configure:5752: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5752,14 +5756,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5756 "configure"
+#line 5760 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5788,7 +5792,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5792: checking for wctype in -lc" >&5
+echo "configure:5796: checking for wctype in -lc" >&5
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5796,7 +5800,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5800 "configure"
+#line 5804 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5807,7 +5811,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5826,7 +5830,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5830: checking for wctype in -lw" >&5
+echo "configure:5834: checking for wctype in -lw" >&5
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5834,7 +5838,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5838 "configure"
+#line 5842 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5845,7 +5849,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5877,12 +5881,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5881: checking for long long support in compiler" >&5
+echo "configure:5885: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5886 "configure"
+#line 5890 "configure"
#include "confdefs.h"
int main() {
@@ -5892,7 +5896,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -5914,7 +5918,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5918: checking for long long support in printf" >&5
+echo "configure:5922: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5922,7 +5926,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 5926 "configure"
+#line 5930 "configure"
#include "confdefs.h"
int main () {
@@ -5936,7 +5940,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -5960,19 +5964,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5964: checking for long double support in compiler" >&5
+echo "configure:5968: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5969 "configure"
+#line 5973 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -5994,7 +5998,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:5998: checking for long double support in printf" >&5
+echo "configure:6002: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6002,7 +6006,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6006 "configure"
+#line 6010 "configure"
#include "confdefs.h"
int main () {
@@ -6012,7 +6016,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -6036,7 +6040,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:6040: checking for long double support in scanf" >&5
+echo "configure:6044: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6044,7 +6048,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6048 "configure"
+#line 6052 "configure"
#include "confdefs.h"
int main () {
@@ -6054,7 +6058,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -6076,21 +6080,21 @@ EOF
fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6084: checking for $ac_hdr" >&5
+echo "configure:6088: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6089 "configure"
+#line 6093 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6119,12 +6123,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6123: checking for $ac_func" >&5
+echo "configure:6127: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6128 "configure"
+#line 6132 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6147,7 +6151,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6172,7 +6176,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6176: checking for working mmap" >&5
+echo "configure:6180: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6180,7 +6184,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6184 "configure"
+#line 6188 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6208,11 +6212,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -6320,7 +6337,7 @@ main()
}
EOF
-if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6346,7 +6363,7 @@ fi
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:6350: checking for -bbigtoc option" >&5
+echo "configure:6367: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6360,14 +6377,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 6364 "configure"
+#line 6381 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -6390,7 +6407,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6394: checking for HPUX/OSF thread support" >&5
+echo "configure:6411: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -6409,7 +6426,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6413: checking for Solaris thread debugging library" >&5
+echo "configure:6430: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -6419,7 +6436,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6423: checking for dlopen in -ldl" >&5
+echo "configure:6440: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6427,7 +6444,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6431 "configure"
+#line 6448 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6438,7 +6455,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6470,17 +6487,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6474: checking for the ld -export-dynamic flag" >&5
+echo "configure:6491: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 6477 "configure"
+#line 6494 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -6499,13 +6516,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6503: checking if <proc_service.h> is old" >&5
+echo "configure:6520: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6509 "configure"
+#line 6526 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -6516,7 +6533,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -6735,7 +6752,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6739: checking compiler warning flags" >&5
+echo "configure:6756: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -6745,14 +6762,14 @@ echo "configure:6739: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 6749 "configure"
+#line 6766 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -6812,12 +6829,12 @@ fi
if test $want_included_regex = false; then
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6816: checking for GNU regex" >&5
+echo "configure:6833: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6821 "configure"
+#line 6838 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
#include <sys/types.h>
@@ -6829,7 +6846,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6858,12 +6875,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6862: checking for cygwin" >&5
+echo "configure:6879: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6867 "configure"
+#line 6884 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6901,7 +6918,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6905: checking for tgetent in -lncurses" >&5
+echo "configure:6922: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6909,7 +6926,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6913 "configure"
+#line 6930 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6920,7 +6937,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6939,7 +6956,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6943: checking for tgetent in -lHcurses" >&5
+echo "configure:6960: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6947,7 +6964,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6951 "configure"
+#line 6968 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6958,7 +6975,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6977,7 +6994,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6981: checking for tgetent in -ltermlib" >&5
+echo "configure:6998: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6985,7 +7002,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6989 "configure"
+#line 7006 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6996,7 +7013,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7015,7 +7032,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7019: checking for tgetent in -ltermcap" >&5
+echo "configure:7036: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7023,7 +7040,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7027 "configure"
+#line 7044 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7034,7 +7051,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7053,7 +7070,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7057: checking for tgetent in -lcurses" >&5
+echo "configure:7074: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7061,7 +7078,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7065 "configure"
+#line 7082 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7072,7 +7089,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7091,7 +7108,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7095: checking for tgetent in -lterminfo" >&5
+echo "configure:7112: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7099,7 +7116,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7103 "configure"
+#line 7120 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7110,7 +7127,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7275,7 +7292,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7279: checking for Tcl configuration" >&5
+echo "configure:7296: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7383,7 +7400,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7387: checking for Tk configuration" >&5
+echo "configure:7404: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7492,7 +7509,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7496: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7513: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -7558,17 +7575,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7562: checking for tclInt.h" >&5
+echo "configure:7579: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7567 "configure"
+#line 7584 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7628,7 +7645,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7632: checking for Tk private headers" >&5
+echo "configure:7649: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -7694,17 +7711,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7698: checking for tk.h" >&5
+echo "configure:7715: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7703 "configure"
+#line 7720 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7750,7 +7767,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7754: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7771: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -7773,7 +7790,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7777: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7794: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -7796,7 +7813,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7800: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7817: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -7848,7 +7865,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7852: checking for Itcl configuration" >&5
+echo "configure:7869: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7951,7 +7968,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7955: checking for Itk configuration" >&5
+echo "configure:7972: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8054,7 +8071,7 @@ if test "${with_tixconfig+set}" = set; then
fi
echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:8058: checking for Tix configuration" >&5
+echo "configure:8075: checking for Tix configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8200,7 +8217,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8204: checking for X" >&5
+echo "configure:8221: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8262,12 +8279,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8266 "configure"
+#line 8283 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -8336,14 +8353,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8340 "configure"
+#line 8357 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -8635,7 +8652,7 @@ fi
# ``gdbserver'' can only be built in a native configuration.
if test x"${target}" = x"${host}"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8639: checking whether gdbserver is supported on this host" >&5
+echo "configure:8656: checking whether gdbserver is supported on this host" >&5
if test x"${build_gdbserver}" = xyes ; then
configdirs="${configdirs} gdbserver"
SUBDIRS="${SUBDIRS} gdbserver"
@@ -8697,7 +8714,7 @@ fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8701: checking whether ln -s works" >&5
+echo "configure:8718: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8721,12 +8738,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8725: checking for Cygwin environment" >&5
+echo "configure:8742: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8730 "configure"
+#line 8747 "configure"
#include "confdefs.h"
int main() {
@@ -8737,7 +8754,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -8754,19 +8771,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8758: checking for mingw32 environment" >&5
+echo "configure:8775: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8763 "configure"
+#line 8780 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:8770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -8785,7 +8802,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8789: checking for executable suffix" >&5
+echo "configure:8806: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8795,10 +8812,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:8799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -8816,6 +8833,141 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
+
+cat >> confdefs.h <<\EOF
+#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
+EOF
+
+
+
+
+ # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval="$with_libiconv_prefix"
+
+ for dir in `echo "$withval" | tr : ' '`; do
+ if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+ if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+ done
+
+fi
+
+
+ echo $ac_n "checking for iconv""... $ac_c" 1>&6
+echo "configure:8858: checking for iconv" >&5
+if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat > conftest.$ac_ext <<EOF
+#line 8866 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_func_iconv=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ cat > conftest.$ac_ext <<EOF
+#line 8888 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+
+echo "$ac_t""$am_cv_func_iconv" 1>&6
+ if test "$am_cv_func_iconv" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ICONV 1
+EOF
+
+ echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
+echo "configure:8919: checking for iconv declaration" >&5
+ if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 8925 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:8944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_proto_iconv_arg1=""
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_proto_iconv_arg1="const"
+fi
+rm -f conftest*
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ echo "$ac_t""${ac_t:-
+ }$am_cv_proto_iconv" 1>&6
+ cat >> confdefs.h <<EOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+EOF
+
+ fi
+ LIBICONV=
+ if test "$am_cv_lib_iconv" = yes; then
+ LIBICONV="-liconv"
+ fi
+
+
+
subdirs="$configdirs"
trap '' 1 2 15
@@ -9097,6 +9249,7 @@ s%@tm_h@%$tm_h%g
s%@nm_h@%$nm_h%g
s%@LN_S@%$LN_S%g
s%@EXEEXT@%$EXEEXT%g
+s%@LIBICONV@%$LIBICONV%g
s%@subdirs@%$subdirs%g
CEOF
@@ -9106,7 +9259,7 @@ cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
diff --git a/gdb/configure.in b/gdb/configure.in
index edc72c3..7bb455e 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -1362,6 +1362,18 @@ AC_LINK_FILES($files, $links)
dnl Check for exe extension set on certain hosts (e.g. Win32)
AC_EXEEXT
+dnl Detect the character set used by this host.
+
+dnl At the moment, we just assume it's ISO-8859-1 (which is a
+dnl superset of ASCII containing the characters needed for French,
+dnl German, Spanish, Italian, and possibly others), but if were
+dnl *were* to support any host character sets other than ISO-8859-1,
+dnl here's where we'd detect it.
+AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "ISO-8859-1",
+ [Define to be a string naming the default host character set.])
+
+AM_ICONV
+
AC_CONFIG_SUBDIRS($configdirs)
AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
[
diff --git a/gdb/utils.c b/gdb/utils.c
index 92c097a..9aab625 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -60,6 +60,7 @@
#include "demangle.h"
#include "expression.h"
#include "language.h"
+#include "charset.h"
#include "annotate.h"
#include "filenames.h"
@@ -1362,6 +1363,23 @@ query (const char *ctlstr,...)
}
+/* Print an error message saying that we couldn't make sense of a
+ \^mumble sequence in a string or character constant. START and END
+ indicate a substring of some larger string that contains the
+ erroneous backslash sequence, missing the initial backslash. */
+static NORETURN int
+no_control_char_error (const char *start, const char *end)
+{
+ int len = end - start;
+ char *copy = alloca (end - start + 1);
+
+ memcpy (copy, start, len);
+ copy[len] = '\0';
+
+ error ("There is no control character `\\%s' in the `%s' character set.",
+ copy, target_charset ());
+}
+
/* Parse a C escape sequence. STRING_PTR points to a variable
containing a pointer to the string to parse. That pointer
should point to the character after the \. That pointer
@@ -1380,37 +1398,55 @@ query (const char *ctlstr,...)
int
parse_escape (char **string_ptr)
{
+ int target_char;
register int c = *(*string_ptr)++;
- switch (c)
+ if (c_parse_backslash (c, &target_char))
+ return target_char;
+ else switch (c)
{
- case 'a':
- return 007; /* Bell (alert) char */
- case 'b':
- return '\b';
- case 'e': /* Escape character */
- return 033;
- case 'f':
- return '\f';
- case 'n':
- return '\n';
- case 'r':
- return '\r';
- case 't':
- return '\t';
- case 'v':
- return '\v';
case '\n':
return -2;
case 0:
(*string_ptr)--;
return 0;
case '^':
- c = *(*string_ptr)++;
- if (c == '\\')
- c = parse_escape (string_ptr);
- if (c == '?')
- return 0177;
- return (c & 0200) | (c & 037);
+ {
+ /* Remember where this escape sequence started, for reporting
+ errors. */
+ char *sequence_start_pos = *string_ptr - 1;
+
+ c = *(*string_ptr)++;
+
+ if (c == '?')
+ {
+ /* XXXCHARSET: What is `delete' in the host character set? */
+ c = 0177;
+
+ if (! host_char_to_target (c, &target_char))
+ error ("There is no character corresponding to `Delete' "
+ "in the target character set `%s'.",
+ host_charset ());
+
+ return target_char;
+ }
+ else if (c == '\\')
+ target_char = parse_escape (string_ptr);
+ else
+ {
+ if (! host_char_to_target (c, &target_char))
+ no_control_char_error (sequence_start_pos, *string_ptr);
+ }
+
+ /* Now target_char is something like `c', and we want to find
+ its control-character equivalent. */
+ if (! target_char_to_control_char (target_char, &target_char))
+ no_control_char_error (sequence_start_pos, *string_ptr);
+
+ return target_char;
+ }
+
+ /* XXXCHARSET: we need to use isdigit and value-of-digit
+ methods of the host character set here. */
case '0':
case '1':
@@ -1439,7 +1475,12 @@ parse_escape (char **string_ptr)
return i;
}
default:
- return c;
+ if (! host_char_to_target (c, &target_char))
+ error ("The escape sequence `\%c' is equivalent to plain `%c', which"
+ " has no equivalent\n"
+ "in the `%s' character set.",
+ c, c, target_charset ());
+ return target_char;
}
}