History log of /haiku/src/system/libroot/posix/locale/setlocale.cpp
Revision Date Author Comments
# d338200e 30-May-2022 Trung Nguyen <trungnt282910@gmail.com>

libs/posix: Implemented new locale functions

Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 8fd51c08 24-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Use ErrnoMaintainer in setlocale() to protect errno.

* this avoids spurious errno changes leaking into application code,
which could become confused - i.e. 'rm' on a gcc4 build would always
prompt for confirmation

I spend a couple of hours hunting down the behavioural difference
between gcc2- and gcc4-builds and it turns out that the reason for that
is that gcc4's libstdc++-code initializes its own locale data via the
POSIX calls, which trigger (correct) errno value changes, which were the
ones leaking into application code.


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc981208 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* replace use of strcmp with strcasecmp, as locale names are supposed to be
case insensitive

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f66598 23-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated posix-locale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3aeed6607cd07762c0e709633c012b3a632dbad9 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 8fd51c08197d5acd9ff3c63aaed4772512bb8310 24-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Use ErrnoMaintainer in setlocale() to protect errno.

* this avoids spurious errno changes leaking into application code,
which could become confused - i.e. 'rm' on a gcc4 build would always
prompt for confirmation

I spend a couple of hours hunting down the behavioural difference
between gcc2- and gcc4-builds and it turns out that the reason for that
is that gcc4's libstdc++-code initializes its own locale data via the
POSIX calls, which trigger (correct) errno value changes, which were the
ones leaking into application code.


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc981208fa1d2253fe7a2ac71792cd3aa60bd958 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* replace use of strcmp with strcasecmp, as locale names are supposed to be
case insensitive

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37735 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f665982e2e078ba42e7bf941bd5f3dd8989c55 23-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated posix-locale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96