]> git.mxchange.org Git - flightgear.git/commitdiff
MINGW patch from Benoît Laniel
authorfredb <fredb>
Sat, 23 Jan 2010 22:26:30 +0000 (22:26 +0000)
committerTim Moore <timoore@redhat.com>
Mon, 25 Jan 2010 16:12:04 +0000 (17:12 +0100)
27 files changed:
configure.ac
src/GUI/gui.h
src/GUI/gui_funcs.cxx
src/GUI/menubar.cxx
src/Include/fg_typedefs.h
src/Input/Makefile.am
src/Input/fgjs.cxx
src/Input/js_demo.cxx
src/Main/Makefile.am
src/Main/bootstrap.cxx
src/Main/fg_commands.cxx
src/Main/fg_init.cxx
src/Main/fg_os_osgviewer.cxx
src/Main/main.cxx
src/Network/ATC-Main.cxx
src/Network/ATC-Outputs.cxx
src/Network/native_ctrls.cxx
src/Network/native_fdm.cxx
src/Network/native_gui.cxx
src/Scripting/NasalSys.cxx
utils/GPSsmooth/UGear_main.cxx
utils/TerraSync/terrasync.cxx
utils/fgadmin/src/Makefile.am
utils/fgadmin/src/fgadmin_funcs.cxx
utils/fgadmin/src/untarka.c
utils/fgviewer/Makefile.am
utils/js_server/js_server.cxx

index 42c49b571753342c81c618a8cd48cb141839ab76..6a90673896342b5c3a834e4e5229c95de7de4fd2 100644 (file)
@@ -17,6 +17,7 @@ AC_PROG_MAKE_SET
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CXX
+AC_PROG_CXXCPP
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -216,7 +217,6 @@ if test "x$with_threads" = "xyes"; then
     CFLAGS="$CFLAGS -D_REENTRANT"
 fi
 AC_CHECK_HEADER(pthread.h)
-AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
 
 dnl Used by JSBSim to conditionally compile in fgfs interface code
 AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
@@ -276,6 +276,7 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then
   if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
     CXXFLAGS="-pthread $CXXFLAGS"
     CFLAGS="-pthread $CFLAGS"
+    LIBS="-lsgthreads $LIBS"
   fi
 fi
 
@@ -404,7 +405,7 @@ case "${host}" in
     dnl CygWin under Windoze.
     INCLUDES="$INCLUDES -I/usr/local/include/"
     LIBS="$LIBS -L/usr/local/lib"
-    AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal ] )
+    AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal 'openal -ldsound -lwinmm' ] )
     AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] )
     LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
     openal_LIBS="$LIBS"
@@ -681,7 +682,7 @@ case "${host}" in
         AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
         AC_CHECK_LIB(osgSimd,osgSimGetVersion)
         AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
-        LIBS="$LIBS -losgFXd"
+        LIBS="$LIBS -losgFXd $opengl_LIBS"
     else
         AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
         AC_CHECK_LIB(osg,osgGetVersion)
@@ -692,7 +693,7 @@ case "${host}" in
         AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
         AC_CHECK_LIB(osgSim,osgSimGetVersion)
         AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
-        LIBS="$LIBS -losgFX"
+        LIBS="$LIBS -losgFX $opengl_LIBS"
     fi
     ;;
 esac
@@ -718,6 +719,41 @@ AC_COMPILE_IFELSE(
   [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK])
    AC_MSG_RESULT([yes])],
   [AC_MSG_RESULT([no])])
+
+# Special handling for static version of OSG
+if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_LIBRARY_STATIC" 2>/dev/null`" ; then
+    saved_LIBS="$LIBS"
+    LIBS=""
+    #***** Check image support (needed for static build) *****
+    AC_SEARCH_LIBS([jpeg_read_header], [jpeg], [CPPFLAGS="$CPPFLAGS -DOSG_JPEG_ENABLED"])
+    AC_SEARCH_LIBS([png_read_image], [png 'png -lz'], [CPPFLAGS="$CPPFLAGS -DOSG_PNG_ENABLED"])
+    AC_SEARCH_LIBS([TIFFOpen], [tiff], [CPPFLAGS="$CPPFLAGS -DOSG_TIFF_ENABLED"])
+    img_LIBS="$LIBS"
+    LIBS="$saved_LIBS"
+
+    if test "x$with_osg" != "x" ; then
+        osg_prefix="$with_osg"
+    else
+        osg_prefix="/usr"
+    fi
+    PKG_CHECK_EXISTS([openscenegraph], [osg_version="`$PKG_CONFIG --modversion openscenegraph 2>/dev/null`"])
+    LIBS="-L$osg_prefix/lib/osgPlugins-$osg_version -losgdb_bmp -losgdb_dds -losgdb_hdr -losgdb_pic -losgdb_pnm -losgdb_rgb -losgdb_tga \
+                                                          -losgdb_3ds -losgdb_ac -losgdb_ive -losgdb_osg -losgdb_txf \
+                                                          -losgVolume -losgTerrain $LIBS -losgUtil"
+
+    if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_JPEG_ENABLED" 2>/dev/null`" ; then
+      LIBS="$LIBS -losgdb_jpeg"
+    fi
+    if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_PNG_ENABLED" 2>/dev/null`" ; then
+      LIBS="$LIBS -losgdb_png"
+    fi
+    if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_TIFF_ENABLED" 2>/dev/null`" ; then
+      LIBS="$LIBS -losgdb_tiff"
+    fi
+
+    LIBS="$LIBS $img_LIBS"
+fi
+
 AC_LANG_POP
 
 dnl Check for system installed zlib
index 5b8478e95f2023cf21db372f9c358742017279ed..2563251d888688a8be64482035a2829e0b02b3b3 100644 (file)
@@ -61,7 +61,7 @@ extern void fgDumpSnapShotWrapper();
 extern void fgHiResDumpWrapper();
 extern void fgHiResDump();
 #endif
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 extern void printScreen();
 #endif
 extern void helpCb();
index 5b943d662733386a7af74a89613f414216d1312c..52eb06662e95582229c0cf11af4f55bd89d031bf 100644 (file)
 #include <Main/viewmgr.hxx>
 #include <GUI/new_gui.hxx>
 
-#if defined( WIN32 ) && !defined( __CYGWIN__ ) && !defined(__MINGW32__)
+#ifdef _WIN32
+#  include <shellapi.h>
+# if !defined(__MINGW32__)
 #  include <simgear/screen/win32-printer.h>
 #  include <simgear/screen/GlBitmaps.h>
-#endif
-#ifdef __MINGW32__
-#include <shellapi.h>
+# endif
 #endif
 #include "gui.h"
 
@@ -75,7 +75,7 @@ const __fg_gui_fn_t __fg_gui_fn[] = {
         {"dumpHiResSnapShot", fgHiResDumpWrapper},
 #endif
         {"dumpSnapShot", fgDumpSnapShotWrapper},
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
         {"printScreen", printScreen},
 #endif
         // Help
@@ -170,7 +170,7 @@ void helpCb ()
     SGPath path( globals->get_fg_root() );
     path.append( "Docs/index.html" );
        
-#if !defined(WIN32)
+#ifndef _WIN32
 
     command = globals->get_browser();
     string::size_type pos;
@@ -182,7 +182,7 @@ void helpCb ()
     command += " &";
     system( command.c_str() );
 
-#else // WIN32
+#else // _WIN32
 
     // Look for favorite browser
     char Dummy[1024], ExecName[1024], browserParameter[1024];
@@ -404,7 +404,7 @@ void fgHiResDump()
 #endif // #if defined( TR_HIRES_SNAP)
 
 
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 
 void rotateView( double roll, double pitch, double yaw )
 {
@@ -441,7 +441,7 @@ GLubyte *hiResScreenCapture( int multiplier )
 }
 #endif
 
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 // win32 print screen function
 void printScreen () {
     int mouse = fgGetMouseCursor();
@@ -455,7 +455,7 @@ void printScreen () {
 
     fgSetMouseCursor(mouse);
 }
-#endif // #ifdef WIN32
+#endif // #ifdef _WIN32
 
 
 void fgDumpSnapShotWrapper () {
index 513277dfc0f97f1dbd5b75feff4166996033b95e..3cd03bbcc494022e4b02184e63487f91da6b20fa 100644 (file)
@@ -36,7 +36,7 @@ do_hires_snapshot_dialog (const SGPropertyNode * arg)
 }
 #endif // TR_HIRES_SNAP
 
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 extern void printScreen ();
 static bool
 do_print_dialog (const SGPropertyNode * arg)
@@ -61,7 +61,7 @@ static struct {
 #if defined(TR_HIRES_SNAP)
     { "old-hires-snapshot-dialog", do_hires_snapshot_dialog },
 #endif
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
     { "old-print-dialog", do_print_dialog },
 #endif
     { "old-help-dialog", do_help_dialog },
index 68220faa8c16d8a2b95b66fd58e3ef241c1dfcb9..4c4afdd65b30eb870f7564d90ce3ff56dc51c480 100644 (file)
@@ -2,8 +2,11 @@
 //  Alterations: Copyright C. Hotchkiss 1996
 //
 // $Log$
-// Revision 1.1  2002/09/10 01:14:04  curt
-// Initial revision
+// Revision 1.2  2010/01/23 22:26:52  fredb
+// MINGW patch from Benoît Laniel
+//
+// Revision 1.1.1.1  2002-09-10 01:14:04  curt
+// Initial revision of FlightGear-0.9.0
 //
 // Revision 1.2  2001/05/16 21:27:59  curt
 // Added David Megginson's patch for reconfigurable keyboard bindings.
@@ -75,11 +78,11 @@ typedef long           LONG ;    // 32-bit signed data
 typedef unsigned long  ULONG ;   // 32-bit unsigned data
 
 typedef unsigned short UWORD;   // Unsigned 16 bit quantity (WIN=SHORT)
-#if !defined(WIN32)
+#ifndef _WIN32
 typedef signed   short WORD;    // Signed   16 bit quantity
 #endif
 typedef BYTE           UBYTE;    // Used in some 3rd party code
-#ifndef WIN32
+#ifndef _WIN32
 typedef int            BOOLEAN;  //
 #endif
 
index c6ec7dba17c073967239cbee27a0d2fbc6542d17..4436e28b5aa6c5dfe34f9a1a12f574b39f65be0a 100644 (file)
@@ -47,7 +47,7 @@ js_demo_LDADD = $(js_demo_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS)
 fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h
 
 fgjs_LDADD = $(js_demo_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS) \
-       -lsgprops -lsgmisc -lsgio -lsgdebug -lsgstructure -lsgxml -lz
+       -lsgprops -lsgmisc -lsgio -lsgdebug -lsgstructure -lsgxml -lz $(network_LIBS)
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/Main \
        $(libInput_Event_INCLUDES)
index 5527514d5d49c1098ce62963dd93dd18d27d0422..9391c022afd879447c73db2e4790c698f4664a86 100644 (file)
@@ -28,8 +28,8 @@
 
 #include <simgear/compiler.h>
 
-#if defined( _MSC_VER ) || defined( __MINGW32__ )
-#  include <Winsock2.h>
+#ifdef _WIN32
+#  include <winsock2.h>
 #endif
 
 #include <math.h>
@@ -338,9 +338,9 @@ string getFGRoot ( int argc, char **argv ) {
     // find fg-root any other way.
     if ( root.empty() ) {
 #if defined( __CYGWIN__ )
-        root = "/FlightGear";
-#elif defined( WIN32 )
-        root = "\\FlightGear";
+        root = "../data";
+#elif defined( _WIN32 )
+        root = "..\\data";
 #elif defined(OSX_BUNDLE)
         /* the following code looks for the base package directly inside
             the application bundle. This can be changed fairly easily by
index 189dd3d239f903b87892d3d6b3cdb40cec6f91c7..ee2b32e3011548a7dacbbd081f7df33ac08ceda8 100644 (file)
@@ -98,7 +98,7 @@ int main ( int, char ** )
 
     /* give other processes a chance */
 
-#ifdef WIN32
+#ifdef _WIN32
     Sleep ( 1 ) ;
 #elif defined(sgi)
     sginap ( 1 ) ;
index 0994d859ad1c585049c147cb8f712a262dd1bec7..b4e2d592e6e7fc0cf4a04376c0b693092ea47f72 100644 (file)
@@ -9,12 +9,6 @@ else
 SP_FDM_LIBS = 
 endif
 
-if WITH_THREADS
-THREAD_LIBS = -lsgthreads $(thread_LIBS)
-else
-THREAD_LIBS =
-endif
-
 if WITH_EVENTINPUT
 EVENT_LIBS = $(eventinput_LIBS)
 else
@@ -119,7 +113,7 @@ fgfs_LDADD = \
        -lsgserial -lsgstructure -lsgenvironment \
         $(fgfs_PLIB_LIBS) \
        $(OSG_LIBS) \
-       $(THREAD_LIBS) \
+       $(thread_LIBS) \
        $(network_LIBS) \
        -lz \
        $(opengl_LIBS) \
index 6b4f08569a7a70f6d3f0c346c972b11113c7e29d..877712d359f920f2ef0dd2c3338796ba6af2cc7e 100644 (file)
@@ -183,7 +183,7 @@ int main ( int argc, char **argv ) {
     }
     initFPE();
 #endif
-#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
+#ifndef _WIN32
     signal(SIGPIPE, SIG_IGN);
 #endif
 
index f998b5d6c23da013baf767b0df574ccabbcabe90..c8b938473cd1218e06d305653c4166051fa0d0fd 100644 (file)
@@ -189,7 +189,7 @@ do_exit (const SGPropertyNode * arg)
     fgSetBool("/sim/signals/exit", true);
 
     if (fgGetBool("/sim/startup/save-on-exit")) {
-#ifdef _MSC_VER
+#ifdef _WIN32
         char* envp = ::getenv( "APPDATA" );
         if ( envp != NULL ) {
             SGPath config( envp );
index dc64bc9c3b452b0bfc7312760adff91bdef1c0b3..99a2ea6a688bd817ad85b7a3542a73faa4dd7fbd 100644 (file)
 #if defined( unix ) || defined( __CYGWIN__ )
 #  include <unistd.h>           // for gethostname()
 #endif
-#if defined( _MSC_VER) || defined(__MINGW32__)
+#ifdef _WIN32
 #  include <direct.h>           // for getcwd()
 #  define getcwd _getcwd
 #  include <io.h>               // isatty()
 #  define isatty _isatty
-#  include "Winsock2.h"                // for gethostname()
+#  include "winsock2.h"                // for gethostname()
 #endif
 
 // work around a stdc++ lib bug in some versions of linux, but doesn't
@@ -269,9 +269,9 @@ bool fgInitFGRoot ( int argc, char **argv ) {
     // find fg-root any other way.
     if ( root.empty() ) {
 #if defined( __CYGWIN__ )
-        root = "/FlightGear";
-#elif defined( WIN32 )
-        root = "\\FlightGear";
+        root = "../data";
+#elif defined( _WIN32 )
+        root = "..\\data";
 #elif defined(__APPLE__) 
         /*
         The following code looks for the base package inside the application 
@@ -585,7 +585,7 @@ bool fgInitConfig ( int argc, char **argv ) {
     }
 
     SGPropertyNode autosave;
-#if defined( _MSC_VER ) || defined( __MINGW32__ )
+#ifdef _WIN32
     char *envp = ::getenv( "APPDATA" );
     if (envp != NULL ) {
         SGPath config( envp );
index 3287e702332a0ab872de5ffb15592758d83f4965..b58d60664ba7cacc5fd3b1500868d9f5aa4b8b35 100644 (file)
 #include "WindowBuilder.hxx"
 #include "WindowSystemAdapter.hxx"
 
+// Static linking of OSG needs special macros
+#ifdef OSG_LIBRARY_STATIC
+#include <osgDB/Registry>
+USE_GRAPHICSWINDOW();
+// Image formats
+USE_OSGPLUGIN(bmp);
+USE_OSGPLUGIN(dds);
+USE_OSGPLUGIN(hdr);
+USE_OSGPLUGIN(pic);
+USE_OSGPLUGIN(pnm);
+USE_OSGPLUGIN(rgb);
+USE_OSGPLUGIN(tga);
+#ifdef OSG_JPEG_ENABLED
+  USE_OSGPLUGIN(jpeg);
+#endif
+#ifdef OSG_PNG_ENABLED
+  USE_OSGPLUGIN(png);
+#endif
+#ifdef OSG_TIFF_ENABLED
+  USE_OSGPLUGIN(tiff);
+#endif
+// Model formats
+USE_OSGPLUGIN(3ds);
+USE_OSGPLUGIN(ac);
+USE_OSGPLUGIN(ive);
+USE_OSGPLUGIN(osg);
+USE_OSGPLUGIN(txf);
+#endif
+
 // fg_os implementation using OpenSceneGraph's osgViewer::Viewer class
 // to create the graphics window and run the event/update/render loop.
 
index 7f7152d8d031d8e6c8b311e2ebe7f291af53b7bc..8ac54aa5695984ea8d671a3e80b50954dad03b14 100644 (file)
@@ -783,7 +783,7 @@ static void fgIdleFunction ( void ) {
 
 # if defined( __CYGWIN__ )
             string command = "start /m `cygpath -w " + mp3file.str() + "`";
-# elif defined( WIN32 )
+# elif defined( _WIN32 )
             string command = "start /m " + mp3file.str();
 # else
             string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1";
index 709a812d0d44ce7d6bbee5767980e837f51b924f..b70b4abf36eb584ce1d6ffd726a8d093000c1f64 100644 (file)
@@ -32,7 +32,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>              //snprintf
-#if defined( _MSC_VER ) || defined(__MINGW32__)
+#ifdef _WIN32
 #  include <io.h>                 //lseek, read, write
 #endif
 
index 480ad7143b68b41d05340652627db97392a087ad..97a8df77169a19635f56fcebec117f52d3178f4e 100644 (file)
@@ -348,9 +348,7 @@ bool FGATCOutput::open( int lock_fd ) {
 
        ATCRelease( lock_fd );
 
-#if defined( _MSC_VER )
-       ulMilliSecondSleep(33);
-#elif defined (WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
         Sleep (33);
 #else
        usleep(33);
index 16a2da980aec1b32514b02ccd1d8b43f3f3ffc6b..d7bd3f6bfa4936a5619b64237dcba25667edbea1 100644 (file)
@@ -39,7 +39,7 @@
 #if defined( _MSC_VER )
 #  include <windows.h>
 #elif defined( __MINGW32__ )
-#  include <Winsock2.h>
+#  include <winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
index 16b57d0624a378d17ad5c44004142011ff5975a2..4fa6275cedd7937179b35feaf855ae69576d0841 100644 (file)
@@ -42,7 +42,7 @@
 #if defined( _MSC_VER )
 #  include <windows.h>
 #elif defined( __MINGW32__ )
-#  include <Winsock2.h>
+#  include <winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
index 9171822521f119071b6f9588642dc4a1f6d93bac..d7310101a96bd2c91420a8a57398ff39a5883c45 100644 (file)
 #include "native_gui.hxx"
 
 // FreeBSD works better with this included last ... (?)
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined( _MSC_VER )
 #  include <windows.h>
+#elif defined( __MINGW32__ )
+#  include <winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
index 3b1d995293ff896eef9ef91bcbf74065617fdd54..dc8b0d4342b94c99c25d3eea60f157348b6b4bca 100644 (file)
@@ -415,7 +415,7 @@ static naRef f_parsexml(naContext c, naRef me, int argc, naRef* args)
 // Return UNIX epoch time in seconds.
 static naRef f_systime(naContext c, naRef me, int argc, naRef* args)
 {
-#ifdef WIN32
+#ifdef _WIN32
     FILETIME ft;
     GetSystemTimeAsFileTime(&ft);
     double t = (4294967296.0 * ft.dwHighDateTime + ft.dwLowDateTime);
index 4352e1c721e7d787421b3986e387fcc17edc1480..e814c2e07431767975c150dcdb11e7fff02d8f26 100644 (file)
@@ -2,7 +2,7 @@
 #  include <config.h>
 #endif
 
-#if !defined( _MSC_VER ) && !defined( __MINGW32__ )
+#ifndef _WIN32
 #  include <strings.h>         // for bzero()
 #else
 #  define bzero(a,b) memset(a,0,b)
index 21fa10b1c011e8b81f5f37bfcd31a354f1a59bdb..e586632dda8cd371d52a30e4c95d5ac3f8581bbe 100644 (file)
 #include <windows.h>
 #endif
 
+#ifdef __MINGW32__
+#include <time.h>
+#include <unistd.h>
+#endif
 
 #include <stdlib.h>             // atoi() atof() abs() system()
 
index c015952030bd9ff2d43f7374cfd7d22fd5791d8a..e646719c074033ebfad330988a096918e6f6a5fd 100644 (file)
@@ -8,7 +8,7 @@ fgadmin_SOURCES = \
        main.cxx \
        untarka.c untarka.h
 
-fgadmin_LDADD = -lsgmisc -lplibul -lz
+fgadmin_LDADD = -lsgmisc -lsgdebug -lplibul -lz
 
 fgadmin.cxx fgadmin.h: fgadmin.fl
        fluid -c fgadmin.fl
index c8530a4c88a922562049b1d5c0dff6c818d0c6b8..e8d2c9a0c1ae09a5e3cc9accf4fe6f5c7bf28736 100644 (file)
@@ -26,7 +26,7 @@
 #include <set>
 #include <sys/stat.h>
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 #  include <direct.h>
 #endif
 
index 8ca6b452a16689962315a7a8c56803e5e9997503..6a0bb78abe3218b72b3b4c5fe25582d30579df76 100644 (file)
@@ -52,7 +52,7 @@
  */
 
 #undef DOSISH
-#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) || MSC_VER > 1000
+#ifdef WIN32
 #  include <windows.h>
 #  define DOSISH 1
 #  undef __STRICT_ANSI__
index 4f46419a2516e2d497e1a11786e9fa74b29651ea..1932bb8fda280085c104f36bc230776da4e98068 100644 (file)
@@ -20,4 +20,4 @@ fgviewer_SOURCES = fgviewer.cxx
 fgviewer_LDADD = \
        -lsgtgdb -lsgmaterial -lsgmodel -lsgbvh -lsgutil -lsgio -lsgbucket \
        -lsgmath -lsgprops -lsgdebug -lsgmisc -lsgxml -lsgstructure \
-       $(fgviewer_PLIB_LIBS) $(OSG_LIBS) $(opengl_LIBS) $(THREAD_LIBS) -lz
+       $(fgviewer_PLIB_LIBS) $(OSG_LIBS) $(opengl_LIBS) $(thread_LIBS) -lz
index f52acbd6dce7986e2a2eb3ce6e761a9b76877374..620b4b57e5ea9c6922cce7c3fb0c2ff29d4cca2b 100644 (file)
@@ -126,7 +126,7 @@ int main ( int argc, char ** argv )
 
     /* give other processes a chance */
 
-#ifdef WIN32
+#ifdef _WIN32
     Sleep ( 1 ) ;
 #elif defined(sgi)
     sginap ( 1 ) ;