autoconf'd vfprintf
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@555 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
162255a20a
commit
d52d41a3e3
@ -33,6 +33,7 @@ CFLAGS="$save_CFLAGS"
|
|||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
||||||
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_LIBM
|
AC_CHECK_LIBM
|
||||||
AC_SUBST([LIBM])
|
AC_SUBST([LIBM])
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#if HAVE_SYS_TYPES_H
|
#if HAVE_SYS_TYPES_H
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,6 +30,14 @@
|
|||||||
#if HAVE_ERRNO_H
|
#if HAVE_ERRNO_H
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <stdarg.h>
|
||||||
|
#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
|
#if TARGET_HOST_WINCE
|
||||||
|
|
||||||
@ -349,7 +357,7 @@ void fgError( const char *fmt, ... )
|
|||||||
fprintf( stderr, "freeglut ");
|
fprintf( stderr, "freeglut ");
|
||||||
if( fgState.ProgramName )
|
if( fgState.ProgramName )
|
||||||
fprintf( stderr, "(%s): ", fgState.ProgramName );
|
fprintf( stderr, "(%s): ", fgState.ProgramName );
|
||||||
vfprintf( stderr, fmt, ap );
|
VFPRINTF( stderr, fmt, ap );
|
||||||
fprintf( stderr, "\n" );
|
fprintf( stderr, "\n" );
|
||||||
|
|
||||||
va_end( ap );
|
va_end( ap );
|
||||||
@ -369,7 +377,7 @@ void fgWarning( const char *fmt, ... )
|
|||||||
fprintf( stderr, "freeglut ");
|
fprintf( stderr, "freeglut ");
|
||||||
if( fgState.ProgramName )
|
if( fgState.ProgramName )
|
||||||
fprintf( stderr, "(%s): ", fgState.ProgramName );
|
fprintf( stderr, "(%s): ", fgState.ProgramName );
|
||||||
vfprintf( stderr, fmt, ap );
|
VFPRINTF( stderr, fmt, ap );
|
||||||
fprintf( stderr, "\n" );
|
fprintf( stderr, "\n" );
|
||||||
|
|
||||||
va_end( ap );
|
va_end( ap );
|
||||||
|
Reference in New Issue
Block a user