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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user