Skip to content

Commit 8063bc9

Browse files
committed
fixup! simplify
1 parent af7c7ad commit 8063bc9

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ if(BUILD_STATIC_QJS_EXE OR MINGW)
271271
target_link_options(qjs_exe PRIVATE -static)
272272
if(MINGW)
273273
target_link_options(qjs_exe PRIVATE -static-libgcc)
274+
# Fix %zd not working on MinGW
275+
target_compile_definitions(run-qjs_exe PRIVATE __USE_MINGW_ANSI_STDIO=1)
274276
endif()
275277
endif()
276278
if(NOT WIN32)

cutils.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,10 @@ extern "C" {
108108
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param)
109109
#else
110110
#define JS_PRINTF_FORMAT
111-
#if !defined(__clang__) && defined(__GNUC__)
112-
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param) \
113-
__attribute__((format(gnu_printf, format_param, dots_param)))
114-
#else
115111
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param) \
116112
__attribute__((format(printf, format_param, dots_param)))
117113
#endif
118114
#endif
119-
#endif
120115

121116
void js__pstrcpy(char *buf, int buf_size, const char *str);
122117
char *js__pstrcat(char *buf, int buf_size, const char *s);

quickjs.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,10 @@ extern "C" {
5353
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param)
5454
#else
5555
#define JS_PRINTF_FORMAT
56-
#if !defined(__clang__) && defined(__GNUC__)
57-
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param) \
58-
__attribute__((format(gnu_printf, format_param, dots_param)))
59-
#else
6056
#define JS_PRINTF_FORMAT_ATTR(format_param, dots_param) \
6157
__attribute__((format(printf, format_param, dots_param)))
6258
#endif
6359
#endif
64-
#endif
6560

6661
typedef struct JSRuntime JSRuntime;
6762
typedef struct JSContext JSContext;

0 commit comments

Comments
 (0)