C time.h localtime
bearbeitet von
Hallo pl,
in der [Doku von GCC LIBC](https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html#Broken_002ddown-Time) steht:
> Using the localtime function is a big problem in multi-threaded programs. The result is returned in a static buffer and this is used in all threads. POSIX.1c introduced a variant of this function.
Und dahinter stehen die `localtime_r` und `gmtime_r` Funktionen, die mit einem von Dir übergebenen Buffer statt dem statischen Buffer arbeitet.
Welchen C-Compiler nutzt Du? Bietet der auch sowas?
_Rolf_
--
sumpsi - posui - clusi