This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] setlocale(LC_ALL) vs setlocale(LC_NUMERIC)


Hi,

in order to fix (in 3_4-branch, at least), PR19642, I'd like to know whether we
can assume the below to succeed in "most" libc implementations: seems the
case for glibc, but don't believe it's C standard mandated behavr:


 char* save = setlocale(LC_ALL, "de_DE");
 assert( !save || !strcmp(setlocale(LC_NUMERIC, NULL), "de_DE"));

assuming, of course, setlocale(LC_NUMERIC, NULL) returns something
like "de_DE", or "C", and so on, we can test at the outset for that.

Thanks in advance for any help/pointer,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]