From ac4b390ee8ba78321b52c242a811941d779127c7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 4 Jun 2020 00:48:21 -0700 Subject: [PATCH 1/2] client/manager, Win: remove references to _STDWX_H_; not used anymore --- client/boinc_cmd.cpp | 5 +---- client/boinc_log.cpp | 5 +---- lib/app_ipc.cpp | 4 +--- lib/base64.cpp | 4 +--- lib/coproc.cpp | 4 +--- lib/crypt.cpp | 4 +--- lib/daemonmgt_win.cpp | 4 +--- lib/diagnostics.cpp | 4 +--- lib/filesys.cpp | 4 +--- lib/gui_rpc_client.cpp | 6 +----- lib/gui_rpc_client_ops.cpp | 6 +----- lib/gui_rpc_client_print.cpp | 5 +---- lib/hostinfo.cpp | 4 +--- lib/idlemon_win.cpp | 4 +--- lib/md5_file.cpp | 4 +--- lib/mem_usage.cpp | 4 +--- lib/mfile.cpp | 4 +--- lib/miofile.cpp | 4 +--- lib/network.cpp | 4 +--- lib/notice.cpp | 4 +--- lib/opencl_boinc.cpp | 4 +--- lib/parse.cpp | 4 +--- lib/prefs.cpp | 4 +--- lib/proc_control.cpp | 4 ---- lib/procinfo.cpp | 4 +--- lib/project_init.cpp | 4 +--- lib/shmem.cpp | 4 +--- lib/stackwalker_win.cpp | 4 +--- lib/str_util.cpp | 4 +--- lib/url.cpp | 4 +--- lib/util.cpp | 6 +----- lib/win_util.cpp | 4 +--- 32 files changed, 31 insertions(+), 106 deletions(-) diff --git a/client/boinc_cmd.cpp b/client/boinc_cmd.cpp index fed577a8cd..79a211a6c2 100644 --- a/client/boinc_cmd.cpp +++ b/client/boinc_cmd.cpp @@ -20,11 +20,8 @@ // // usage: boinccmd [--host hostname] [--passwd passwd] command -#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 "config.h" diff --git a/client/boinc_log.cpp b/client/boinc_log.cpp index 31e8eba089..3a660c38e5 100644 --- a/client/boinc_log.cpp +++ b/client/boinc_log.cpp @@ -19,10 +19,6 @@ // // usage: boinc_log [--host hostname] [--passwd passwd] -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) -#include "boinc_win.h" -#endif - #if defined(_WIN32) && !defined(__CYGWIN32__) #define snprintf _snprintf #define strdate _strdate @@ -31,6 +27,7 @@ #endif #ifdef _WIN32 +#include "boinc_win.h" #include "win_util.h" #else #include "config.h" diff --git a/lib/app_ipc.cpp b/lib/app_ipc.cpp index 1ef96a3e7c..a6786533df 100644 --- a/lib/app_ipc.cpp +++ b/lib/app_ipc.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/base64.cpp b/lib/base64.cpp index 88c94b9663..5dc265ad71 100644 --- a/lib/base64.cpp +++ b/lib/base64.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #endif diff --git a/lib/coproc.cpp b/lib/coproc.cpp index 4f8f24fa81..8c7cf318eb 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #ifdef _USING_FCGI_ #include "boinc_fcgi.h" diff --git a/lib/crypt.cpp b/lib/crypt.cpp index 6ff4bbee2c..ffcc9d4d5f 100644 --- a/lib/crypt.cpp +++ b/lib/crypt.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/daemonmgt_win.cpp b/lib/daemonmgt_win.cpp index 9a0bee99cc..da92803362 100644 --- a/lib/daemonmgt_win.cpp +++ b/lib/daemonmgt_win.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif /** diff --git a/lib/diagnostics.cpp b/lib/diagnostics.cpp index a700c8c257..e606c0c9e4 100644 --- a/lib/diagnostics.cpp +++ b/lib/diagnostics.cpp @@ -18,10 +18,8 @@ // Stuff related to stderr/stdout direction and exception handling; // used by both core client and by apps -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #ifdef __EMX__ diff --git a/lib/filesys.cpp b/lib/filesys.cpp index a171ccb24c..d938f4291e 100644 --- a/lib/filesys.cpp +++ b/lib/filesys.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #define MAXPATHLEN 4096 #endif diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp index aac0ef1381..01cdad7489 100644 --- a/lib/gui_rpc_client.cpp +++ b/lib/gui_rpc_client.cpp @@ -18,12 +18,8 @@ // This file is the underlying mechanism of GUI RPC client // (not the actual RPCs) - -#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" #ifdef _MSC_VER #define snprintf _snprintf diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index c6b5dd5e43..bd8624de99 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -41,16 +41,12 @@ // formatting failures for any software that has been localized or // displays localized data. - -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) -#include "boinc_win.h" -#endif - #ifdef _MSC_VER #define snprintf _snprintf #endif #ifdef _WIN32 +#include "boinc_win.h" #include "../version.h" #else #include "config.h" diff --git a/lib/gui_rpc_client_print.cpp b/lib/gui_rpc_client_print.cpp index 0c25e6e794..0ad53e7acb 100644 --- a/lib/gui_rpc_client_print.cpp +++ b/lib/gui_rpc_client_print.cpp @@ -18,11 +18,8 @@ // This file is code to print (in ASCII) the stuff returned by GUI RPC. // Used only by boinccmd. -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) +#if defined(_WIN32) #include "boinc_win.h" -#endif - -#ifdef _WIN32 #include "../version.h" #else #include "config.h" diff --git a/lib/hostinfo.cpp b/lib/hostinfo.cpp index 040920b1d0..a18ed3ce27 100644 --- a/lib/hostinfo.cpp +++ b/lib/hostinfo.cpp @@ -18,10 +18,8 @@ // Write and parse HOST_INFO structures. // Used by client and GUI -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/idlemon_win.cpp b/lib/idlemon_win.cpp index 4052e5d38e..82cfcdff6e 100644 --- a/lib/idlemon_win.cpp +++ b/lib/idlemon_win.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #include "win_util.h" diff --git a/lib/md5_file.cpp b/lib/md5_file.cpp index 0e4005955b..a3d6efc42e 100644 --- a/lib/md5_file.cpp +++ b/lib/md5_file.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #ifdef _USING_FCGI_ diff --git a/lib/mem_usage.cpp b/lib/mem_usage.cpp index 5bde610338..8679a712f2 100644 --- a/lib/mem_usage.cpp +++ b/lib/mem_usage.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #if HAVE_PROCFS_H diff --git a/lib/mfile.cpp b/lib/mfile.cpp index 3fc0a9eb39..61b347072d 100644 --- a/lib/mfile.cpp +++ b/lib/mfile.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/miofile.cpp b/lib/miofile.cpp index b4ce2d6792..f318ff1039 100644 --- a/lib/miofile.cpp +++ b/lib/miofile.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/network.cpp b/lib/network.cpp index d4ef9d70da..13b22d1fb8 100644 --- a/lib/network.cpp +++ b/lib/network.cpp @@ -15,11 +15,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" #include -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #if HAVE_UNISTD_H diff --git a/lib/notice.cpp b/lib/notice.cpp index aa750f9ec5..7cf62e0560 100644 --- a/lib/notice.cpp +++ b/lib/notice.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #include "error_numbers.h" diff --git a/lib/opencl_boinc.cpp b/lib/opencl_boinc.cpp index d6afe6ddfb..4668223d97 100644 --- a/lib/opencl_boinc.cpp +++ b/lib/opencl_boinc.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #ifdef _USING_FCGI_ #include "boinc_fcgi.h" diff --git a/lib/parse.cpp b/lib/parse.cpp index 3c06a957e6..c317b10c4b 100644 --- a/lib/parse.cpp +++ b/lib/parse.cpp @@ -24,10 +24,8 @@ // // 2) a better one (class XML_PARSER) which parses arbitrary XML -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/prefs.cpp b/lib/prefs.cpp index 91ae241df9..e7d90be726 100644 --- a/lib/prefs.cpp +++ b/lib/prefs.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/proc_control.cpp b/lib/proc_control.cpp index 8c87e8f351..770260cd9e 100644 --- a/lib/proc_control.cpp +++ b/lib/proc_control.cpp @@ -18,12 +18,8 @@ #include #ifdef _WIN32 #include "diagnostics.h" -#ifdef __STDWX_H__ -#include "stdwx.h" -#else #include "boinc_win.h" #include "win_util.h" -#endif #else #include "config.h" #include diff --git a/lib/procinfo.cpp b/lib/procinfo.cpp index 23aed1c7db..eb584656f2 100644 --- a/lib/procinfo.cpp +++ b/lib/procinfo.cpp @@ -17,11 +17,9 @@ // platform-independent process-enumeration functions -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" #include "win_util.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/project_init.cpp b/lib/project_init.cpp index 187c96fc24..19e1b89e1d 100644 --- a/lib/project_init.cpp +++ b/lib/project_init.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/shmem.cpp b/lib/shmem.cpp index 52649aa687..765bd8ffe3 100644 --- a/lib/shmem.cpp +++ b/lib/shmem.cpp @@ -17,10 +17,8 @@ // interfaces for accessing shared memory segments -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #ifdef _MSC_VER diff --git a/lib/stackwalker_win.cpp b/lib/stackwalker_win.cpp index 71834ddf05..a290486d43 100644 --- a/lib/stackwalker_win.cpp +++ b/lib/stackwalker_win.cpp @@ -42,10 +42,8 @@ *////////////////////////////////////////////////////////////////////////////// -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #include "diagnostics.h" diff --git a/lib/str_util.cpp b/lib/str_util.cpp index 076820620e..61cec3b756 100644 --- a/lib/str_util.cpp +++ b/lib/str_util.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #ifdef _WIN32 #include "win_util.h" diff --git a/lib/url.cpp b/lib/url.cpp index b0805b6820..cc06c3d120 100644 --- a/lib/url.cpp +++ b/lib/url.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #else #include "config.h" #include diff --git a/lib/util.cpp b/lib/util.cpp index bd3214aba3..924377be84 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -15,12 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#ifdef _WIN32 -#ifndef __STDWX_H__ +#if defined(_WIN32) #include "boinc_win.h" -#else -#include "stdwx.h" -#endif #include "str_replace.h" #include "win_util.h" #endif diff --git a/lib/win_util.cpp b/lib/win_util.cpp index 33d02a1193..4ffd6b543a 100644 --- a/lib/win_util.cpp +++ b/lib/win_util.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) +#if defined(_WIN32) #include "boinc_win.h" -#elif defined(_WIN32) && defined(__STDWX_H__) -#include "stdwx.h" #endif #include "diagnostics.h" From fad4210f7bb0369b1dd827dc0a1a072f5ea5b75d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 4 Jun 2020 01:24:49 -0700 Subject: [PATCH 2/2] 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. --- api/boinc_api.cpp | 5 +---- api/boinc_opencl.cpp | 5 +---- api/graphics2_win.cpp | 2 +- api/graphics_api.cpp | 2 +- api/graphics_impl.cpp | 10 ++-------- api/gutil.cpp | 2 +- api/gutil_text.cpp | 2 +- api/reduce_lib.cpp | 7 ++----- api/reduce_main.cpp | 2 +- api/ttfont.cpp | 2 +- api/windows_opengl.cpp | 2 +- client/hostinfo_win.cpp | 2 +- clientctrl/boincsvcctrl.cpp | 2 +- clientgui/browser.cpp | 5 +---- lib/cert_sig.cpp | 8 +------- lib/diagnostics_win.cpp | 6 ------ lib/run_app_windows.cpp | 4 ---- 17 files changed, 17 insertions(+), 51 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index fb041c07b0..fdd3eb7599 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -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 diff --git a/api/boinc_opencl.cpp b/api/boinc_opencl.cpp index 908bdf8b4c..f31b73d094 100644 --- a/api/boinc_opencl.cpp +++ b/api/boinc_opencl.cpp @@ -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 diff --git a/api/graphics2_win.cpp b/api/graphics2_win.cpp index 4f544d716d..2c748b0a13 100644 --- a/api/graphics2_win.cpp +++ b/api/graphics2_win.cpp @@ -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" diff --git a/api/graphics_api.cpp b/api/graphics_api.cpp index d9c509ab68..0e1380892e 100644 --- a/api/graphics_api.cpp +++ b/api/graphics_api.cpp @@ -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" diff --git a/api/graphics_impl.cpp b/api/graphics_impl.cpp index 4e056d6613..af6236f078 100644 --- a/api/graphics_impl.cpp +++ b/api/graphics_impl.cpp @@ -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 #include #include diff --git a/api/gutil.cpp b/api/gutil.cpp index a0b4346d19..6cd12099a5 100644 --- a/api/gutil.cpp +++ b/api/gutil.cpp @@ -15,7 +15,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) +#ifdef _WIN32 #include "boinc_win.h" #else #include "config.h" diff --git a/api/gutil_text.cpp b/api/gutil_text.cpp index 58ce685162..a6483ed593 100644 --- a/api/gutil_text.cpp +++ b/api/gutil_text.cpp @@ -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" diff --git a/api/reduce_lib.cpp b/api/reduce_lib.cpp index efb84bfa95..620f8ea856 100644 --- a/api/reduce_lib.cpp +++ b/api/reduce_lib.cpp @@ -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 #else #include "config.h" #endif -#ifdef _WIN32 -#include -#endif - #include #include "boinc_gl.h" diff --git a/api/reduce_main.cpp b/api/reduce_main.cpp index 9f474c3379..0e63c4f160 100644 --- a/api/reduce_main.cpp +++ b/api/reduce_main.cpp @@ -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" diff --git a/api/ttfont.cpp b/api/ttfont.cpp index 5dbcd017fb..eb99b328d8 100644 --- a/api/ttfont.cpp +++ b/api/ttfont.cpp @@ -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 diff --git a/api/windows_opengl.cpp b/api/windows_opengl.cpp index af9252cd3e..baf69da01e 100644 --- a/api/windows_opengl.cpp +++ b/api/windows_opengl.cpp @@ -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" diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp index d1369781ed..262f84df10 100644 --- a/client/hostinfo_win.cpp +++ b/client/hostinfo_win.cpp @@ -15,7 +15,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) +#ifdef _WIN32 #include "boinc_win.h" #endif diff --git a/clientctrl/boincsvcctrl.cpp b/clientctrl/boincsvcctrl.cpp index 72151bfbf6..0a8fd9a466 100644 --- a/clientctrl/boincsvcctrl.cpp +++ b/clientctrl/boincsvcctrl.cpp @@ -15,7 +15,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) +#ifdef _WIN32 #include "boinc_win.h" #endif diff --git a/clientgui/browser.cpp b/clientgui/browser.cpp index a0bfe84bbd..41081d0bf7 100644 --- a/clientgui/browser.cpp +++ b/clientgui/browser.cpp @@ -16,11 +16,8 @@ // along with BOINC. If not, see . -#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 diff --git a/lib/cert_sig.cpp b/lib/cert_sig.cpp index fadde5d7be..f4afc445cf 100644 --- a/lib/cert_sig.cpp +++ b/lib/cert_sig.cpp @@ -15,10 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -#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(); } diff --git a/lib/diagnostics_win.cpp b/lib/diagnostics_win.cpp index 38fc15d34b..5784e5d697 100644 --- a/lib/diagnostics_win.cpp +++ b/lib/diagnostics_win.cpp @@ -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" diff --git a/lib/run_app_windows.cpp b/lib/run_app_windows.cpp index 136b03acc8..f0958c9973 100644 --- a/lib/run_app_windows.cpp +++ b/lib/run_app_windows.cpp @@ -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"