1
0
Fork 0

MSVC++ changes contributed by Geoff McLane.

This commit is contained in:
curt 2001-05-17 21:55:22 +00:00
parent 4bdbe9c8c1
commit aea664cd15
7 changed files with 108 additions and 72 deletions

View file

@ -49,10 +49,16 @@
#include STL_STRING #include STL_STRING
#include <vector> #include <vector>
#ifndef _MSC_VER
#define NDEBUG // she don't work without it. #define NDEBUG // she don't work without it.
#endif // !_MSC_VER
#include <mk4.h> #include <mk4.h>
#include <mk4str.h> #include <mk4str.h>
#ifndef _MSC_VER
#undef NDEBUG #undef NDEBUG
#endif // !_MSC_VER
SG_USING_STD(string); SG_USING_STD(string);
SG_USING_STD(vector); SG_USING_STD(vector);

View file

@ -109,7 +109,7 @@ SG_USING_STD(cerr);
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
# ifndef _MSC_VR # ifndef _MSC_VER
SG_USING_STD(exit); SG_USING_STD(exit);
# endif # endif
#endif #endif

View file

@ -92,6 +92,10 @@ SG_USING_STD(string);
SG_USING_STD(cout); SG_USING_STD(cout);
#endif #endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif /* _MSC_VER */
// main.cxx hack, should come from an include someplace // main.cxx hack, should come from an include someplace
extern void fgInitVisuals( void ); extern void fgInitVisuals( void );
extern void fgReshape( int width, int height ); extern void fgReshape( int width, int height );

View file

@ -1,59 +1,49 @@
/* src/Include/config.h. Generated automatically by configure. */ /* Special single config.h for MSVC6 build - Geoff McLane - 10 May, 2001 */
/* src/Include/config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if the X Window System is missing or not being used. */ /* Define if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING 1 #define X_DISPLAY_MISSING 1
/* Define to enable audio support */ /* Define to empty if the keyword does not work. */
#define ENABLE_AUDIO_SUPPORT 1 /* #undef const */
/* Define to enable plib joystick support (recommended) */ /* Define if you don't have vprintf but do have _doprnt. */
#define ENABLE_PLIB_JOYSTICK 1 /* #undef HAVE_DOPRNT */
/* Define to eliminate all trace of debugging messages such as for a /* Define if you have the vprintf function. */
release build */ #define HAVE_VPRINTF 1
/* #undef FG_NDEBUG */
/* Define to include Oliver's networking support */ /* Define to package name - not used? */
/* #undef FG_NETWORK_OLK */ #define PACKAGE "FlightGear"
/* Define to avoid Christian's new weather code */ /* Define to package version - use in main.cxx */
/* #undef FG_OLD_WEATHER */ #define FLIGHTGEAR_VERSION "MSVC6-FGFS32-0.7.7"
/* Define if we are building FGFS (should always be defined) */ /* Define as the return type of signal handlers (int or void). */
#define FGFS 1 #define RETSIGTYPE void
/* Define to enable 3dfx/glide render in a window hack under unix. /* Define to `unsigned' if <sys/types.h> doesn't define. */
This probably won't work under windows. */ /* #undef size_t */
/* #define XMESA 1 */
/* #define FX 1 */
/* Define if you external variables daylight. */ /* Define if you have the ANSI C header files. */
/* #define HAVE_DAYLIGHT 1 */ #define STDC_HEADERS 1
/* Define if you external variables timezone. */ /* Define if you can safely include both <sys/time.h> and <time.h>. */
/* #define HAVE_TIMEZONE 1 */ /* #undef TIME_WITH_SYS_TIME */
/* Define if you have MetaKit installed system wide. */ /* Define if your <sys/time.h> declares struct tm. */
#define HAVE_MK4 1 #define TM_IN_SYS_TIME 1
/* Define if you have zlib installed system wide. */ /* Define to version number */
/* #define HAVE_ZLIB 1 */ #define VERSION "0.57"
#ifndef FG_VERSION /* allow override */
#define FG_VERSION 7
#endif /* FG_VERSION */
/* Define if compiling on a Winbloze (95, NT, etc.) platform */ /* Define if compiling on a Winbloze (95, NT, etc.) platform */
#define WIN32 1 #define WIN32 1
/* Define if you have the bcopy function. */ /* Define if you have the GetLocalTime function. */
/* #define HAVE_BCOPY 1 */ #define HAVE_GETLOCALTIME 1
/* Define if you have the ftime function. */ /* Define if you have the ftime function. */
#define HAVE_FTIME 1 #define HAVE_FTIME 1
@ -61,18 +51,12 @@
/* Define if you have the getitimer function. */ /* Define if you have the getitimer function. */
/* #define HAVE_GETITIMER 1 */ /* #define HAVE_GETITIMER 1 */
/* Define if you have the GetLocalTime function. */
#define HAVE_GETLOCALTIME 1
/* Define if you have the getrusage function. */ /* Define if you have the getrusage function. */
/* #define HAVE_GETRUSAGE 1 */ /* #define HAVE_GETRUSAGE 1 */
/* Define if you have the gettimeofday function. */ /* Define if you have the gettimeofday function. */
/* #define HAVE_GETTIMEOFDAY 1 */ /* #define HAVE_GETTIMEOFDAY 1 */
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the mktime function. */ /* Define if you have the mktime function. */
#define HAVE_MKTIME 1 #define HAVE_MKTIME 1
@ -80,7 +64,7 @@
#define HAVE_RAND 1 #define HAVE_RAND 1
/* Define if you have the random function. */ /* Define if you have the random function. */
/* #define HAVE_RANDOM 1 */ #define HAVE_RANDOM 1
/* Define if you have the rint function. */ /* Define if you have the rint function. */
/* #define HAVE_RINT 1 */ /* #define HAVE_RINT 1 */
@ -94,36 +78,24 @@
/* Define if you have the strstr function. */ /* Define if you have the strstr function. */
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
/* Define if you have the timegm function. */
/* #define HAVE_TIMEGM 1 */
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
/* Define if you have the <getopt.h> header file. */ /* Define if you have the <getopt.h> header file. */
/* #define HAVE_GETOPT_H 1 */ #define HAVE_GETOPT_H 1
/* Define if you have the <malloc.h> header file. */ /* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1 #define HAVE_MALLOC_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <stdlib.h> header file. */ /* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1 #define HAVE_STDLIB_H 1
/* Define if you have the <sys/param.h> header file. */ /* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */ /* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/timeb.h> header file. */ /* Define if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1 #define HAVE_SYS_TIMEB_H 1
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
/* Define if you have the <unistd.h> header file. */ /* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */ /* #define HAVE_UNISTD_H 1 */
@ -139,17 +111,51 @@
/* Define if you have the GL library (-lGL). */ /* Define if you have the GL library (-lGL). */
#define HAVE_LIBGL 1 #define HAVE_LIBGL 1
/* Define if you have the GLU library (-lGLU). */
#define HAVE_LIBGLU 1
/* Define if you have the GLcore library (-lGLcore). */ /* Define if you have the GLcore library (-lGLcore). */
/* #undef HAVE_LIBGLCORE */ /* #undef HAVE_LIBGLCORE */
/* Define if you have the GLU library (-lGLU). */ /* Define if you have the ICE library (-lICE). */
#define HAVE_LIBGLU 1 /* #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 if you have the glut library (-lglut). */
#define HAVE_LIBGLUT 1 #define HAVE_LIBGLUT 1
/* Define if you have the plibul library (-lplibul). */ /* Define if you have the m library (-lm). */
/* #undef HAVE_LIBPLIBUL */ #define HAVE_LIBM 1
/* Define if you have the socket library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
#define HAVE_MEMCPY 1
/* Name of package */
#define PACKAGE "FlightGear"

View file

@ -1591,6 +1591,14 @@ int main( int argc, char **argv ) {
ssgTexturePath( (char *)full_model.dir().c_str() ); ssgTexturePath( (char *)full_model.dir().c_str() );
ssgEntity *acmodel_obj = ssgLoad( (char *)full_model.c_str() ); ssgEntity *acmodel_obj = ssgLoad( (char *)full_model.c_str() );
if( !acmodel_obj ) {
// fall back to default
acmodel_obj = ssgLoad( (char *)"glider.ac" );
if( !acmodel_obj ) {
SG_LOG( SG_GENERAL, SG_ALERT, "FAILED to LOAD an AC model! ..." );
exit(-1);
}
}
// find moving parts (if this is an MDL model) // find moving parts (if this is an MDL model)
flaps_selector = (ssgSelector*)fgFindNode( acmodel_obj, "FLAPS" ); flaps_selector = (ssgSelector*)fgFindNode( acmodel_obj, "FLAPS" );

View file

@ -1,3 +1,7 @@
#ifndef _MSC_VER
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -17,3 +21,5 @@ int MSG_PEEK = 0x02; /* Peek at incoming messages. */
int MSG_WAITALL = 0x100; /* Wait for a full request. */ int MSG_WAITALL = 0x100; /* Wait for a full request. */
#define MSG_WAITALL MSG_WAITALL #define MSG_WAITALL MSG_WAITALL
#endif #endif
#endif /* !_MSC_VER */

View file

@ -1,3 +1,7 @@
#ifndef _MSC_VER
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -15,3 +19,5 @@
#ifndef MSG_WAITALL #ifndef MSG_WAITALL
#define MSG_WAITALL 0x100 /* Wait for a full request. */ #define MSG_WAITALL 0x100 /* Wait for a full request. */
#endif #endif
#endif /* !_MSC_VER */