From 802ff8866ef09a8715bf2a64784167e108ff718c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 28 Aug 2018 07:36:48 -0700 Subject: [PATCH] Fix compilation of time.h when localtime_t is a macro (#843) --- include/fmt/time.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/fmt/time.h b/include/fmt/time.h index 515452a4..a624058f 100644 --- a/include/fmt/time.h +++ b/include/fmt/time.h @@ -13,8 +13,12 @@ FMT_BEGIN_NAMESPACE +// Prevents expansion of a preceding token as a function-style macro. +// Usage: f FMT_NOMACRO() +#define FMT_NOMACRO + namespace internal{ -inline null<> localtime_r(...) { return null<>(); } +inline null<> localtime_r FMT_NOMACRO(...) { return null<>(); } inline null<> localtime_s(...) { return null<>(); } inline null<> gmtime_r(...) { return null<>(); } inline null<> gmtime_s(...) { return null<>(); }