removed vfprintf and checking from CMakeLists.txt, and all the fallbacks from

vfprintf to the obscure _doprnt function



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1723 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
jtsiomb 2014-10-20 15:22:29 +00:00
parent d778f6fc64
commit 1186d43a25
4 changed files with 2 additions and 23 deletions

View File

@ -289,11 +289,8 @@ CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H)
CHECK_INCLUDE_FILES(sys/param.h HAVE_SYS_PARAM_H)
CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H)
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
CHECK_INCLUDE_FILES(errno.h HAVE_ERRNO_H)
CHECK_INCLUDE_FILES(usbhid.h HAVE_USBHID_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_FUNCTION_EXISTS(vfprintf HAVE_VFPRINTF)
CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT)
CHECK_FUNCTION_EXISTS(XParseGeometry HAVE_XPARSEGEOMETRY)
IF (NOT HAVE_XPARSEGEOMETRY)
LIST(APPEND FREEGLUT_SRCS

View File

@ -31,13 +31,6 @@
# include <errno.h>
#endif
#include <stdarg.h>
#ifdef HAVE_VFPRINTF
# define VFPRINTF(s,f,a) vfprintf((s),(f),(a))
#elif defined(HAVE__DOPRNT)
# define VFPRINTF(s,f,a) _doprnt((f),(a),(s))
#else
# define VFPRINTF(s,f,a)
#endif
/*
* Try to get the maximum value allowed for ints, falling back to the minimum
@ -289,7 +282,7 @@ void fgError( 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 );
@ -322,7 +315,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 );

View File

@ -48,10 +48,6 @@
#endif
#ifndef HAVE_VFPRINTF
#define HAVE_VFPRINTF 1
#endif
/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */
#if !defined(ChangeDisplaySettingsEx)
LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);

View File

@ -32,13 +32,6 @@
# include <errno.h>
#endif
#include <stdarg.h>
#ifdef HAVE_VFPRINTF
# define VFPRINTF(s,f,a) vfprintf((s),(f),(a))
#elif defined(HAVE__DOPRNT)
# define VFPRINTF(s,f,a) _doprnt((f),(a),(s))
#else
# define VFPRINTF(s,f,a)
#endif
/*