removed vfprintf and checking from CMakeLists.txt, and all the fallbacks from
authorJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 20 Oct 2014 15:22:29 +0000 (15:22 +0000)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 20 Oct 2014 15:22:29 +0000 (15:22 +0000)
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
src/fg_main.c
src/mswin/fg_internal_mswin.h
src/x11/fg_main_x11.c

index 0227a95..a8ab76b 100644 (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
index b387068..240e5f7 100644 (file)
 #    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 );
index 1209fc4..0fefb31 100644 (file)
 #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);
index 6d2d8a7..2e13f38 100644 (file)
 #    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
 
 
 /*