newlocale(3): Add compat support for c++ runtime libs.
authorzrj <rimvydas.jasinskas@gmail.com>
Fri, 29 Dec 2017 13:51:32 +0000 (15:51 +0200)
committerzrj <zrj@dragonflybsd.org>
Fri, 29 Dec 2017 14:47:03 +0000 (16:47 +0200)
commita0507d3de8b67921ce3900dfa057f589ec6140a9
treec7ecb58029716fe563afb7b31f27b40c0b36abd0
parent8720959f5af55eff1a9524b70f0c853ab46e5422
newlocale(3): Add compat support for c++ runtime libs.

Implement simple 'private' env support that mimics the internal
__get_locale_env(). Not to be used in a context of C.

While there, fix off by one in array index (_LC_LAST vs XLC_LAST).
lib/libc/locale/setlocale.c
lib/libc/locale/xlocale.c