mirror of https://github.com/BOINC/boinc.git
[linux] Remove config.h from installable headers.
This fixes #2964. Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
parent
16d106128c
commit
0aff25170b
|
@ -23,7 +23,6 @@
|
|||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(_WIN32) || defined (__CYGWIN__)
|
||||
#include <cstdio>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2018 University of California
|
||||
// Copyright (C) 2020 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -52,6 +52,28 @@
|
|||
|
||||
using std::string;
|
||||
|
||||
unsigned long long boinc_strtoull(const char *str, char **endptr, int base) {
|
||||
#if (defined (__cplusplus) && __cplusplus > 199711L) || defined(HAVE_STRTOULL) || defined(__MINGW32__)
|
||||
return strtoull(str, endptr, base);
|
||||
#elif defined(_WIN32) && !defined(__MINGW32__)
|
||||
return _strtoui64(str, endptr, base);
|
||||
#else
|
||||
char buf[64];
|
||||
char *p;
|
||||
unsigned long long y;
|
||||
strncpy(buf, str, sizeof(buf)-1);
|
||||
strip_whitespace(buf);
|
||||
p = strstr(buf, "0x");
|
||||
if (!p) p = strstr(buf, "0X");
|
||||
if (p) {
|
||||
sscanf(p, "%llx", &y);
|
||||
} else {
|
||||
sscanf(buf, "%llu", &y);
|
||||
}
|
||||
return y;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Parse a boolean; tag is of form "foobar"
|
||||
// Accept either <foobar/>, <foobar />, or <foobar>0|1</foobar>
|
||||
// (possibly with leading/trailing white space)
|
||||
|
|
28
lib/parse.h
28
lib/parse.h
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// Copyright (C) 2020 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -23,8 +23,6 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "miofile.h"
|
||||
#include "error_numbers.h"
|
||||
#include "str_util.h"
|
||||
|
@ -287,29 +285,7 @@ inline bool match_tag(const std::string &s, const char* tag) {
|
|||
return match_tag(s.c_str(), tag);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#define boinc_strtoull _strtoui64
|
||||
#else
|
||||
#if defined(HAVE_STRTOULL) || defined(__MINGW32__)
|
||||
#define boinc_strtoull strtoull
|
||||
#else
|
||||
inline unsigned long long boinc_strtoull(const char *s, char **, int) {
|
||||
char buf[64];
|
||||
char *p;
|
||||
unsigned long long y;
|
||||
strncpy(buf, s, sizeof(buf)-1);
|
||||
strip_whitespace(buf);
|
||||
p = strstr(buf, "0x");
|
||||
if (!p) p = strstr(buf, "0X");
|
||||
if (p) {
|
||||
sscanf(p, "%llx", &y);
|
||||
} else {
|
||||
sscanf(buf, "%llu", &y);
|
||||
}
|
||||
return y;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
extern unsigned long long boinc_strtoull(const char *, char **, int);
|
||||
|
||||
// parse an integer of the form <tag>1234</tag>
|
||||
// return true if it's there
|
||||
|
|
Loading…
Reference in New Issue