bug-gnulib
[Top][All Lists]
Advanced

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

m4/locale-fr.m4: workaround NetBSD bug


From: Bruno Haible
Subject: m4/locale-fr.m4: workaround NetBSD bug
Date: Tue, 20 Mar 2007 01:44:03 +0100
User-agent: KMail/1.5.4

Some of the *printf-posix tests fail on NetBSD, because NetBSD pretends
to have a french locale (fr_FR.ISO8859-1). But it has a wrong decimal-point
character, so is unusable for the tests.

2007-03-17  Bruno Haible  <address@hidden>

        * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
        locale's decimal-point character.

*** m4/locale-fr.m4     12 Feb 2007 23:39:41 -0000      1.2
--- m4/locale-fr.m4     18 Mar 2007 00:00:08 -0000
***************
*** 1,4 ****
! # locale-fr.m4 serial 4 (gettext-0.16.2)
  dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # locale-fr.m4 serial 5 (gettext-0.16.2)
  dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 53,58 ****
--- 53,62 ----
       one byte long. This excludes the UTF-8 encoding.  */
    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
    if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+   /* Check whether the decimal separator is a comma.
+      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+      are nl_langinfo(RADIXCHAR) are both ".".  */
+   if (localeconv () ->decimal_point[0] != '.') return 1;
    return 0;
  }
  changequote([,])dnl
***************
*** 137,142 ****
--- 141,150 ----
        || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
      return 1;
  #endif
+   /* Check whether the decimal separator is a comma.
+      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+      are nl_langinfo(RADIXCHAR) are both ".".  */
+   if (localeconv () ->decimal_point[0] != '.') return 1;
    return 0;
  }
  changequote([,])dnl





reply via email to

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