aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-04-15 22:20:32 +0000
committerTom Tromey <tromey@redhat.com>2009-04-15 22:20:32 +0000
commit732f6a935c88164b258505f7b10091bafa6bf877 (patch)
tree9e0a9ca2bcb24401e3074aee239450100af218d8 /gdb/c-lang.c
parent334cc82d44775325475752b1126a3257b51b2b0c (diff)
downloadgdb-732f6a935c88164b258505f7b10091bafa6bf877.zip
gdb-732f6a935c88164b258505f7b10091bafa6bf877.tar.gz
gdb-732f6a935c88164b258505f7b10091bafa6bf877.tar.bz2
gdb
* c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING. (c_printstr): Likewise. * charset.c: Include gdb_wait.h. (make_wchar_iterator): Use INTERMEDIATE_ENCODING. (find_charset_names): Use pexecute. Handle libiconv's output. Detect errors. (_initialize_charset): Use xstrdup. * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar cases. (INTERMEDIATE_ENCODING): New define. * configure, config.in: Rebuild. * configure.ac: Check for btowc. gdb/doc * gdb.texinfo (Character Sets): Document default character set.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 86de933..027e9b2 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -296,7 +296,7 @@ c_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
obstack_init (&output);
make_cleanup_obstack_free (&output);
- convert_between_encodings ("wchar_t", host_charset (),
+ convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
1, &output, translit_char);
@@ -562,7 +562,7 @@ c_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
obstack_init (&output);
make_cleanup_obstack_free (&output);
- convert_between_encodings ("wchar_t", host_charset (),
+ convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
1, &output, translit_char);