|
|
|
|
|
by pascal_cuoq
2264 days ago
|
|
Both question would get better answers if they were asked to a panel of experts on POSIX (which could including members of the POSIX standardization committee). For the first one, I can attempt a guess: maybe it was feared that making the result of localtime thread-locale would break some programs? You could build such a program on purpose, although I am not clear how frequently one would write one by accident. Anyway, localtime_r is the function that one should use if one is concerned by thread-safety. A more likely answer is that no Unix implementation bothered to fix localtime because the proper fix was for programs to call localtime_r. |
|