Hello Bruno,
the duplocale() is new to AIX 7BETA.

The AIX 7BETA does not contain all locales, so it could be possible that
this fails.

Bruno Haible wrote:
> Hello Rainer,
>
> Regarding this test failure:
>
>   test-duplocale.c:70: assertion failed
>   FAIL: test-duplocale
>
> What does the following test program print?
>
> ===============================================================================
> #define _GNU_SOURCE
> #define _ALL_SOURCE
> #include <locale.h>
> #include <errno.h>
> #include <stdio.h>
>
> int main ()
> {
>   int i;
>   for (i = 0; i < 3; i++)
>     {
>       if (i == 1)
>         setlocale (LC_ALL, "en_US.UTF-8");
>       if (i == 2)
>         {
>           setlocale (LC_NUMERIC, "de_DE.UTF-8");
>           setlocale (LC_TIME, "fr_FR.UTF-8");
>         }
>       {
>         locale_t l = duplocale (LC_GLOBAL_LOCALE);
>         if (l != 0)
>           fprintf (stderr, "i = %d: OK\n", i);
>         else
>           {
>             int err = errno;
>             fprintf (stderr, "i = %d: errno = %d\n", i, err);
>             errno = err; perror ("");
>           }
>       }
>     }
>   return 0;
> }
> ===============================================================================
>
>   

# ./a.out
i = 0: errno = 22
Invalid argument
i = 1: errno = 22
Invalid argument
i = 2: errno = 22
Invalid argument

> Bruno
>
>
>   
Bye
  Rainer


Reply via email to