]> git.mxchange.org Git - flightgear.git/commitdiff
MSVC++ changes contributed by Geoff McLane.
authorcurt <curt>
Thu, 17 May 2001 21:55:22 +0000 (21:55 +0000)
committercurt <curt>
Thu, 17 May 2001 21:55:22 +0000 (21:55 +0000)
src/Airports/runways.hxx
src/FDM/UIUCModel/uiuc_menu.cpp
src/GUI/gui.cxx
src/Include/config.h-msvc6
src/Main/main.cxx
src/NetworkOLK/Tools/fgd.h
src/NetworkOLK/fgd.h

index 09fa3e632107d214eae848c96f3315c24387d518..5512097d8d44e3c41e709d6db9ee437f79249c21 100644 (file)
 #include STL_STRING
 #include <vector>
 
+#ifndef _MSC_VER
 #define NDEBUG                 // she don't work without it.
+#endif // !_MSC_VER
+
 #include <mk4.h>
 #include <mk4str.h>
+
+#ifndef _MSC_VER
 #undef NDEBUG
+#endif // !_MSC_VER
 
 SG_USING_STD(string);
 SG_USING_STD(vector);
index d94d953263205b768c768ce94532830614899b51..34ee6626ebaabfc4450913256bd6c0436acda1b1 100644 (file)
@@ -109,7 +109,7 @@ SG_USING_STD(cerr);
 SG_USING_STD(cout);
 SG_USING_STD(endl);
 
-#  ifndef _MSC_VR
+#  ifndef _MSC_VER
 SG_USING_STD(exit);
 #  endif
 #endif
index a0916ca59aa066aa07b4ee14cb5792f583e626ff..e9fb301de35f15228b20911e5e6622b623b0a487 100644 (file)
@@ -92,6 +92,10 @@ SG_USING_STD(string);
 SG_USING_STD(cout);
 #endif
 
+#ifdef  _MSC_VER
+#define  snprintf    _snprintf
+#endif   /* _MSC_VER */
+
 // main.cxx hack, should come from an include someplace
 extern void fgInitVisuals( void );
 extern void fgReshape( int width, int height );
index b38c5296ca615f7e2e165d6c45c29c0dc99672c7..8da1420cd51bac14da8d357b52aee777269a2919 100644 (file)
@@ -1,59 +1,49 @@
-/* src/Include/config.h.  Generated automatically by configure.  */
-/* src/Include/config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* Special single config.h for MSVC6 build - Geoff McLane - 10 May, 2001  */
+
+/* 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 - not used? */
+#define PACKAGE "FlightGear"
+
+/* Define to package version - use in main.cxx */
+#define FLIGHTGEAR_VERSION "MSVC6-FGFS32-0.7.7"
+
 /* Define as the return type of signal handlers (int or void).  */
 #define RETSIGTYPE void
 
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+/* #undef size_t */
+
 /* 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 X_DISPLAY_MISSING 1
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+/* #undef TIME_WITH_SYS_TIME */
+
+/* Define if your <sys/time.h> declares struct tm.  */
+#define TM_IN_SYS_TIME 1
 
-/* Define to enable audio support */
-#define ENABLE_AUDIO_SUPPORT 1
-   
-/* Define to enable plib joystick support (recommended) */
-#define ENABLE_PLIB_JOYSTICK 1
-   
-/* Define to eliminate all trace of debugging messages such as for a 
-   release build */
-/* #undef FG_NDEBUG */
-   
-/* Define to include Oliver's networking support */
-/* #undef FG_NETWORK_OLK */
-   
-/* Define to avoid Christian's new weather code */
-/* #undef FG_OLD_WEATHER */
-   
-/* Define if we are building FGFS (should always be defined) */
-#define FGFS 1
-
-/* Define to enable 3dfx/glide render in a window hack under unix.
-   This probably won't work under windows. */
-/* #define XMESA 1 */
-/* #define FX 1 */
-
-/* Define if you external variables daylight.  */
-/* #define HAVE_DAYLIGHT 1 */
-
-/* Define if you external variables timezone.  */
-/* #define HAVE_TIMEZONE 1 */
-
-/* Define if you have MetaKit installed system wide.  */
-#define HAVE_MK4 1
-
-/* Define if you have zlib installed system wide.  */
-/* #define HAVE_ZLIB 1 */
+/* Define to version number */
+#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 WIN32 1
 
-/* Define if you have the bcopy function.  */
-/* #define HAVE_BCOPY 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 GetLocalTime function.  */
-#define HAVE_GETLOCALTIME 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 memcpy function.  */
-#define HAVE_MEMCPY 1
-
 /* Define if you have the mktime function.  */
 #define HAVE_MKTIME 1
 
@@ -80,7 +64,7 @@
 #define HAVE_RAND 1
 
 /* Define if you have the random function.  */
-/* #define HAVE_RANDOM 1 */
+#define HAVE_RANDOM 1
 
 /* Define if you have the rint function.  */
 /* #define HAVE_RINT 1 */
 /* Define if you have the strstr function.  */
 #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 HAVE_FCNTL_H 1
 
 /* 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 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 HAVE_STDLIB_H 1
 
-/* Define if you have the <sys/param.h> header file.  */
-/* #define HAVE_SYS_PARAM_H 1 */
-
-/* Define if you have the <sys/stat.h> header file.  */
-#define HAVE_SYS_STAT_H 1
+/* Define if you have the <sys/time.h> header file.  */
+/* #define HAVE_SYS_TIME_H 1 */
 
 /* Define if you have the <sys/timeb.h> header file.  */
 #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 HAVE_UNISTD_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 GLU library (-lGLU).  */
-#define HAVE_LIBGLU 1
+/* 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 plibul library (-lplibul).  */
-/* #undef HAVE_LIBPLIBUL */
+/* 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 <memory.h> header file.  */
+#define HAVE_MEMORY_H 1
+
+#define HAVE_MEMCPY 1
+
 
-/* Name of package */
-#define PACKAGE "FlightGear"
index 07369723f8a0dc508e3cf2a7bc7d63df4ebf2323..27df4f04019756b4ed5d4e39f514f086c16cbc9d 100644 (file)
@@ -1591,6 +1591,14 @@ int main( int argc, char **argv ) {
 
     ssgTexturePath( (char *)full_model.dir().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)
     flaps_selector = (ssgSelector*)fgFindNode( acmodel_obj, "FLAPS" );
index ceedb5a74240268bf77354ff063fd7bb8a867f98..23510497ce938ddf810f187767201bbf5f5f2a00 100644 (file)
@@ -1,3 +1,7 @@
+
+
+#ifndef  _MSC_VER
+
 #include <sys/socket.h>
 #include <sys/types.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.  */
 #define MSG_WAITALL     MSG_WAITALL
 #endif
+
+#endif   /* !_MSC_VER */
index ee9cc19d6bce0ea3e31432a0f4cb924878be4ef9..74883cdfc1523c22cc2f1a51531c749a33b2ed0d 100644 (file)
@@ -1,3 +1,7 @@
+
+
+#ifndef  _MSC_VER
+
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -15,3 +19,5 @@
 #ifndef MSG_WAITALL
 #define MSG_WAITALL     0x100   /* Wait for a full request.  */
 #endif
+
+#endif   /* !_MSC_VER */