From 786cd90847d39adf72ca0bcaeb5307985c7b7850 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Mon, 20 Oct 2014 15:22:29 +0000 Subject: [PATCH] removed vfprintf and checking from CMakeLists.txt, and all the fallbacks from vfprintf to the obscure _doprnt function git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1723 7f0cb862-5218-0410-a997-914c9d46530a --- CMakeLists.txt | 3 --- src/fg_main.c | 11 ++--------- src/mswin/fg_internal_mswin.h | 4 ---- src/x11/fg_main_x11.c | 7 ------- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0227a95..a8ab76b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/fg_main.c b/src/fg_main.c index b387068..240e5f7 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -31,13 +31,6 @@ # include #endif #include -#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 ); diff --git a/src/mswin/fg_internal_mswin.h b/src/mswin/fg_internal_mswin.h index 1209fc4..0fefb31 100644 --- a/src/mswin/fg_internal_mswin.h +++ b/src/mswin/fg_internal_mswin.h @@ -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); diff --git a/src/x11/fg_main_x11.c b/src/x11/fg_main_x11.c index 6d2d8a7..2e13f38 100644 --- a/src/x11/fg_main_x11.c +++ b/src/x11/fg_main_x11.c @@ -32,13 +32,6 @@ # include #endif #include -#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 /* -- 1.7.10.4