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:
parent
d778f6fc64
commit
1186d43a25
@ -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/param.h HAVE_SYS_PARAM_H)
|
||||||
CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||||
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_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_INCLUDE_FILES(usbhid.h HAVE_USBHID_H)
|
||||||
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
||||||
CHECK_FUNCTION_EXISTS(vfprintf HAVE_VFPRINTF)
|
|
||||||
CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT)
|
|
||||||
CHECK_FUNCTION_EXISTS(XParseGeometry HAVE_XPARSEGEOMETRY)
|
CHECK_FUNCTION_EXISTS(XParseGeometry HAVE_XPARSEGEOMETRY)
|
||||||
IF (NOT HAVE_XPARSEGEOMETRY)
|
IF (NOT HAVE_XPARSEGEOMETRY)
|
||||||
LIST(APPEND FREEGLUT_SRCS
|
LIST(APPEND FREEGLUT_SRCS
|
||||||
|
@ -31,13 +31,6 @@
|
|||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdarg.h>
|
#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
|
* 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 ");
|
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 );
|
||||||
@ -322,7 +315,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 );
|
||||||
|
@ -48,10 +48,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_VFPRINTF
|
|
||||||
#define HAVE_VFPRINTF 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */
|
/* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */
|
||||||
#if !defined(ChangeDisplaySettingsEx)
|
#if !defined(ChangeDisplaySettingsEx)
|
||||||
LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
|
LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
|
||||||
|
@ -32,13 +32,6 @@
|
|||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdarg.h>
|
#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
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user