From 00e9ad3055fa1107841ed92be17181b15477ef27 Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 23 Jan 2010 22:26:30 +0000 Subject: [PATCH] =?UTF-8?q?MINGW=20patch=20from=20Beno=EEt=20Laniel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configure.ac | 44 ++++++++++++++++++++++++++--- src/GUI/gui.h | 2 +- src/GUI/gui_funcs.cxx | 20 ++++++------- src/GUI/menubar.cxx | 4 +-- src/Include/fg_typedefs.h | 11 +++++--- src/Input/Makefile.am | 2 +- src/Input/fgjs.cxx | 10 +++---- src/Input/js_demo.cxx | 2 +- src/Main/Makefile.am | 8 +----- src/Main/bootstrap.cxx | 2 +- src/Main/fg_commands.cxx | 2 +- src/Main/fg_init.cxx | 12 ++++---- src/Main/fg_os_osgviewer.cxx | 29 +++++++++++++++++++ src/Main/main.cxx | 2 +- src/Network/ATC-Main.cxx | 2 +- src/Network/ATC-Outputs.cxx | 4 +-- src/Network/native_ctrls.cxx | 2 +- src/Network/native_fdm.cxx | 2 +- src/Network/native_gui.cxx | 4 ++- src/Scripting/NasalSys.cxx | 2 +- utils/GPSsmooth/UGear_main.cxx | 2 +- utils/TerraSync/terrasync.cxx | 4 +++ utils/fgadmin/src/Makefile.am | 2 +- utils/fgadmin/src/fgadmin_funcs.cxx | 2 +- utils/fgadmin/src/untarka.c | 2 +- utils/fgviewer/Makefile.am | 2 +- utils/js_server/js_server.cxx | 2 +- 27 files changed, 124 insertions(+), 58 deletions(-) diff --git a/configure.ac b/configure.ac index 42c49b571..6a9067389 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/GUI/gui.h b/src/GUI/gui.h index 5b8478e95..2563251d8 100644 --- a/src/GUI/gui.h +++ b/src/GUI/gui.h @@ -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(); diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index 5b943d662..52eb06662 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -51,12 +51,12 @@ #include
#include -#if defined( WIN32 ) && !defined( __CYGWIN__ ) && !defined(__MINGW32__) +#ifdef _WIN32 +# include +# if !defined(__MINGW32__) # include # include -#endif -#ifdef __MINGW32__ -#include +# 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 () { diff --git a/src/GUI/menubar.cxx b/src/GUI/menubar.cxx index 513277dfc..3cd03bbcc 100644 --- a/src/GUI/menubar.cxx +++ b/src/GUI/menubar.cxx @@ -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 }, diff --git a/src/Include/fg_typedefs.h b/src/Include/fg_typedefs.h index 68220faa8..4c4afdd65 100644 --- a/src/Include/fg_typedefs.h +++ b/src/Include/fg_typedefs.h @@ -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 diff --git a/src/Input/Makefile.am b/src/Input/Makefile.am index c6ec7dba1..4436e28b5 100644 --- a/src/Input/Makefile.am +++ b/src/Input/Makefile.am @@ -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) diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index 5527514d5..9391c022a 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -28,8 +28,8 @@ #include -#if defined( _MSC_VER ) || defined( __MINGW32__ ) -# include +#ifdef _WIN32 +# include #endif #include @@ -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 diff --git a/src/Input/js_demo.cxx b/src/Input/js_demo.cxx index 189dd3d23..ee2b32e30 100644 --- a/src/Input/js_demo.cxx +++ b/src/Input/js_demo.cxx @@ -98,7 +98,7 @@ int main ( int, char ** ) /* give other processes a chance */ -#ifdef WIN32 +#ifdef _WIN32 Sleep ( 1 ) ; #elif defined(sgi) sginap ( 1 ) ; diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index 0994d859a..b4e2d592e 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -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) \ diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index 6b4f08569..877712d35 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -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 diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index f998b5d6c..c8b938473 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -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 ); diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index dc64bc9c3..99a2ea6a6 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -32,12 +32,12 @@ #if defined( unix ) || defined( __CYGWIN__ ) # include // for gethostname() #endif -#if defined( _MSC_VER) || defined(__MINGW32__) +#ifdef _WIN32 # include // for getcwd() # define getcwd _getcwd # include // 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 ); diff --git a/src/Main/fg_os_osgviewer.cxx b/src/Main/fg_os_osgviewer.cxx index 3287e7023..b58d60664 100644 --- a/src/Main/fg_os_osgviewer.cxx +++ b/src/Main/fg_os_osgviewer.cxx @@ -59,6 +59,35 @@ #include "WindowBuilder.hxx" #include "WindowSystemAdapter.hxx" +// Static linking of OSG needs special macros +#ifdef OSG_LIBRARY_STATIC +#include +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. diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 7f7152d8d..8ac54aa56 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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"; diff --git a/src/Network/ATC-Main.cxx b/src/Network/ATC-Main.cxx index 709a812d0..b70b4abf3 100644 --- a/src/Network/ATC-Main.cxx +++ b/src/Network/ATC-Main.cxx @@ -32,7 +32,7 @@ #include #include #include //snprintf -#if defined( _MSC_VER ) || defined(__MINGW32__) +#ifdef _WIN32 # include //lseek, read, write #endif diff --git a/src/Network/ATC-Outputs.cxx b/src/Network/ATC-Outputs.cxx index 480ad7143..97a8df771 100644 --- a/src/Network/ATC-Outputs.cxx +++ b/src/Network/ATC-Outputs.cxx @@ -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); diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 16a2da980..d7bd3f6bf 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -39,7 +39,7 @@ #if defined( _MSC_VER ) # include #elif defined( __MINGW32__ ) -# include +# include #else # include // htonl() ntohl() #endif diff --git a/src/Network/native_fdm.cxx b/src/Network/native_fdm.cxx index 16b57d062..4fa6275ce 100644 --- a/src/Network/native_fdm.cxx +++ b/src/Network/native_fdm.cxx @@ -42,7 +42,7 @@ #if defined( _MSC_VER ) # include #elif defined( __MINGW32__ ) -# include +# include #else # include // htonl() ntohl() #endif diff --git a/src/Network/native_gui.cxx b/src/Network/native_gui.cxx index 917182252..d7310101a 100644 --- a/src/Network/native_gui.cxx +++ b/src/Network/native_gui.cxx @@ -39,8 +39,10 @@ #include "native_gui.hxx" // FreeBSD works better with this included last ... (?) -#if defined(WIN32) && !defined(__CYGWIN__) +#if defined( _MSC_VER ) # include +#elif defined( __MINGW32__ ) +# include #else # include // htonl() ntohl() #endif diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 3b1d99529..dc8b0d434 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -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); diff --git a/utils/GPSsmooth/UGear_main.cxx b/utils/GPSsmooth/UGear_main.cxx index 4352e1c72..e814c2e07 100644 --- a/utils/GPSsmooth/UGear_main.cxx +++ b/utils/GPSsmooth/UGear_main.cxx @@ -2,7 +2,7 @@ # include #endif -#if !defined( _MSC_VER ) && !defined( __MINGW32__ ) +#ifndef _WIN32 # include // for bzero() #else # define bzero(a,b) memset(a,0,b) diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx index 21fa10b1c..e586632dd 100644 --- a/utils/TerraSync/terrasync.cxx +++ b/utils/TerraSync/terrasync.cxx @@ -29,6 +29,10 @@ #include #endif +#ifdef __MINGW32__ +#include +#include +#endif #include // atoi() atof() abs() system() diff --git a/utils/fgadmin/src/Makefile.am b/utils/fgadmin/src/Makefile.am index c01595203..e646719c0 100644 --- a/utils/fgadmin/src/Makefile.am +++ b/utils/fgadmin/src/Makefile.am @@ -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 diff --git a/utils/fgadmin/src/fgadmin_funcs.cxx b/utils/fgadmin/src/fgadmin_funcs.cxx index c8530a4c8..e8d2c9a0c 100644 --- a/utils/fgadmin/src/fgadmin_funcs.cxx +++ b/utils/fgadmin/src/fgadmin_funcs.cxx @@ -26,7 +26,7 @@ #include #include -#ifdef _MSC_VER +#ifdef _WIN32 # include #endif diff --git a/utils/fgadmin/src/untarka.c b/utils/fgadmin/src/untarka.c index 8ca6b452a..6a0bb78ab 100644 --- a/utils/fgadmin/src/untarka.c +++ b/utils/fgadmin/src/untarka.c @@ -52,7 +52,7 @@ */ #undef DOSISH -#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) || MSC_VER > 1000 +#ifdef WIN32 # include # define DOSISH 1 # undef __STRICT_ANSI__ diff --git a/utils/fgviewer/Makefile.am b/utils/fgviewer/Makefile.am index 4f46419a2..1932bb8fd 100644 --- a/utils/fgviewer/Makefile.am +++ b/utils/fgviewer/Makefile.am @@ -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 diff --git a/utils/js_server/js_server.cxx b/utils/js_server/js_server.cxx index f52acbd6d..620b4b57e 100644 --- a/utils/js_server/js_server.cxx +++ b/utils/js_server/js_server.cxx @@ -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 ) ;