Closed Bug 5678 Opened 25 years ago Closed 25 years ago

LC_MESSAGES is undefined on BSD/OS

Categories

(Core :: Internationalization, defect, P3)

x86
BSDI
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: briano, Assigned: tague)

Details

LC_MESSAGES does not exist on BSDI BSD/OS 3.1 (and a few other BSD-based
operating systems), so its use in nsLocaleFactory.cpp breaks the build.
This is more of a "cross-platform coding issue" than a build breakage,
and needs to be addressed ASAP.

shlicc2 -o nsLocaleFactory.o -c   -fno-rtti -fno-handle-exceptions -Wall
-include ../../../config-defs.h -g   -DDEBUG -UNDEBUG -DDEBUG_cltbld -DTRACING
-DOSTYPE=\"BSD_OS3.1\" -DSingleSignon -DCookieManagement -DClientWallet
-I../../../dist/./include -I../../../dist/include -I../../../../include
-I/builds/tinderbox/SeaMonkey/nspr/include -I../../../dist/./public/jpeg
-I../../../dist/./public/png   -I/usr/X11/include
../../../../intl/locale/src/nsLocaleFactory.cpp
../../../../intl/locale/src/nsLocaleFactory.cpp:70: `LC_MESSAGES' was not
declared in this scope
../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
nsLocaleFactory::CreateInstance(class nsISupports *, const struct nsID &, void
**)':
../../../../intl/locale/src/nsLocaleFactory.cpp:132: warning: unused parameter
`class nsISupports * aOuter'
../../../../intl/locale/src/nsLocaleFactory.cpp:132: warning: unused parameter
`const struct nsID & aIID'
../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
nsLocaleFactory::LockFactory(int)':
../../../../intl/locale/src/nsLocaleFactory.cpp:142: warning: unused parameter
`int aBool'
../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
nsLocaleFactory::GetSystemLocale(class nsILocale **)':
../../../../intl/locale/src/nsLocaleFactory.cpp:255: warning: unused variable
`char * tempvalue'
../../../../intl/locale/src/nsLocaleFactory.cpp:191: warning: unused variable
`class nsString * systemLocaleName'
../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
nsLocaleFactory::GetApplicationLocale(class nsILocale **)':
../../../../intl/locale/src/nsLocaleFactory.cpp:323: warning: unused variable
`class nsString * applicationLocaleName'
gmake[3]: *** [nsLocaleFactory.o] Error 1
gmake[3]: Leaving directory
`/usr/builds/tinderbox/SeaMonkey/BSD_OS_3.1_clobber/mozilla/obj-i386-pc-bsdi3.1/intl/locale/src'
gmake[2]: *** [libs] Error 2
Target Milestone: M5
Status: NEW → ASSIGNED
I have a fix for this which is ready to commit.

The fix involves the following :-

(a) add an additional test to configure.in to test for the existence of
LC_MESSAGES
(b) add an #ifdef in intl/locale/src/nsLocaleFactory.cpp around the occurance of
LC_MESSAGES in that file, replacing it with LC_CTYPE (which has to exist) if
LC_MESSAGES doesn't exist on the platform
(c)the values of LC_MESSAGES is assigned to an XP_LC_MESSAGES value.  for
platforms which don't have LC_MESSAGES, we do a best guess approach and look at
the value of LC_CTYPE (which must exist).  If LC_ALL or LANG overrides are set,
then those values are used instead (as they would be on platforms w/
LC_MESSAGES)

tested: the fix has been tested on linux using the nsLocaleTest unit tests, i'll
also test it on BSD/OS 3.1 when brinao gets me an access

Risk level : low risk bug fix
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Checked in a fix today.  It was approved at today's bug review meeting.  leaf
and briano reviewed the fix.

QA can verify this by checking the BSD/OS tinderbox page.
Status: RESOLVED → VERIFIED
(In reply to Brian Ostrom from comment #0)
> LC_MESSAGES does not exist on BSDI BSD/OS 3.1 (and a few other BSD-based
> operating systems), so its use in nsLocaleFactory.cpp breaks the build.
> This is more of a "cross-platform coding issue" than a build breakage,
> and needs to be addressed ASAP.
> 
> shlicc2 -o nsLocaleFactory.o -c   -fno-rtti -fno-handle-exceptions -Wall
> -include ../../../config-defs.h -g   -DDEBUG -UNDEBUG -DDEBUG_cltbld
> -DTRACING
> -DOSTYPE=\"BSD_OS3.1\" -DSingleSignon -DCookieManagement -DClientWallet
> -I../../../dist/./include -I../../../dist/include -I../../../../include
> -I/builds/tinderbox/SeaMonkey/nspr/include -I../../../dist/./public/jpeg
> -I../../../dist/./public/png   -I/usr/X11/include
> ../../../../intl/locale/src/nsLocaleFactory.cpp
> ../../../../intl/locale/src/nsLocaleFactory.cpp:70: `LC_MESSAGES' was not
> declared in this scope
> ../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
> nsLocaleFactory::CreateInstance(class nsISupports *, const struct nsID &,
> void
> **)':
> ../../../../intl/locale/src/nsLocaleFactory.cpp:132: warning: unused
> parameter
> `class nsISupports * aOuter'
> ../../../../intl/locale/src/nsLocaleFactory.cpp:132: warning: unused
> parameter
> `const struct nsID & aIID'
> ../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
> nsLocaleFactory::LockFactory(int)':
> ../../../../intl/locale/src/nsLocaleFactory.cpp:142: warning: unused
> parameter
> `int aBool'
> ../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
> nsLocaleFactory::GetSystemLocale(class nsILocale **)':
> ../../../../intl/locale/src/nsLocaleFactory.cpp:255: warning: unused variable
> `char * tempvalue'
> ../../../../intl/locale/src/nsLocaleFactory.cpp:191: warning: unused variable
> `class nsString * systemLocaleName'
> ../../../../intl/locale/src/nsLocaleFactory.cpp: In method `unsigned int
> nsLocaleFactory::GetApplicationLocale(class nsILocale **)':
> ../../../../intl/locale/src/nsLocaleFactory.cpp:323: warning: unused variable
> `class nsString * applicationLocaleName'
> gmake[3]: *** [nsLocaleFactory.o] Error 1
> gmake[3]: Leaving directory
> `/usr/builds/tinderbox/SeaMonkey/BSD_OS_3.1_clobber/mozilla/obj-i386-pc-
> bsdi3.1/intl/locale/src'
> gmake[2]: *** [libs] Error 2

sample
You need to log in before you can comment on or make changes to this bug.