Fix phony_iconv wide character support.
authorSandra Loosemore <sandra@codesourcery.com>
Fri, 15 Jan 2016 22:45:19 +0000 (14:45 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Fri, 15 Jan 2016 22:45:19 +0000 (14:45 -0800)
commitf74f61cbf72dc158832d81d6ecd6f970f93798cc
tree411d749a2f583e9c0dc89da556a6e4bae0fbedc1
parent71ef29a86b252a4780517fc9b2bf9f7d3dd2d991
Fix phony_iconv wide character support.

2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>

gdb/
* charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
Conditionalize for Windows host.
(GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
(GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
(phony_iconv_open): Handle both UTF-32 endiannesses.
(phony_iconv): Likewise.  Check for output overflow and clean up
out-of-input cases.  Correct adjustment to input buffer pointer.
(set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
phony_iconv_open.
gdb/ChangeLog
gdb/charset.c