mirror of https://github.com/BOINC/boinc.git
client/wrappers, Win: consolidate defines for _getcwd etc in boinc_win.h
They belong here, not in .cpp files
This commit is contained in:
parent
4b9a55b438
commit
d626dfd8d5
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue