diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-25 06:13:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:47 -0500 |
commit | 5e3ce331880404587eb4d88e314c7cb332da6e33 (patch) | |
tree | 44924763403c5aab321afef4da54a7ed1b80215a /source4/torture | |
parent | 3284fe857153819f0b51062b728609f73cd49a5a (diff) | |
download | samba-5e3ce331880404587eb4d88e314c7cb332da6e33.tar.gz samba-5e3ce331880404587eb4d88e314c7cb332da6e33.tar.bz2 samba-5e3ce331880404587eb4d88e314c7cb332da6e33.zip |
r7901: check if system supports UTF-16LE at all in LOCAL-ICONV test
(This used to be commit aa9e7cf63a0e5ce7c9b7d121a4df064cd6fae90f)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/local/iconv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c index e61d3348eb..9aa678995b 100644 --- a/source4/torture/local/iconv.c +++ b/source4/torture/local/iconv.c @@ -315,8 +315,16 @@ BOOL torture_local_iconv(void) unsigned char inbuf[1000]; int ok = 1; unsigned int codepoint, i, c; + static iconv_t cd; + + srandom(time(NULL)); - srandom(time(NULL)); + cd = iconv_open("UTF-16LE", "UCS-4LE"); + if (cd == (iconv_t)-1) { + printf("unable to test - system iconv library does not support UTF-16LE -> UCS-4LE\n"); + return True; + } + iconv_close(cd); printf("Testing next_codepoint()\n"); for (codepoint=0;ok && codepoint<(1<<20);codepoint++) { |