From ecc6548d71104bad07b5d55833e5871078f2dc46 Mon Sep 17 00:00:00 2001 From: durk Date: Mon, 4 Feb 2008 20:03:52 +0000 Subject: [PATCH] cygwin related fixes, and some minor future release related maintenance work. --- Makefile.am | 2 +- configure.ac | 2 ++ src/Airports/groundnetwork.cxx | 2 +- src/Cockpit/hud.hxx | 4 ++++ src/Environment/fgmetar.cxx | 7 +++++++ src/Input/Makefile.am | 2 +- src/Main/options.cxx | 11 +++++++++++ src/Network/lfsglass.cxx | 7 +++++++ utils/Modeller/photomodel.cxx | 8 ++++++++ utils/TerraSync/terrasync.cxx | 8 ++++++++ 10 files changed, 50 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1121dae8b..2b4f55ede 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ Thanks dist-hook: - (cd $(top_srcdir); $(HOME)/Projects/FlightGear/admin/am2dsp.pl) + (cd $(top_srcdir); $(HOME)/src/FlightGear-0.9/admin/am2dsp.pl) (cd $(top_srcdir); tar --exclude docs-mini/CVS --exclude hints/CVS \ -cf - docs-mini ) | (cd $(distdir); tar xvf -) rm -rf `find $(distdir)/projects -name CVS` diff --git a/configure.ac b/configure.ac index 7c8aa4065..39897e036 100644 --- a/configure.ac +++ b/configure.ac @@ -683,6 +683,8 @@ AC_CONFIG_FILES([ \ tests/Makefile \ utils/Makefile \ utils/GPSsmooth/Makefile \ + utils/fgadmin/Makefile + utils/fgadmin/src/Makefile \ utils/js_server/Makefile \ utils/Modeller/Makefile \ utils/TerraSync/Makefile \ diff --git a/src/Airports/groundnetwork.cxx b/src/Airports/groundnetwork.cxx index 99c9d9cd3..05f786a20 100644 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@ -791,7 +791,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat, //closest = current; previousInstruction = current->getSpeedAdjustment(); - double mindist = HUGE; + double mindist = HUGE_VAL; if (activeTraffic.size()) { double course, dist, bearing, minbearing; diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 91249e851..0977acb2d 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -38,6 +38,10 @@ # include #endif +#ifdef __CYGWIN__ +#include +#endif + #include #include diff --git a/src/Environment/fgmetar.cxx b/src/Environment/fgmetar.cxx index f29553673..d12d00189 100644 --- a/src/Environment/fgmetar.cxx +++ b/src/Environment/fgmetar.cxx @@ -32,6 +32,13 @@ * TODO * - NSC & mil. color codes */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif #include #include diff --git a/src/Input/Makefile.am b/src/Input/Makefile.am index b607855b7..df99e01f1 100644 --- a/src/Input/Makefile.am +++ b/src/Input/Makefile.am @@ -12,7 +12,7 @@ js_demo_LDADD = -lplibjs $(base_LIBS) $(joystick_LIBS) -lplibul fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h -fgjs_LDADD = -lplibjs $(base_LIBS) $(joystick_LIBS) -lplibul \ +fgjs_LDADD = -lplibjs -lplibul $(base_LIBS) $(joystick_LIBS) \ -lsgprops -lsgmisc -lsgio -lsgdebug -lsgstructure -lsgxml -lz INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/Main diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 50c104b02..9eb8956c7 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -1189,6 +1189,16 @@ fgOptRunway( const char *arg ) return FG_OPTIONS_OK; } +static int +fgOptParking( const char *arg ) +{ + cerr << "Processing argument " << arg << endl; + fgSetString("/sim/presets/parking", arg ); + fgSetBool ("/sim/presets/parking-requested", true ); + return FG_OPTIONS_OK; +} + + static map fgOptionMap; /* @@ -1395,6 +1405,7 @@ struct OptionDesc { {"min-status", true, OPTION_STRING, "/sim/aircraft-min-status", false, "all", 0 }, {"livery", true, OPTION_FUNC, "", false, "", fgOptLivery }, {"ai-scenario", true, OPTION_FUNC, "", false, "", fgOptScenario }, + {"parking-id", true, OPTION_FUNC, "", false, "", fgOptParking }, {0} }; diff --git a/src/Network/lfsglass.cxx b/src/Network/lfsglass.cxx index 5d805a290..a1ca7e97b 100644 --- a/src/Network/lfsglass.cxx +++ b/src/Network/lfsglass.cxx @@ -27,6 +27,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif #include #include diff --git a/utils/Modeller/photomodel.cxx b/utils/Modeller/photomodel.cxx index 6526bb8bd..a9d3c2e9a 100644 --- a/utils/Modeller/photomodel.cxx +++ b/utils/Modeller/photomodel.cxx @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif + #include #include // exit() diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx index c5b648e51..5c1fd578b 100644 --- a/utils/TerraSync/terrasync.cxx +++ b/utils/TerraSync/terrasync.cxx @@ -20,6 +20,14 @@ // // $Id$ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif + #include // atoi() atof() abs() system()