stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: FW: 17116,756,000
Date Tue, 08 Aug 2006 21:34:36 GMT
Nicole Willson wrote:
> Ok, in the messages.cpp test, the test_use_nls_path works fine, but the
> stress test fails.

How does it fail? (Error messages, stack trace, ...) I get an
abort with xlC but not with gcc on the same machine (the stack
trace is attached). The test craps out long before it ever gets
to stress_test. This is  the same problem with exceptions that
we talked about some time ago and that someone still needs to
get to the bottom of.

> According to IBM, this is because the NLSPATH
> environment variable needs to be set and setlocale must be called.

AFAICS, NLSPATH is set in test_use_nls_path and stays set for
the remainder of the lifetime of the test (which includes the
stress_test function).

> Stress_test does not set the absolute path, but seems to set the locale.
> My question is: since test_use_nls_path is called before stress_test, is
> it expected that the NLSPATH variable will still be in the environment?

Yes. AFAICT, the test does nothing to remove it from the
environment so it should still be there.

[...]
> Regarding pmr 17116,756, if the catalog file name referred to by the
> CatalogName parameter contains a leading / (slash), it is assumed to be
> an absolute path name. If the catalog file name is not an absolute path
> name, the user environment determines which directory paths to search.
> The NLSPATH environment variable defines the directory search path. When
> this variable is used, the setlocale subroutine must be called before
> the catopen subroutine.

I don't think the last sentence is correct. I certainly don't see
any such requirement in POSIX or on the Linux catopen() man page.
Also, I don't see any assumptions about this in the GNU catopen
sources (catopen() calls setlocale(LC_MESSAGES, 0) when the flag
is set to NL_CAT_LOCALE but only to retrieve the setting of the
LC_MESSAGES variable).

See http://tinyurl.com/s9mke and http://tinyurl.com/s9mke.

Martin

> 
> John Carver                           Phone:  512-823-9076
> jcarver@austin.ibm.com
> IBM Server Group                        (t/l 793-9076)
> ISV Technical Programs
> jcarver@austin.ibm.com
> 


Mime
View raw message