mirror of https://github.com/BOINC/boinc.git
Various files: simplify #includes.
On Windows, include boinc_win.h No references to STDWX_H, STDAFX_H etc. Note: .cpp files should not have a bunch of gnarly #if logic in their includes. If such logic is needed, put it in a central place.
This commit is contained in:
parent
ac4b390ee8
commit
fad4210f7b
|
@ -82,11 +82,8 @@
|
|||
// (not counting the part after the last checkpoint in an episode).
|
||||
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#include "version.h"
|
||||
#include "win_util.h"
|
||||
#else
|
||||
|
|
|
@ -24,11 +24,8 @@
|
|||
// To use this function, link your application with libboinc_opencl.a
|
||||
//
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#include "win_util.h"
|
||||
#else
|
||||
#include <string>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// Platform-independent code should NOT be here.
|
||||
//
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
// DEPRECATED - DO NOT USE
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -23,17 +23,11 @@
|
|||
|
||||
// DEPRECATED - use separate graphics app
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
extern void win_graphics_event_loop();
|
||||
#else
|
||||
#include "config.h"
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#include <pthread.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
// The part of BOINC's graphics utilities that uses GLUT char-drawing
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -17,16 +17,13 @@
|
|||
|
||||
// shared-library part of the implementation of REDUCE
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#include <GL/gl.h>
|
||||
#else
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "boinc_gl.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// This writes into a shared-memory structure
|
||||
// that's read by the graphics app
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
// originally adapted by Carl Christensen
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Visit My Site At nehe.gamedev.net
|
||||
* Adapted to BOINC by Eric Heien
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
||||
#include "boinc_win.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#include "win_util.h"
|
||||
|
||||
#ifndef InternetGetCookie
|
||||
|
|
|
@ -15,10 +15,8 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__)
|
||||
#ifdef _WIN32
|
||||
#include "boinc_win.h"
|
||||
#elif defined(_WIN32) && defined(__STDWX_H__)
|
||||
#include "stdwx.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
#ifdef _USING_FCGI_
|
||||
|
@ -33,10 +31,6 @@
|
|||
|
||||
#include "cert_sig.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
CERT_SIG::CERT_SIG() {
|
||||
this->clear();
|
||||
}
|
||||
|
|
|
@ -18,14 +18,8 @@
|
|||
// Stuff related to catching SEH exceptions, monitoring threads, and trapping
|
||||
// debugger messages; used by both core client and by apps.
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef __STDWX_H__
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include "stdwx.h"
|
||||
#endif
|
||||
#include "win_util.h"
|
||||
#endif
|
||||
|
||||
#ifndef __CYGWIN32__
|
||||
#include "stackwalker_win.h"
|
||||
|
|
|
@ -18,11 +18,7 @@
|
|||
// Code to run a BOINC application (main or graphics) under Windows
|
||||
// Don't include this in applications
|
||||
|
||||
#if defined(_WIN32) && !defined(__STDWX_H__)
|
||||
#include "boinc_win.h"
|
||||
#elif defined(_WIN32) && defined(__STDWX_H__)
|
||||
#include "stdwx.h"
|
||||
#endif
|
||||
|
||||
#include "win_util.h"
|
||||
#include "filesys.h"
|
||||
|
|
Loading…
Reference in New Issue