Simplify printf ==>> epicsStdoutPrintf redefinition. Use __printf__ in
GCC attribute specifier to avoid conflict.
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
* Enable format-string checking if possible
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
# define EPICS_PRINTF_STYLE(f,a) __attribute__((format(printf,f,a)))
|
||||
# define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
|
||||
#else
|
||||
# define EPICS_PRINTF_STYLE(f,a)
|
||||
#endif
|
||||
|
||||
@@ -66,15 +66,7 @@ epicsShareFunc int epicsShareAPI epicsStdoutPrintf(
|
||||
#ifdef printf
|
||||
#undef printf
|
||||
#endif /*printf*/
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
|
||||
#define printf(...) epicsStdoutPrintf(...)
|
||||
#elif defined(__GNUC__)
|
||||
#define printf(format...) epicsStdoutPrintf(format)
|
||||
#else
|
||||
#define printf epicsStdoutPrintf
|
||||
#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__>=199901_*/
|
||||
#endif /* epicsStdioPVT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user