more changes to make override of printf work

This commit is contained in:
Marty Kraimer
2004-07-08 20:47:00 +00:00
parent 6669549c68
commit 51a8b2ec98
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -90,8 +90,9 @@ int epicsShareAPI epicsShareAPI epicsStdoutPrintf(const char *pFormat, ...)
{
va_list pvar;
int nchar;
FILE *stream = epicsGetStdout();
va_start(pvar, pFormat);
nchar = vprintf(pFormat,pvar);
nchar = vfprintf(stream,pFormat,pvar);
va_end (pvar);
return(nchar);
}
+2 -2
View File
@@ -52,9 +52,9 @@ epicsShareFunc int epicsShareAPI epicsStdoutPrintf(
#endif
#if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
#define printf(...) epicsStdoutPrintf(__VAR_ARGS__)
#define printf(...) fprintf(stdout,__VAR_ARGS__)
#elif defined(__GNUC__)
#define printf(format...) epicsStdoutPrintf(format)
#define printf(format...) fprintf(stdout,format)
#else
#define printf epicsStdoutPrintf
#endif