[Top][All Lists]

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

gettext-0.16.1 - 'Duplicate case' caused by SUBLANG_XXX constants

From: John Brown
Subject: gettext-0.16.1 - 'Duplicate case' caused by SUBLANG_XXX constants
Date: Sat, 28 Jul 2007 13:39:39 -0400

Hello All,

I got 'duplicate case' errors when compiling gettext-0.16.1 on
Windows with MingW and MSYS.

The following table summarizes the discrepancies between
MSDN and localenames.c

SUBLANG ID                      MSDN      localenames.c

SUBLANG_BENGALI_INDIA           0x01            0x00
SUBLANG_BENGALI_BANGLADESH      N/A             0x01

SUBLANG_PUNJABI_INDIA           0x01            0x00
SUBLANG_PUNJABI_PAKISTAN        N/A             0x01

SUBLANG_ROMANIAN_ROMANIA        0x01            0x00
SUBLANG_ROMANIAN_MOLDOVA        N/A             0x01

For example, SUBLANG_BENGALI_INDIA is #defined on Windows,
but SUBLANG_BENGALI_BANGLADESH is not, so localenames.c
#defines it as 0x01, which is the same as SUBLANG_BENGALI_INDIA.

I worked around it by adding definitions of the missing SUBLANG
identifiers to /mingw/include/winnt.h with the value 0x02.
However, since winnt.h agrees with MSDN (see
http://msdn2.microsoft.com/en-us/library/ms776294.aspx), I think that
the correct solution is to change gettext to match MSDN, i.e.,

1) the values for BENGALI, PUNJABI, and ROMANIAN should be the same
   as those in MSDN

2) Identifiers not in MSDN should not be defined in gettext when
   compiling on Windows.


reply via email to

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