.locale.c: Better emulate POSIX locale setting on Windows
authorKarl Williamson <public@khwilliamson.com>
Wed, 19 Feb 2014 21:55:29 +0000 (14:55 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 19 Feb 2014 22:07:36 +0000 (15:07 -0700)
commit89f7b9aac23a02ff8140b277b76eb7a70b0b04cc
tree254cace89b2a0458c1f6c69282299afded2e1281
parent63baef57e83f77e202ae14ef902a6615cf69c8a2
.locale.c: Better emulate POSIX locale setting on Windows

Commit b385bb4ddcb252e69a1044d702646741e2e489fb introduced
my_setlocale() compiled only under Windows which emulates the POSIX
rules for setting the locale.  It differs from Windows only if the
locale passed in is "".  Unfortunately it was buggy if the category
being set was LC_ALL, and there is a LANG environment variable.  LANG
has lower precedence than the other environment variables, like
LC_NUMERIC, but my_setlocale() was giving it higher priority when set
through LC_ALL.

This should solve the problems being seen since
7cd8b56846670e577e1f62479eab8f38fb11da14
locale.c