From b11cf48853bc4eccde60bc82180025f0797fa823 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 3 Aug 2025 15:29:48 +0100 Subject: Use shorter spellings of __asm and __attribute Turns out, there's no need for the trailing underscores. Plus, glibc does some stupid stuff with __attribute__ for non-GCC compilers. Not that that matters here, but it seems like a good practice just to use the forms that never have such problems. And it's shorter too. --- src/con_.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/con_.h') diff --git a/src/con_.h b/src/con_.h index b67483a..c995d5c 100644 --- a/src/con_.h +++ b/src/con_.h @@ -21,7 +21,7 @@ #include "intdefs.h" #if defined(__GNUC__) || defined(__clang__) -#define _CON_PRINTF(x, y) __attribute__((format(printf, (x), (y)))) +#define _CON_PRINTF(x, y) __attribute((format(printf, (x), (y)))) #else #define _CON_PRINTF(x, y) #endif @@ -198,11 +198,11 @@ con_cmdcbv1 con_getcmdcbv1(const struct con_cmd *cmd); */ #if defined(__GNUC__) || defined(__clang__) #ifdef _WIN32 -#define __asm__(x) __asm__("_" x) // stupid mangling meme, only on windows! +#define __asm(x) __asm("_" x) // stupid mangling meme, only on windows! #endif -void con_msg(const char *fmt, ...) _CON_PRINTF(1, 2) __asm__("Msg"); -void con_warn(const char *fmt, ...) _CON_PRINTF(1, 2) __asm__("Warning"); -#undef __asm__ +void con_msg(const char *fmt, ...) _CON_PRINTF(1, 2) __asm("Msg"); +void con_warn(const char *fmt, ...) _CON_PRINTF(1, 2) __asm("Warning"); +#undef __asm #else #error Need an equivalent of asm names for your compiler! #endif -- cgit v1.2.3-54-g00ecf