From 2d5525eac128c6bb02344d733ab487b3aedd2431 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 21 Nov 2021 22:11:08 +0100 Subject: [PATCH] Move PRIu64 Windows workaround to compat.h So that we can use it from several files. PR #2814 --- app/src/compat.h | 6 ++++++ app/src/control_msg.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/compat.h b/app/src/compat.h index 32759c01..c06c23fa 100644 --- a/app/src/compat.h +++ b/app/src/compat.h @@ -6,6 +6,12 @@ #include #include +#ifndef __WIN32 +# define PRIu64_ PRIu64 +#else +# define PRIu64_ "I64u" // Windows... +#endif + // In ffmpeg/doc/APIchanges: // 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h // Deprecate use of av_register_input_format(), av_register_output_format(), diff --git a/app/src/control_msg.c b/app/src/control_msg.c index 83ab0b7b..90cde0cf 100644 --- a/app/src/control_msg.c +++ b/app/src/control_msg.c @@ -171,11 +171,6 @@ control_msg_log(const struct control_msg *msg) { (long) msg->inject_touch_event.buttons); } else { // numeric pointer id -#ifndef __WIN32 -# define PRIu64_ PRIu64 -#else -# define PRIu64_ "I64u" // Windows... -#endif LOG_CMSG("touch [id=%" PRIu64_ "] %-4s position=%" PRIi32 ",%" PRIi32 " pressure=%g buttons=%06lx", id,