X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=d1ba612b5cbef37eef6fb4aa989a6d24638cf6de;hb=3d093218232559989253aaa1f22c5e1523e0c811;hp=6f4bcec92be62358a57eeacd1bad847b8d694c7e;hpb=1652c4a486eb064ee27d475b317d8bd22ea9e040;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 6f4bcec..d1ba612 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -27,12 +27,19 @@ #include #include "freeglut_internal.h" +#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_UNIX_X11 -#include -#include -#elif TARGET_HOST_WIN32 -#elif TARGET_HOST_WINCE +#if TARGET_HOST_WINCE typedef struct GXDisplayProperties GXDisplayProperties; typedef struct GXKeyList GXKeyList; @@ -349,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 ); @@ -370,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 );