diff --git a/checkin_notes b/checkin_notes index 44425338b9..a7cae47928 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5710,3 +5710,15 @@ David 16 June 2009 boinc_getsockopt.m4 lib/ network.cpp,h + +David 16 June 2009 + - don't include config.h from parse.h + - manager: compile fix + + clientgui/ + BOINCClientManager.cpp + lib/ + parse.h + util.cpp + + diff --git a/clientgui/BOINCClientManager.cpp b/clientgui/BOINCClientManager.cpp index 133e7ed957..df5a0e51e8 100644 --- a/clientgui/BOINCClientManager.cpp +++ b/clientgui/BOINCClientManager.cpp @@ -143,7 +143,7 @@ bool CBOINCClientManager::IsBOINCCoreRunning() { char path[1024]; static FILE_LOCK file_lock; - sprintf(path, "%s/%s", (char *)wxGetApp().GetDataDirectory().char_str(), LOCK_FILE_NAME); + sprintf(path, "%s/%s", (char *)wxGetApp().GetDataDirectory().c_str(), LOCK_FILE_NAME); if (boinc_file_exists(path)) { // If there is no lock file, core is not running if (file_lock.lock(path)) { running = true; diff --git a/lib/parse.h b/lib/parse.h index 7a61e1c040..d9775d6d94 100644 --- a/lib/parse.h +++ b/lib/parse.h @@ -21,18 +21,10 @@ #ifdef _WIN32 #include "boinc_win.h" #else -#include "config.h" #include #include #include #include -#include -#ifdef HAVE_IEEEFP_H -#include -extern "C" { -int finite(double); -} -#endif #endif #include "miofile.h" @@ -56,6 +48,8 @@ public: void skip_unexpected(const char*, bool verbose, const char*); }; +extern bool boinc_is_finite(double); + /////////////// START DEPRECATED XML PARSER // Deprecated because it makes assumptions about // the format of the XML being parsed @@ -92,15 +86,11 @@ inline bool parse_double(const char* buf, const char* tag, double& x) { const char* p = strstr(buf, tag); if (!p) return false; y = atof(p+strlen(tag)); -#if defined (HPUX_SOURCE) - if (_Isfinite(y)) { -#else - if (finite(y)) { -#endif - x = y; - return true; + if (!boinc_is_finite(y)) { + return false; } - return false; + x = y; + return true; } extern bool parse(char* , char* ); diff --git a/lib/util.cpp b/lib/util.cpp index 7772b3c15e..ea1adbfd2c 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -39,6 +39,12 @@ #include #include #include +#ifdef HAVE_IEEEFP_H +#include +extern "C" { + int finite(double); +} +#endif #endif #include "error_numbers.h" @@ -520,4 +526,13 @@ int wait_client_mutex(const char* dir, double timeout) { return ERR_ALREADY_RUNNING; } +bool boinc_is_finite(double x) { +#if defined (HPUX_SOURCE) + return _Isfinite(x); + return false; +#else + return finite(x); +#endif +} + const char *BOINC_RCSID_ab65c90e1e = "$Id$";