> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 27, 2007 6:09 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: thread safety tests on Windows
> 
> Farid Zaripov wrote:
> >> -----Original Message-----
> >> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin 
> >> Sebor
> >> Sent: Saturday, August 25, 2007 10:42 PM
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: thread safety tests on Windows
> >>
> >> Travis Vitek wrote:
> >>> I wonder if this is related to the rw_locales() issue on windows 
> >>> systems? Those locale tests significantly longer with 32
> >> locales than
> >>> they do with just "C" locale.
> >> What is this issue? Don't we have locales installed on all 
> machines?
> >> Or is there a problem with rw_locale() on Windows?
> > 
> >   By default generate.wsf script doesn't generates the projects for 
> > build locales.
> > To build locale database /LOCALES:yes option should be specified.
> 
> That shouldn't be a problem as long as the utilities are 
> there (which they should be). On Windows rw_locales() invokes 
> the BUILDDIR/bin/locale utility to obtain the list of the 
> native Windows locales installed on the machine.

  Below is the function to obtain list of installed locales. It just
returns "C" +
list of files/directories in RWSTD_LOCALE_ROOT directory (if it's
defined).

#if _RWSTD_PATH_SEP == '/'
#  define SLASH      "/"
#  define LS_1       "ls -1 "
#else
#  define SLASH      "\\"
#  define LS_1       "dir /B "
#endif

// print the available locales
static void
print_locale_names ()
{
    std::cout << "C\n";

    const char* const locale_root = std::getenv ("RWSTD_LOCALE_ROOT");

    if (0 != locale_root) {
        const std::string cmd = std::string (LS_1) + locale_root;

        std::system (cmd.c_str ());
    }
}

Farid.

Reply via email to