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.
This commit is contained in:
parent
c8a9fd2bd4
commit
eccddb3dfd
18 changed files with 7 additions and 91 deletions
|
@ -26,9 +26,6 @@
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/structure/exception.hxx>
|
#include <simgear/structure/exception.hxx>
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#ifdef __BORLANDC__
|
|
||||||
# define exception c_exception
|
|
||||||
#endif
|
|
||||||
#include <simgear/props/props.hxx>
|
#include <simgear/props/props.hxx>
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
|
|
|
@ -23,12 +23,7 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#if defined( SG_HAVE_STD_INCLUDES ) || defined( __BORLANDC__ ) || (__APPLE__)
|
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
#else
|
|
||||||
# include <fstream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -33,15 +33,7 @@
|
||||||
|
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <iosfwd>
|
# include <iosfwd>
|
||||||
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
# include <iostream.h>
|
|
||||||
#elif defined( __BORLANDC__ )
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ATC.hxx"
|
#include "ATC.hxx"
|
||||||
#include "transmission.hxx"
|
#include "transmission.hxx"
|
||||||
|
|
|
@ -32,13 +32,7 @@
|
||||||
#include <simgear/magvar/magvar.hxx>
|
#include <simgear/magvar/magvar.hxx>
|
||||||
#include <simgear/timing/sg_time.hxx>
|
#include <simgear/timing/sg_time.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <iosfwd>
|
# include <iosfwd>
|
||||||
#elif defined( __BORLANDC__ ) || (__APPLE__)
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ATC.hxx"
|
#include "ATC.hxx"
|
||||||
|
|
||||||
|
|
|
@ -34,17 +34,7 @@
|
||||||
|
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
# include <istream>
|
||||||
#include <iomanip>
|
|
||||||
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
# include <iostream.h>
|
|
||||||
#elif defined( __BORLANDC__ )
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#include <iomanip.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ATC.hxx"
|
#include "ATC.hxx"
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,7 @@
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
# define exception c_exception
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h> // char related functions
|
#include <stdio.h> // char related functions
|
||||||
#include <string.h> // strcmp()
|
#include <string.h> // strcmp()
|
||||||
|
|
|
@ -43,10 +43,6 @@ HISTORY
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <stdio.h> // size_t
|
#include <stdio.h> // size_t
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ FGfdmSocket::FGfdmSocket(string address, int port, int protocol)
|
||||||
sckt = sckt_in = size = 0;
|
sckt = sckt_in = size = 0;
|
||||||
connected = false;
|
connected = false;
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
int wsaReturnCode;
|
int wsaReturnCode;
|
||||||
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
||||||
|
@ -109,7 +109,7 @@ FGfdmSocket::FGfdmSocket(string address, int port)
|
||||||
sckt = sckt_in = size = 0;
|
sckt = sckt_in = size = 0;
|
||||||
connected = false;
|
connected = false;
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
int wsaReturnCode;
|
int wsaReturnCode;
|
||||||
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
||||||
|
@ -162,7 +162,7 @@ FGfdmSocket::FGfdmSocket(int port)
|
||||||
connected = false;
|
connected = false;
|
||||||
unsigned long NoBlock = true;
|
unsigned long NoBlock = true;
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
int wsaReturnCode;
|
int wsaReturnCode;
|
||||||
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
wsaReturnCode = WSAStartup(MAKEWORD(1,1), &wsaData);
|
||||||
|
@ -180,7 +180,7 @@ FGfdmSocket::FGfdmSocket(int port)
|
||||||
if (bind(sckt, (struct sockaddr*)&scktName, len) == 0) { // successful
|
if (bind(sckt, (struct sockaddr*)&scktName, len) == 0) { // successful
|
||||||
cout << "Successfully bound to socket for input on port " << port << endl;
|
cout << "Successfully bound to socket for input on port " << port << endl;
|
||||||
if (listen(sckt, 5) >= 0) { // successful listen()
|
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);
|
ioctlsocket(sckt, FIONBIO, &NoBlock);
|
||||||
sckt_in = accept(sckt, (struct sockaddr*)&scktName, &len);
|
sckt_in = accept(sckt, (struct sockaddr*)&scktName, &len);
|
||||||
#else
|
#else
|
||||||
|
@ -207,10 +207,6 @@ FGfdmSocket::~FGfdmSocket()
|
||||||
{
|
{
|
||||||
if (sckt) shutdown(sckt,2);
|
if (sckt) shutdown(sckt,2);
|
||||||
if (sckt_in) shutdown(sckt_in,2);
|
if (sckt_in) shutdown(sckt_in,2);
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
WSACleanup();
|
|
||||||
#endif
|
|
||||||
Debug(1);
|
Debug(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,13 +223,13 @@ string FGfdmSocket::Receive(void)
|
||||||
// class attribute and pass as a reference?
|
// class attribute and pass as a reference?
|
||||||
|
|
||||||
if (sckt_in <= 0) {
|
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);
|
sckt_in = accept(sckt, (struct sockaddr*)&scktName, &len);
|
||||||
#else
|
#else
|
||||||
sckt_in = accept(sckt, (struct sockaddr*)&scktName, (socklen_t*)&len);
|
sckt_in = accept(sckt, (struct sockaddr*)&scktName, (socklen_t*)&len);
|
||||||
#endif
|
#endif
|
||||||
if (sckt_in > 0) {
|
if (sckt_in > 0) {
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
ioctlsocket(sckt_in, FIONBIO,&NoBlock);
|
ioctlsocket(sckt_in, FIONBIO,&NoBlock);
|
||||||
#else
|
#else
|
||||||
ioctl(sckt_in, FIONBIO, &NoBlock);
|
ioctl(sckt_in, FIONBIO, &NoBlock);
|
||||||
|
|
|
@ -49,7 +49,7 @@ INCLUDES
|
||||||
using std::cout;
|
using std::cout;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,11 +25,6 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For BC 5.01 this must be included before OpenGL includes.
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h> // strcmp()
|
#include <string.h> // strcmp()
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
|
|
|
@ -32,13 +32,7 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/sgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
# include <istream>
|
||||||
#elif defined( __BORLANDC__ ) || (__APPLE__)
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,7 @@
|
||||||
#include <simgear/structure/SGSharedPtr.hxx>
|
#include <simgear/structure/SGSharedPtr.hxx>
|
||||||
#include <simgear/structure/SGReferenced.hxx>
|
#include <simgear/structure/SGReferenced.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
# include <istream>
|
||||||
#elif defined( __BORLANDC__ ) || (__APPLE__)
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FG_NAV_DEFAULT_RANGE 50 // nm
|
#define FG_NAV_DEFAULT_RANGE 50 // nm
|
||||||
#define FG_LOC_DEFAULT_RANGE 18 // nm
|
#define FG_LOC_DEFAULT_RANGE 18 // nm
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/structure/exception.hxx>
|
#include <simgear/structure/exception.hxx>
|
||||||
#ifdef __BORLANDC__
|
|
||||||
# define exception c_exception
|
|
||||||
#endif
|
|
||||||
#include <simgear/misc/sg_path.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/props/props.hxx>
|
#include <simgear/props/props.hxx>
|
||||||
#include <simgear/sound/xmlsound.hxx>
|
#include <simgear/sound/xmlsound.hxx>
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
|
|
||||||
#include SG_GL_H
|
#include SG_GL_H
|
||||||
|
|
||||||
#ifdef SG_MATH_EXCEPTION_CLASH
|
|
||||||
# define exception c_exception
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
#ifdef SG_HAVE_STD_INCLUDES
|
||||||
# include <cmath>
|
# include <cmath>
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue