client/wrappers, Win: consolidate defines for _getcwd etc in boinc_win.h

They belong here, not in .cpp files
This commit is contained in:
David Anderson 2017-01-26 20:59:11 -08:00
parent 4b9a55b438
commit d626dfd8d5
14 changed files with 19 additions and 80 deletions

View File

@ -19,7 +19,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#define getpid _getpid
#else
#include "config.h"
#include <cstdio>
@ -41,10 +40,6 @@
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif

View File

@ -25,10 +25,6 @@
#include <string>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "miofile.h"
@ -40,10 +36,6 @@
#include "app_ipc.h"
#if !defined(HAVE_STRDUP) && defined(HAVE__STRDUP)
#define strdup _strdup
#endif
using std::string;
APP_INIT_DATA::APP_INIT_DATA() {

View File

@ -15,17 +15,32 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
// boinc_win.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
// boinc_win.h : include file for Windows builds.
// Includes standard system include files,
// and aliases function names like getpid -> _getpid
//
// ?? Is this only for Visual Studio, or for MINGW too?
// comments below are contradictory
#ifndef _BOINC_WIN_
#define _BOINC_WIN_
#ifdef _MSC_VER
#define getpid _getpid
#define getcwd _getcwd
#define snprintf _snprintf
#define strdate _strdate
#define strdup _strdup
#define stricmp _stricmp
#define strtime _strtime
#endif
#ifndef HAVE_CONFIG_H
// Windows C Runtime Library
// These are version dependent. If you aren't using MSC, you'll probably need
// These are Visual Studio version dependent.
// If you aren't using VS, you'll probably need
// to edit this file or create a config.h
// For MINGW32 and MINGW64, it's best to run autoconf if possible.
@ -72,8 +87,6 @@
#define HAVE_DECL__FPRESET 1
#define HAVE_DECL___CPUID 1
#define HAVE_MSVCRT 1
#undef HAVE_STRDUP
#define HAVE__STRDUP 1
#undef NO_PER_THREAD_LOCALE
#define HAVE_DECL__CONFIGTHREADLOCALE 1
#define HAVE__CONFIGTHREADLOCALE 1

View File

@ -24,12 +24,6 @@
#include "stdwx.h"
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#define snprintf _snprintf
#define strdate _strdate
#define strtime _strtime
#endif
#ifdef __EMX__
#include <sys/stat.h>
#endif

View File

@ -27,12 +27,6 @@
#include "win_util.h"
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#define snprintf _snprintf
#define strdate _strdate
#define strtime _strtime
#endif
#ifndef __CYGWIN32__
#include "stackwalker_win.h"
#endif

View File

@ -39,14 +39,6 @@
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#if !defined(HAVE_STRDUP) && defined(HAVE__STRDUP)
#define strdup _strdup
#endif
#ifdef _USING_FCGI_
#include "boinc_fcgi.h"
#endif

View File

@ -48,10 +48,6 @@
#include "stdwx.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "diagnostics.h"
#include "str_replace.h"
#include "str_util.h"

View File

@ -27,9 +27,6 @@
#include <ctype.h>
#include <stdlib.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "str_util.h"
#include "str_replace.h"

View File

@ -21,10 +21,6 @@
#include "stdwx.h"
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#define snprintf _snprintf
#endif
#include "diagnostics.h"
#include "util.h"
#include "filesys.h"

View File

@ -39,12 +39,6 @@
#include "vboxwrapper.h"
#include "vbox_mscom42.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#define stricmp _stricmp
#define snprintf _snprintf
#endif
#import "file:vbox42.tlb" rename_namespace("vbox42"), named_guids, raw_interfaces_only
using std::string;
@ -65,4 +59,3 @@ namespace vbox42 {
#include "vbox_mscom_impl.cpp"
}

View File

@ -39,12 +39,6 @@
#include "vboxwrapper.h"
#include "vbox_mscom43.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#define stricmp _stricmp
#define snprintf _snprintf
#endif
#import "file:vbox43.tlb" rename_namespace("vbox43"), named_guids, raw_interfaces_only
using std::string;

View File

@ -39,12 +39,6 @@
#include "vboxwrapper.h"
#include "vbox_mscom50.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#define stricmp _stricmp
#define snprintf _snprintf
#endif
#import "file:vbox50.tlb" rename_namespace("vbox50"), named_guids, raw_interfaces_only
using std::string;

View File

@ -40,11 +40,6 @@
#include "vbox_mscom51.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#define stricmp _stricmp
#define snprintf _snprintf
#endif
#import "file:vbox51.tlb" rename_namespace("vbox51"), named_guids, raw_interfaces_only
using std::string;

View File

@ -39,12 +39,6 @@
using std::string;
#if defined(_MSC_VER)
#define getcwd _getcwd
#define stricmp _stricmp
#define snprintf _snprintf
#endif
#include "diagnostics.h"
#include "filesys.h"
#include "parse.h"