- don't include config.h from parse.h

- manager: compile fix


svn path=/trunk/boinc/; revision=18429
This commit is contained in:
David Anderson 2009-06-16 19:22:11 +00:00
parent d7aacaac32
commit 0939ec0d3a
4 changed files with 34 additions and 17 deletions

View File

@ -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

View File

@ -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;

View File

@ -21,18 +21,10 @@
#ifdef _WIN32
#include "boinc_win.h"
#else
#include "config.h"
#include <cstdio>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
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* );

View File

@ -39,6 +39,12 @@
#include <errno.h>
#include <string>
#include <cstring>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
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$";