From cef5542bc0c6769f93415bf3018a37fd93e83906 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 10 Jul 2025 16:27:45 -0500 Subject: [PATCH] x86_64/include/rtems/score/x86_64.h: Use standard variadic macro The DBG_PRINTF() macro was using the GNU extension variadic macro style. Switched to standard C style variadic macro, printk() so safer for debug than printf(), and included needed files. --- cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h b/cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h index 6633575e03..c81e2d480f 100644 --- a/cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h +++ b/cpukit/score/cpu/x86_64/include/rtems/score/x86_64.h @@ -40,11 +40,14 @@ extern "C" { #define FSBASE_MSR 0xC0000100 -#if DEBUG -#define DBG_PRINTF(format, args...) \ - printf(format, ## args) +#ifndef ASM +#ifdef DEBUG +#include +#include +#define DBG_PRINTF(...) printk(__VA_ARGS__) #else -#define DBG_PRINTF(format, args...) +#define DBG_PRINTF(...) +#endif #endif #ifdef __cplusplus