aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-08 15:11:21 -0800
committerJunio C Hamano <gitster@pobox.com>2020-12-08 15:11:21 -0800
commitd53feb5134c548cbb78a62edcc38e6b239aa8e3d (patch)
tree4b94ed947af6313557e1ec47bc7509c1ca3ee96a
parentMerge branch 'tb/bugreport-no-localtime' (diff)
parentbanned.h: mark ctime_r() and asctime_r() as banned (diff)
downloadgit-d53feb5134c548cbb78a62edcc38e6b239aa8e3d.tar.gz
git-d53feb5134c548cbb78a62edcc38e6b239aa8e3d.zip
Merge branch 'jk/banned'
Non-reentrant time-related library functions and ctime/asctime with awkward calling interfaces are banned from the codebase. * jk/banned: banned.h: mark ctime_r() and asctime_r() as banned banned.h: mark non-reentrant gmtime, etc as banned
-rw-r--r--banned.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/banned.h b/banned.h
index 60a18d4403..7ab4f2e492 100644
--- a/banned.h
+++ b/banned.h
@@ -29,4 +29,17 @@
#define vsprintf(buf,fmt,arg) BANNED(vsprintf)
#endif
+#undef gmtime
+#define gmtime(t) BANNED(gmtime)
+#undef localtime
+#define localtime(t) BANNED(localtime)
+#undef ctime
+#define ctime(t) BANNED(ctime)
+#undef ctime_r
+#define ctime_r(t, buf) BANNED(ctime_r)
+#undef asctime
+#define asctime(t) BANNED(asctime)
+#undef asctime_r
+#define asctime_r(t, buf) BANNED(asctime_r)
+
#endif /* BANNED_H */