History log of /haiku/src/system/libroot/posix/time/localtime.cpp
Revision Date Author Comments
# a8e2f088 30-Aug-2023 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Replace the old localtime fallback backend with musl code.

This allows for the deletion of quite a lot of ugly C89 code.


# 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>


# c1e6e51a 20-Feb-2021 Jérôme Duval <jerome.duval@gmail.com>

libroot: implement timegm calling the ICU backend

Change-Id: Ib4de4288e061670acbc2edea3671cee029305d33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3748
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 51bce887 23-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix behaviour of localtime(), gmtime() and mktime().

* In case the locale backend could not be loaded, these functions (and
their reentrant counterparts) just returned an error. So we reactivate
parts of the BSD-/Olson-implementation in localtime_fading_out.c in
order to use them as fallback.
* Cleanup localtime_fading_out.c (remove a lot of unused cruft).


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

Introduce __set_errno() throughout libroot.

* add errno_private.h, which defines the __set_errno() macro with
and without tracing
* instead of setting errno manually, all libroot's code now invokes
__set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version


# 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


# de2e54ac 12-Nov-2010 Oliver Tappe <zooey@hirschkaefer.de>

Adjust tzset() implementation to better follow the POSIX specs and
make some more perl tests happy.
* no longer expect a ICU timezone ID in the TZ environment variable,
but only expect this format if the TZ-value is starting with ':'
* accept "standard" TZ-values like "EST5" (of which only "EST" is
relevant to us) - if such a value is specified, we hardcode the
timezone name to the given value, no matter how ICU calls it
* adjust tests accordingly


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


# dbe1e23a 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


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


# 560b10ff 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Implement tzset(), gmtime(), localtime() and mktime() on top of ICU
* no longer keep a separate time-backend, since the implementation needs to
access (data of) the locale backend anyway
* moved more stuff from localtime_fading_out.c to localtime.cpp
* added respective tests to locale_test
* added two more tests copied from glibc, test_time.c and tst-mktime.c


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


# 562ccb03 05-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* introduced stubbed TimeBackend to libroot, which will contain implementations
of localtime(), gmtime() and mktime()
* implemented tzset() to read the required info from libroot_timezone_info

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


# 51bce887cd38b778c88e083c2d7ec21203caccfa 23-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix behaviour of localtime(), gmtime() and mktime().

* In case the locale backend could not be loaded, these functions (and
their reentrant counterparts) just returned an error. So we reactivate
parts of the BSD-/Olson-implementation in localtime_fading_out.c in
order to use them as fallback.
* Cleanup localtime_fading_out.c (remove a lot of unused cruft).


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

Introduce __set_errno() throughout libroot.

* add errno_private.h, which defines the __set_errno() macro with
and without tracing
* instead of setting errno manually, all libroot's code now invokes
__set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version


# 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


# de2e54ace0213b150fb13d9b740e92f4c1433a06 12-Nov-2010 Oliver Tappe <zooey@hirschkaefer.de>

Adjust tzset() implementation to better follow the POSIX specs and
make some more perl tests happy.
* no longer expect a ICU timezone ID in the TZ environment variable,
but only expect this format if the TZ-value is starting with ':'
* accept "standard" TZ-values like "EST5" (of which only "EST" is
relevant to us) - if such a value is specified, we hardcode the
timezone name to the given value, no matter how ICU calls it
* adjust tests accordingly


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


# dbe1e23aa87ced2603074f6e4eaca2c4d99cf971 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


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


# 560b10ff88d306ac6e6f8f76eafc61df94f941d6 16-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Implement tzset(), gmtime(), localtime() and mktime() on top of ICU
* no longer keep a separate time-backend, since the implementation needs to
access (data of) the locale backend anyway
* moved more stuff from localtime_fading_out.c to localtime.cpp
* added respective tests to locale_test
* added two more tests copied from glibc, test_time.c and tst-mktime.c


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


# 562ccb03cc5713fd42e3bc14bb278a2285fe91e9 05-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* introduced stubbed TimeBackend to libroot, which will contain implementations
of localtime(), gmtime() and mktime()
* implemented tzset() to read the required info from libroot_timezone_info

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