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

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

BUG: gettext: gettext-runtime compile error


From: Daniel Bergström
Subject: BUG: gettext: gettext-runtime compile error
Date: Tue, 15 Apr 2008 20:40:43 +0200
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Hello!

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

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

An easy solution would be to check if the defines in question are equal:

#if SUBLANG_SINDHI_PAKISTAN != SUBLANG_SINDHI_AFGHANISTAN
     case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";
#endif

I also noted that SUBLANG_SINDHI_INDIA was not representated in the LANG_SINDHI case.

Best Regards,
Daniel




reply via email to

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