From 551c06f8856d8fd6350324c1cc3ed06366e72c94 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 24 May 2000 01:29:13 +0000 Subject: [PATCH] Updates for MSVC5 --- simgear/compiler.h | 25 +++++- simgear/config.h.vc5 | 154 ++++++++++++++++++++++++++++++++++++ simgear/math/fg_geodesy.cxx | 3 + 3 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 simgear/config.h.vc5 diff --git a/simgear/compiler.h b/simgear/compiler.h index a6d0b88f..8741c68b 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -127,7 +127,10 @@ // Microsoft compilers. // #ifdef _MSC_VER -# if _MSC_VER == 1200 // msvc++ 6.0 +# define bcopy(from, to, n) memcpy(to, from, n) +# define FG_MEM_COPY(to,from,n) memcpy(to, from, n) + +# if _MSC_VER == 1200 // msvc++ 6.0 # define FG_NAMESPACES # define FG_HAVE_STD # define FG_HAVE_STD_INCLUDES @@ -147,7 +150,25 @@ # pragma warning(disable: 4305) // # elif _MSC_VER == 1100 // msvc++ 5.0 -# error MSVC++ 5.0 still to be supported... +# define NEEDNAMESPACESTD +# define FG_NAMESPACES +# define FG_HAVE_STD +# define FG_HAVE_STD_INCLUDES +# define FG_HAVE_STREAMBUF + +# define STL_ALGORITHM +# define STL_FUNCTIONAL +# define STL_IOMANIP +# define STL_IOSTREAM +# define STL_FSTREAM +# define STL_STDEXCEPT +# define STL_STRING +# define STL_STRSTREAM + +# pragma warning(disable: 4786) // identifier was truncated to '255' characters +# pragma warning(disable: 4244) // conversion from double to float +# pragma warning(disable: 4305) // + # else # error What version of MSVC++ is this? # endif diff --git a/simgear/config.h.vc5 b/simgear/config.h.vc5 new file mode 100644 index 00000000..ac2343ca --- /dev/null +++ b/simgear/config.h.vc5 @@ -0,0 +1,154 @@ +/* Include/config.h. Generated for MSCV++ 5.0 */ + +/* Define if the X Window System is missing or not being used. */ +#define X_DISPLAY_MISSING 1 + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define to package name */ +#define PACKAGE "FlightGear" + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +/* #undef TIME_WITH_SYS_TIME */ + +/* Define if your declares struct tm. */ +/* #define TM_IN_SYS_TIME 1 */ + +/* Define to version number */ +#define VERSION "0.0.8" + +/* Define if compiling on a Winbloze (95, NT, etc.) platform */ +#define WIN32 1 + +/* Define if you have the GetLocalTime function. */ +#define HAVE_GETLOCALTIME 1 + +/* Define if you have the ftime function. */ +/* #define HAVE_FTIME 1 */ + +/* Define if you have the getitimer function. */ +/* #define HAVE_GETITIMER 1 */ + +/* Define if you have the getrusage function. */ +/* #define HAVE_GETRUSAGE 1 */ + +/* Define if you have the gettimeofday function. */ +/* #define HAVE_GETTIMEOFDAY 1 */ + +/* Define if you have the mktime function. */ +#define HAVE_MKTIME 1 + +/* Define if you have the rand function. */ +#define HAVE_RAND 1 + +/* Define if you have the random function. */ +#define HAVE_RANDOM 1 + +/* Define if you have the rint function. */ +/* #define HAVE_RINT 1 */ + +/* Define if you have the setitimer function. */ +/* #define HAVE_SETITIMER 1 */ + +/* Define if you have the signal function. */ +#define HAVE_SIGNAL 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +/* #define HAVE_GETOPT_H 1 */ + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +/* #define HAVE_SYS_TIME_H 1 */ + +/* Define if you have the header file. */ +#define HAVE_SYS_TIMEB_H 1 + +/* Define if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ + +/* Define if you have the header file. */ +/* #define HAVE_VALUES_H 1 */ + +/* Define if you have the header file. */ +#define HAVE_WINBASE_H 1 + +/* Define if you have the header file. */ +#define HAVE_WINDOWS_H 1 + +/* Define if you have the GL library (-lGL). */ +#define HAVE_LIBGL 1 + +/* Define if you have the GLU library (-lGLU). */ +#define HAVE_LIBGLU 1 + +/* Define if you have the GLcore library (-lGLcore). */ +/* #undef HAVE_LIBGLCORE */ + +/* Define if you have the ICE library (-lICE). */ +/* #define HAVE_LIBICE 1 */ + +/* Define if you have the MesaGL library (-lMesaGL). */ +/* #undef HAVE_LIBMESAGL */ + +/* Define if you have the MesaGLU library (-lMesaGLU). */ +/* #undef HAVE_LIBMESAGLU */ + +/* Define if you have the SM library (-lSM). */ +/* #define HAVE_LIBSM 1 */ + +/* Define if you have the X11 library (-lX11). */ +/* #define HAVE_LIBX11 1 */ + +/* Define if you have the Xext library (-lXext). */ +/* #define HAVE_LIBXEXT 1 */ + +/* Define if you have the Xi library (-lXi). */ +/* #define HAVE_LIBXI 1 */ + +/* Define if you have the Xmu library (-lXmu). */ +/* #define HAVE_LIBXMU 1 */ + +/* Define if you have the Xt library (-lXt). */ +/* #define HAVE_LIBXT 1 */ + +/* Define if you have the glut library (-lglut). */ +#define HAVE_LIBGLUT 1 + +/* Define if you have the m library (-lm). */ +#define HAVE_LIBM 1 + +/* Define if you have the socket library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +#define HAVE_MEMCPY 1 + diff --git a/simgear/math/fg_geodesy.cxx b/simgear/math/fg_geodesy.cxx index 867d8170..506ae877 100644 --- a/simgear/math/fg_geodesy.cxx +++ b/simgear/math/fg_geodesy.cxx @@ -56,8 +56,11 @@ void fgGeocToGeod( double lat_geoc, double radius, double *sea_level_r = EQUATORIAL_RADIUS_M*E; *alt = radius - *sea_level_r; } else { + // cout << " lat_geoc = " << lat_geoc << endl; t_lat = tan(lat_geoc); + // cout << " tan(t_lat) = " << t_lat << endl; x_alpha = E*EQUATORIAL_RADIUS_M/sqrt(t_lat*t_lat + E*E); + // cout << " x_alpha = " << x_alpha << endl; double tmp = RESQ_M - x_alpha * x_alpha; if ( tmp < 0.0 ) { tmp = 0.0; } mu_alpha = atan2(sqrt(tmp),E*x_alpha); -- 2.39.5