bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: BUG: gettext: gettext-runtime compile error


From: Bruno Haible
Subject: Re: BUG: gettext: gettext-runtime compile error
Date: Thu, 17 Apr 2008 04:29:33 +0200
User-agent: KMail/1.5.4

Hello,

Daniel Bergström wrote:
> When compiling gettext on a Windows XP platform with MS VC++ 2008 the 
> following error message was reported:
> 
>     localename.c(1390) : error C2196: case value '2' already used
> 
> After some investegation it turned out that in the file
> 
>     C:\Program\Microsoft SDKs\Windows\v6.0A\include\winnt.h(1460)
> 
> The SUBLANG_SINDHI_PAKISTAN and SUBLANG_SINDHI_AFGHANISTAN were
> defined to the same value:
> 
> #define SUBLANG_SINDHI_INDIA                        0x01    // Sindhi 
> (India) reserved 0x0459
> #define SUBLANG_SINDHI_PAKISTAN               0x02    // Sindhi 
> (Pakistan) reserved 0x0859
> #define SUBLANG_SINDHI_AFGHANISTAN       0x02    // For app 
> compatibility only

Thank you for the report and this analysis! I'm applying the fix below.

> However, they are defined in the documentation to be of the value 0x01 
> and 0x02, see also
> http://msdn2.microsoft.com/en-us/library/ms776294.aspx

This doc must be a bit older than the current state, which is documented in

  http://www.microsoft.com/globaldev/reference/lcid-all.mspx

According to www.ethnologue.com, Sindhi is mostly spoken in India, but
also in Pakistan. The older locale list from Microsoft, where Sindhi locales
were provided for Pakistan and Afghanistan but not for India, was apparently
buggy.

Bruno


2008-04-16  Bruno Haible  <address@hidden>

        * localename.c (SUBLANG_SINDHI_INDIA): New macro.
        (SUBLANG_SINDHI_PAKISTAN): Change value from 1 to 2.
        (gl_locale_name_from_win32_LANGID): Fix code for Sindhi.
        Reported by Daniel Bergström <address@hidden>.

*** localename.c        26 Dec 2007 16:07:05 -0000      1.20
--- localename.c        17 Apr 2008 02:28:24 -0000
***************
*** 1,5 ****
  /* Determine name of the currently selected locale.
!    Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify it
     under the terms of the GNU Library General Public License as published
--- 1,5 ----
  /* Determine name of the currently selected locale.
!    Copyright (C) 1995-1999, 2000-2008 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify it
     under the terms of the GNU Library General Public License as published
***************
*** 612,620 ****
  # ifndef SUBLANG_SERBIAN_CYRILLIC
  # define SUBLANG_SERBIAN_CYRILLIC 0x03
  # endif
! # ifndef SUBLANG_SINDHI_PAKISTAN
! # define SUBLANG_SINDHI_PAKISTAN 0x01
  # endif
  # ifndef SUBLANG_SINDHI_AFGHANISTAN
  # define SUBLANG_SINDHI_AFGHANISTAN 0x02
  # endif
--- 612,622 ----
  # ifndef SUBLANG_SERBIAN_CYRILLIC
  # define SUBLANG_SERBIAN_CYRILLIC 0x03
  # endif
! # ifndef SUBLANG_SINDHI_INDIA
! # define SUBLANG_SINDHI_INDIA 0x01
  # endif
+ # undef SUBLANG_SINDHI_PAKISTAN
+ # define SUBLANG_SINDHI_PAKISTAN 0x02
  # ifndef SUBLANG_SINDHI_AFGHANISTAN
  # define SUBLANG_SINDHI_AFGHANISTAN 0x02
  # endif
***************
*** 1338,1345 ****
        case LANG_SINDHI:
        switch (sub)
          {
          case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
!         case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";
          }
        return "sd";
        case LANG_SINHALESE: return "si_LK";
--- 1340,1348 ----
        case LANG_SINDHI:
        switch (sub)
          {
+         case SUBLANG_SINDHI_INDIA: return "sd_IN";
          case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
!         /*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/
          }
        return "sd";
        case LANG_SINHALESE: return "si_LK";





reply via email to

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