LC_MESSAGES is undefined on BSD/OS

VERIFIED FIXED in M5

Status

()

Core
Internationalization
P3
major
VERIFIED FIXED
19 years ago
6 years ago

People

(Reporter: Brian Ostrom, Assigned: tague)

Tracking

Trunk
x86
BSDI
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
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
(Reporter)

Updated

19 years ago
Target Milestone: M5
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

19 years ago
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
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

19 years ago
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.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 3

6 years ago
(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.