Skip to content

Commit ae6fd83

Browse files
authored
Make fmt/fmt-c.h compile with Clang on Windows (fmtlib#4712)
1 parent c0cd0fc commit ae6fd83

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/fmt/fmt-c.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ static inline fmt_arg fmt_from_ptr(const void* x) {
9191

9292
void fmt_unsupported_type(void);
9393

94-
# ifndef _MSC_VER
94+
# if !defined(_MSC_VER) || defined(__clang__)
9595
typedef signed char fmt_signed_char;
9696
# else
9797
typedef enum {} fmt_signed_char;
9898
# endif
9999

100100
// Require modern MSVC with conformant preprocessor.
101-
# if defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)
101+
# if defined(_MSC_VER) && !defined(__clang__) && \
102+
(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)
102103
# error "C API requires MSVC 2019+ with /Zc:preprocessor flag."
103104
# endif
104105

0 commit comments

Comments
 (0)