summaryrefslogtreecommitdiff
path: root/lib/time_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/time_r.c')
-rw-r--r--lib/time_r.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/time_r.c b/lib/time_r.c
index 3ef0b36802c..b724f3b38de 100644
--- a/lib/time_r.c
+++ b/lib/time_r.c
@@ -21,6 +21,11 @@
#include <time.h>
+/* The replacement functions in this file are only used on native Windows.
+ They are multithread-safe, because the gmtime() and localtime() functions
+ on native Windows — both in the ucrt and in the older MSVCRT — return a
+ pointer to a 'struct tm' in thread-local memory. */
+
static struct tm *
copy_tm_result (struct tm *dest, struct tm const *src)
{