fix EPICS_PRINTF_STYLE so old mingw recognizes %ll and %z (#674)

gcc knows __gnu_printf__ since version 4.4.0, not only for MinGW but for
all targets. As we would need to check the gcc version anyway to avoid
"unrecognized format function type" errors with older MinGW versions,
we can simply use it for recent gcc versions and not depend on MinGW at all.
This commit is contained in:
2025-07-30 17:23:19 +02:00
committed by GitHub
parent 5ae9cc6536
commit 007df69726

View File

@@ -45,7 +45,11 @@
/*
* Enable format-string checking if possible
*/
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__gnu_printf__,f,a)))
#else
#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
#endif
/*
* Deprecation marker