diff options
author | Pierre Muller <muller@sourceware.org> | 2011-04-21 14:26:38 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2011-04-21 14:26:38 +0000 |
commit | bcb28afc532c6defc36fd52db211f3a785a8a6ef (patch) | |
tree | 21e6e1cf639d937d7b8810b1724d67ed4d33fa80 /gdb/gdb_wchar.h | |
parent | 9165b2bff2916b808c29501af6a7f0b48ab794b8 (diff) | |
download | gdb-bcb28afc532c6defc36fd52db211f3a785a8a6ef.zip gdb-bcb28afc532c6defc36fd52db211f3a785a8a6ef.tar.gz gdb-bcb28afc532c6defc36fd52db211f3a785a8a6ef.tar.bz2 |
* gdb_wchar.h (USE_INTERMEDIATE_ENCODING_FUNCTION): New macro.
(INTERMEDIATE_ENCODING): Change value to intermediate_encoding
function call if __STDC_ISO_10646__ macro is defined.
(intermediate_encoding): New prototype.
* charset.c (your_gdb_wchar_t_is_bogus): New extern test variable
to generate compile time error for unsupported gdb_wchar_t size.
(ENDIAN_SUFFIX): New macro.
(intermediate_encoding): New function.
Diffstat (limited to 'gdb/gdb_wchar.h')
-rw-r--r-- | gdb/gdb_wchar.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/gdb_wchar.h b/gdb/gdb_wchar.h index 4c1b795..daf64ba 100644 --- a/gdb/gdb_wchar.h +++ b/gdb/gdb_wchar.h @@ -78,11 +78,10 @@ typedef wint_t gdb_wint_t; iconv_open. We put the endianness into the encoding name to avoid hosts that emit a BOM when the unadorned name is used. */ #if defined (__STDC_ISO_10646__) -#if WORDS_BIGENDIAN -#define INTERMEDIATE_ENCODING "UCS-4BE" -#else -#define INTERMEDIATE_ENCODING "UCS-4LE" -#endif +#define USE_INTERMEDIATE_ENCODING_FUNCTION +#define INTERMEDIATE_ENCODING intermediate_encoding () +const char *intermediate_encoding (void); + #elif defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108 #define INTERMEDIATE_ENCODING "wchar_t" #else |