Skip to content

Commit 4ac0ea1

Browse files
committed
core-c: fix compilation with MS Clang
it defines both __GNUC__ and _MSC_VER
1 parent d815356 commit 4ac0ea1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

corec/corec/helpers/parser/parser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ typedef struct textwriter
176176

177177
NODE_DLL err_t TextWrite(textwriter*, const tchar_t*);
178178
NODE_DLL err_t TextPrintf(textwriter*, const tchar_t* Msg,...)
179-
#if defined(__GNUC__)
179+
#if defined(__GNUC__) && !defined(_MSC_VER)
180180
__attribute__ ((format(printf, 2, 3)))
181181
#endif
182182
;
@@ -202,7 +202,7 @@ NODE_DLL bool_t ExprCmd(const tchar_t** Expr, tchar_t* Out, size_t OutLen);
202202
NODE_DLL bool_t ExprSkipAfter(const tchar_t** p,int ch); //ch=0 for general space
203203
NODE_DLL bool_t ExprIsToken(const tchar_t** p,const tchar_t* Name);
204204
NODE_DLL bool_t ExprIsTokenEx(const tchar_t** p,const tchar_t* Name,...)
205-
#if defined(__GNUC__)
205+
#if defined(__GNUC__) && !defined(_MSC_VER)
206206
__attribute__ ((format(printf, 2, 3)))
207207
#endif
208208
;
@@ -229,7 +229,7 @@ NODE_DLL bool_t BufferToBase64(tchar_t *Out, size_t OutLen, const uint8_t *Buffe
229229
NODE_DLL uint32_t StringToIP(const tchar_t *Addr);
230230

231231
NODE_DLL err_t Stream_Printf(stream*, const tchar_t* Msg,...)
232-
#if defined(__GNUC__)
232+
#if defined(__GNUC__) && !defined(_MSC_VER)
233233
__attribute__ ((format(printf, 2, 3)))
234234
#endif
235235
;

0 commit comments

Comments
 (0)