From eccddb3dfd662ec6ac2af44f614439dfb8ab70c3 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 25 Jul 2008 10:39:53 +0000 Subject: [PATCH] Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM PLETE_FUNCTIONAL from SimGear and FlightGear. As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring fixes for that done, but separately. I'm still auditing the other things in comp ilers.h - there's a lot that can die now BORLAND is gone. --- src/AIModel/AIFlightPlan.cxx | 3 --- src/ATCDCL/ATCVoice.hxx | 5 ----- src/ATCDCL/approach.hxx | 8 -------- src/ATCDCL/atis.hxx | 6 ------ src/ATCDCL/transmission.hxx | 10 ---------- src/Cockpit/hud.cxx | 5 ----- src/FDM/Balloon.cxx | 4 ---- src/FDM/JSBSim/JSBSim.cxx | 3 --- src/FDM/JSBSim/input_output/FGfdmSocket.cpp | 16 ++++++---------- src/FDM/JSBSim/input_output/FGfdmSocket.h | 2 +- src/GUI/gui_funcs.cxx | 4 ---- src/GUI/mouse.cxx | 4 ---- src/Main/fg_init.cxx | 5 ----- src/Main/main.cxx | 4 ---- src/Navaids/fix.hxx | 6 ------ src/Navaids/navrecord.hxx | 6 ------ src/Sound/fg_fx.cxx | 3 --- src/Time/light.cxx | 4 ---- 18 files changed, 7 insertions(+), 91 deletions(-) diff --git a/src/AIModel/AIFlightPlan.cxx b/src/AIModel/AIFlightPlan.cxx index f18f0a346..abb49de43 100644 --- a/src/AIModel/AIFlightPlan.cxx +++ b/src/AIModel/AIFlightPlan.cxx @@ -26,9 +26,6 @@ #include #include #include -#ifdef __BORLANDC__ -# define exception c_exception -#endif #include #include
#include
diff --git a/src/ATCDCL/ATCVoice.hxx b/src/ATCDCL/ATCVoice.hxx index 0bc501c20..3185cc023 100644 --- a/src/ATCDCL/ATCVoice.hxx +++ b/src/ATCDCL/ATCVoice.hxx @@ -23,12 +23,7 @@ #include -#if defined( SG_HAVE_STD_INCLUDES ) || defined( __BORLANDC__ ) || (__APPLE__) # include -#else -# include -#endif - #include #include #include diff --git a/src/ATCDCL/approach.hxx b/src/ATCDCL/approach.hxx index ad6bea6a2..9ea32b9c0 100644 --- a/src/ATCDCL/approach.hxx +++ b/src/ATCDCL/approach.hxx @@ -33,15 +33,7 @@ #include
-#ifdef SG_HAVE_STD_INCLUDES # include -#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS ) -# include -#elif defined( __BORLANDC__ ) -# include -#else -# include -#endif #include "ATC.hxx" #include "transmission.hxx" diff --git a/src/ATCDCL/atis.hxx b/src/ATCDCL/atis.hxx index c4c28e2d4..60335e185 100644 --- a/src/ATCDCL/atis.hxx +++ b/src/ATCDCL/atis.hxx @@ -32,13 +32,7 @@ #include #include -#ifdef SG_HAVE_STD_INCLUDES # include -#elif defined( __BORLANDC__ ) || (__APPLE__) -# include -#else -# include -#endif #include "ATC.hxx" diff --git a/src/ATCDCL/transmission.hxx b/src/ATCDCL/transmission.hxx index 8318d5a3b..c8ee2ce10 100644 --- a/src/ATCDCL/transmission.hxx +++ b/src/ATCDCL/transmission.hxx @@ -34,17 +34,7 @@ #include
-#ifdef SG_HAVE_STD_INCLUDES # include -#include -#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS ) -# include -#elif defined( __BORLANDC__ ) -# include -#else -# include -#include -#endif #include "ATC.hxx" diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index 564b536dc..703dbbc5f 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -34,12 +34,7 @@ # include #endif -#ifdef __BORLANDC__ -# define exception c_exception -#endif - #include - #include #include // char related functions #include // strcmp() diff --git a/src/FDM/Balloon.cxx b/src/FDM/Balloon.cxx index 7ff92a6fc..b56e6cf8b 100644 --- a/src/FDM/Balloon.cxx +++ b/src/FDM/Balloon.cxx @@ -43,10 +43,6 @@ HISTORY #include -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif - #include STL_STRING #include diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index a6b1d7e0f..667a54b5d 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -28,9 +28,6 @@ #include #include // size_t -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif #include STL_STRING diff --git a/src/FDM/JSBSim/input_output/FGfdmSocket.cpp b/src/FDM/JSBSim/input_output/FGfdmSocket.cpp index 7d2178433..1c390696f 100644 --- a/src/FDM/JSBSim/input_output/FGfdmSocket.cpp +++ b/src/FDM/JSBSim/input_output/FGfdmSocket.cpp @@ -55,7 +55,7 @@ FGfdmSocket::FGfdmSocket(string address, int port, int protocol) sckt = sckt_in = size = 0; connected = false; - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) WSADATA wsaData; int wsaReturnCode; wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData); @@ -109,7 +109,7 @@ FGfdmSocket::FGfdmSocket(string address, int port) sckt = sckt_in = size = 0; connected = false; - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) WSADATA wsaData; int wsaReturnCode; wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData); @@ -162,7 +162,7 @@ FGfdmSocket::FGfdmSocket(int port) connected = false; unsigned long NoBlock = true; - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) WSADATA wsaData; int wsaReturnCode; wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData); @@ -180,7 +180,7 @@ FGfdmSocket::FGfdmSocket(int port) if (bind(sckt, (struct sockaddr*)&scktName, len) == 0) { // successful cout << "Successfully bound to socket for input on port " << port << endl; if (listen(sckt, 5) >= 0) { // successful listen() - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) ioctlsocket(sckt, FIONBIO, &NoBlock); sckt_in = accept(sckt, (struct sockaddr*)&scktName, &len); #else @@ -207,10 +207,6 @@ FGfdmSocket::~FGfdmSocket() { if (sckt) shutdown(sckt,2); if (sckt_in) shutdown(sckt_in,2); - - #ifdef __BORLANDC__ - WSACleanup(); - #endif Debug(1); } @@ -227,13 +223,13 @@ string FGfdmSocket::Receive(void) // class attribute and pass as a reference? if (sckt_in <= 0) { - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) sckt_in = accept(sckt, (struct sockaddr*)&scktName, &len); #else sckt_in = accept(sckt, (struct sockaddr*)&scktName, (socklen_t*)&len); #endif if (sckt_in > 0) { - #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) + #if defined(_MSC_VER) || defined(__MINGW32__) ioctlsocket(sckt_in, FIONBIO,&NoBlock); #else ioctl(sckt_in, FIONBIO, &NoBlock); diff --git a/src/FDM/JSBSim/input_output/FGfdmSocket.h b/src/FDM/JSBSim/input_output/FGfdmSocket.h index 59db72325..c8f139103 100644 --- a/src/FDM/JSBSim/input_output/FGfdmSocket.h +++ b/src/FDM/JSBSim/input_output/FGfdmSocket.h @@ -49,7 +49,7 @@ INCLUDES using std::cout; using std::endl; -#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) || defined(__MINGW32__) #include #include #else diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index ac2e7d4b6..de40bda0e 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -32,10 +32,6 @@ #include -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif - #ifdef HAVE_WINDOWS_H # include #endif diff --git a/src/GUI/mouse.cxx b/src/GUI/mouse.cxx index ec2c4a68f..c6abe3585 100644 --- a/src/GUI/mouse.cxx +++ b/src/GUI/mouse.cxx @@ -30,10 +30,6 @@ #include -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif - #ifdef HAVE_WINDOWS_H # include #endif diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index fdac2e800..353818a78 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -25,11 +25,6 @@ # include #endif -// For BC 5.01 this must be included before OpenGL includes. -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif - #include #include #include // strcmp() diff --git a/src/Main/main.cxx b/src/Main/main.cxx index ba2483da0..56204bff1 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -32,10 +32,6 @@ # include #endif -#ifdef SG_MATH_EXCEPTION_CLASH -# include -#endif - #ifdef HAVE_WINDOWS_H # include # include diff --git a/src/Navaids/fix.hxx b/src/Navaids/fix.hxx index 2335be1fb..666966a82 100644 --- a/src/Navaids/fix.hxx +++ b/src/Navaids/fix.hxx @@ -32,13 +32,7 @@ #include #include -#ifdef SG_HAVE_STD_INCLUDES # include -#elif defined( __BORLANDC__ ) || (__APPLE__) -# include -#else -# include -#endif #include STL_STRING diff --git a/src/Navaids/navrecord.hxx b/src/Navaids/navrecord.hxx index d5ab6ec0b..4767dbf45 100644 --- a/src/Navaids/navrecord.hxx +++ b/src/Navaids/navrecord.hxx @@ -35,13 +35,7 @@ #include #include -#ifdef SG_HAVE_STD_INCLUDES # include -#elif defined( __BORLANDC__ ) || (__APPLE__) -# include -#else -# include -#endif #define FG_NAV_DEFAULT_RANGE 50 // nm #define FG_LOC_DEFAULT_RANGE 18 // nm diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index e1f7f4f23..b158c9051 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -31,9 +31,6 @@ #include #include -#ifdef __BORLANDC__ -# define exception c_exception -#endif #include #include #include diff --git a/src/Time/light.cxx b/src/Time/light.cxx index debccf586..cea586809 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -34,10 +34,6 @@ #include SG_GL_H -#ifdef SG_MATH_EXCEPTION_CLASH -# define exception c_exception -#endif - #ifdef SG_HAVE_STD_INCLUDES # include #else