From: curt Date: Tue, 29 Jun 1999 15:32:53 +0000 (+0000) Subject: MSVC++ and FreeBSD portability tweaks. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=926849a2d34616218611abdf1dd3095bad37a9e9;p=flightgear.git MSVC++ and FreeBSD portability tweaks. --- diff --git a/Simulator/Cockpit/hud.hxx b/Simulator/Cockpit/hud.hxx index 079139e29..7ea442e15 100644 --- a/Simulator/Cockpit/hud.hxx +++ b/Simulator/Cockpit/hud.hxx @@ -57,6 +57,7 @@ FG_USING_STD(deque); FG_USING_STD(vector); +FG_USING_NAMESPACE(std); #ifndef WIN32 typedef struct { diff --git a/Simulator/GUI/gui.cxx b/Simulator/GUI/gui.cxx index 7bbd73b81..7e2e8e6ce 100644 --- a/Simulator/GUI/gui.cxx +++ b/Simulator/GUI/gui.cxx @@ -64,6 +64,10 @@ FG_USING_STD(string); +#ifndef FG_HAVE_NATIVE_SGI_COMPILERS +FG_USING_STD(cout); +#endif + puFont guiFnt = 0; fntTexFont *guiFntHandle = 0; @@ -595,7 +599,7 @@ void guiInit() // Install our fast fonts fntpath.append( "typewriter.txf" ); guiFntHandle = new fntTexFont ; - guiFntHandle -> load ( fntpath.c_str() ) ; + guiFntHandle -> load ( (char *)fntpath.c_str() ) ; puFont GuiFont ( guiFntHandle, 15 ) ; puSetDefaultFonts( GuiFont, GuiFont ) ; guiFnt = puGetDefaultLabelFont(); diff --git a/Simulator/Main/splash.cxx b/Simulator/Main/splash.cxx index 7f07e2918..d69e30b5c 100644 --- a/Simulator/Main/splash.cxx +++ b/Simulator/Main/splash.cxx @@ -109,6 +109,10 @@ void fgSplashUpdate ( double progress ) { int xsize = 480; int ysize = 380; + if ( !current_view.get_winWidth() || !current_view.get_winHeight() ) { + return; + } + xmin = (current_view.get_winWidth() - xsize) / 2; xmax = xmin + xsize; diff --git a/Tools/Construct/Parallel/client.cxx b/Tools/Construct/Parallel/client.cxx index 9115b91e5..2138b971e 100644 --- a/Tools/Construct/Parallel/client.cxx +++ b/Tools/Construct/Parallel/client.cxx @@ -2,6 +2,14 @@ /* -- for CSci 5502 */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_SYS_PARAM_H +# include // BSD macro definitions +#endif + #include #include #include @@ -45,7 +53,7 @@ void check_master_switch() { // check if the host system is free of interactive users int system_free() { -#ifndef __FreeBSD__ +#ifndef BSD struct utmp *uptr; setutent();