X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FATC-Main.cxx;h=b70b4abf36eb584ce1d6ffd726a8d093000c1f64;hb=c47d4f2f3024336c4e11b769880ca6fbefda082d;hp=719e173d29e5d38ff6bf5600556ff60f5cd63d61;hpb=d9bfd5a425df1bad7e3c53a64adce871e299a6b9;p=flightgear.git diff --git a/src/Network/ATC-Main.cxx b/src/Network/ATC-Main.cxx index 719e173d2..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 @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -52,7 +53,7 @@ #include "ATC-Main.hxx" -SG_USING_STD(string); +using std::string; // Lock the ATC hardware @@ -94,7 +95,15 @@ void FGATCMain::init_config() { if ( envp != NULL ) { SGPath atcsim_config( envp ); atcsim_config.append( ".fgfs-atc610x.xml" ); - readProperties( atcsim_config.str(), globals->get_props() ); + try { + SG_LOG(SG_GENERAL, SG_ALERT, + "Warning: loading deprecated config file: " << + atcsim_config.str() ); + readProperties( atcsim_config.str(), globals->get_props() ); + } catch (const sg_exception &e) { + // fail silently, this is an old style config file I want to continue + // to support if it exists. + } } #endif }