bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iconv test on AIX 7.1BETA


From: Rainer Tammer
Subject: Re: iconv test on AIX 7.1BETA
Date: Sat, 31 Jul 2010 08:26:09 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Bruno,

Bruno Haible wrote:
> Hello Rainer,
>
> The logs say:
>
>   test-iconv.c:81: assertion failed
>   FAIL: test-iconv
>
> Can you please compile and run the following program, and show the output?
>
> ===============================================================================
> #include <iconv.h>
> #include <errno.h>
> #include <stdio.h>
>
> int main ()
> {
>   iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
>   if (cd_88591_to_utf8 == (iconv_t)(-1)) return 1;
>   {
>     static const char input[] = "\304";
>     static char buf[2] = { (char)0xDE, (char)0xAD };
>     const char *inptr = input;
>     size_t inbytesleft = 1;
>     char *outptr = buf;
>     size_t outbytesleft = 1;
>     size_t res = iconv (cd_88591_to_utf8,
>                         (char **) &inptr, &inbytesleft,
>                         &outptr, &outbytesleft);
>     if (res == (size_t)(-1))
>       {
>         int err = errno;
>         fprintf (stderr, "errno = %d\n", err);
>         errno = err;
>         perror ("");
>       }
>     else
>       {
>         printf ("res = %lu\n", (unsigned long) res);
>       }
>     return 0;
>   }
> }
> ===============================================================================
>
>
>   

AIX 5.3 Technology Level 8:

# ./a.out
errno = 7
Arg list too long

AIX 6.1 Technology Level 4:

# xlc testme.c -liconv
# ./a.out
res = 0

AIX 7.1BETA

# ./a.out
res = 0


bye
  Rainer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]