X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=d1ba612b5cbef37eef6fb4aa989a6d24638cf6de;hb=c24efb9241080a043193b67c6a9718312fed8d07;hp=61731cb797fdac8742a5d8d57e42500b1d860dff;hpb=585c48d614d2b7e22c18fb1ee998a303f9e7fdf3;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 61731cb..d1ba612 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -30,6 +30,14 @@ #if HAVE_ERRNO_H # include #endif +#include +#if HAVE_VPRINTF +# define VFPRINTF(s,f,a) vfprintf((s),(f),(a)) +#elif HAVE_DOPRNT +# define VFPRINTF(s,f,a) _doprnt((f),(a),(s)) +#else +# define VFPRINTF(s,f,a) +#endif #if TARGET_HOST_WINCE @@ -348,8 +356,8 @@ void fgError( const char *fmt, ... ) fprintf( stderr, "freeglut "); if( fgState.ProgramName ) - fprintf (stderr, "(%s): ", fgState.ProgramName); - vfprintf( stderr, fmt, ap ); + fprintf( stderr, "(%s): ", fgState.ProgramName ); + VFPRINTF( stderr, fmt, ap ); fprintf( stderr, "\n" ); va_end( ap ); @@ -369,7 +377,7 @@ void fgWarning( const char *fmt, ... ) fprintf( stderr, "freeglut "); if( fgState.ProgramName ) fprintf( stderr, "(%s): ", fgState.ProgramName ); - vfprintf( stderr, fmt, ap ); + VFPRINTF( stderr, fmt, ap ); fprintf( stderr, "\n" ); va_end( ap );