Simplify printf ==>> epicsStdoutPrintf redefinition. Use __printf__ in

GCC attribute specifier to avoid conflict.
This commit is contained in:
W. Eric Norum
2004-07-12 16:00:48 +00:00
parent b4715368d7
commit 3d1dfa5dc6
2 changed files with 1 additions and 9 deletions
+1 -1
View File
@@ -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
-8
View File
@@ -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
}