bug-gnulib
[Top][All Lists]
Advanced

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

duplocale test on AIX 7.1BETA


From: Bruno Haible
Subject: duplocale test on AIX 7.1BETA
Date: Sat, 31 Jul 2010 01:09:32 +0200
User-agent: KMail/1.9.9

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;
}
===============================================================================

Bruno



reply via email to

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