From a95deb409d6c2288146b6b8f8f649fdbda38737e Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 20 Mar 2007 01:42:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=12253 --- checkin_notes | 9 +++++++++ clientgui/stdwx.h | 25 ++++++++++++++++++------- lib/boinc_win.h | 7 +++++-- lib/filesys.C | 9 +-------- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3ce63532ef..9fbc101c1a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2686,3 +2686,12 @@ David 19 Mar 2007 lib/ prefs.C + +Rom 19 Mar 2007 + - Add some more cross compiler tweaks to the precompiled header for Windows. + + clientgui/ + stdwx.h + lib/ + boinc_win.h + filesys.C diff --git a/clientgui/stdwx.h b/clientgui/stdwx.h index e65aa5ba3e..fb79e83940 100644 --- a/clientgui/stdwx.h +++ b/clientgui/stdwx.h @@ -191,17 +191,28 @@ #ifdef _WIN32 + #define vsnprintf _vsnprintf #define snprintf _snprintf -#define fdopen _fdopen -#define dup _dup -#define unlink _unlink -#define strdup _strdup -#define read _read -#define stat _stat -#define finite _finite +#define stprintf _stprintf +#define stricmp _stricmp +#define strdup _strdup +#define fdopen _fdopen +#define dup _dup +#define unlink _unlink +#define read _read +#define stat _stat +#define chdir _chdir +#define finite _finite +#define strdate _strdate +#define strtime _strtime +#define getcwd _getcwd + #endif +#ifndef __GNUC__ +#define __attribute__(x) +#endif // On the Win32 platform include file and line number information for each // memory allocation/deallocation diff --git a/lib/boinc_win.h b/lib/boinc_win.h index 3e9c154063..b0c1c0a15a 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -204,8 +204,6 @@ typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; #endif - - #ifndef __CYGWIN__ #define vsnprintf _vsnprintf @@ -222,9 +220,14 @@ typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; #define finite _finite #define strdate _strdate #define strtime _strtime +#define getcwd _getcwd #endif +#ifndef __GNUC__ +#define __attribute__(x) +#endif + #ifdef __MINGW32__ #ifdef __cplusplus extern "C" { diff --git a/lib/filesys.C b/lib/filesys.C index 91c8fa804b..37a1cdee47 100755 --- a/lib/filesys.C +++ b/lib/filesys.C @@ -72,6 +72,7 @@ typedef BOOL (CALLBACK* FreeFn)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULAR #include "fcgi_stdio.h" #endif + #define RETRY_INTERVAL 5 // On Windows, retry for this period of time, since some other program // (virus scan, defrag, index) may have the file open. @@ -623,19 +624,11 @@ int FILE_LOCK::unlock(const char* filename) { } void boinc_getcwd(char* path) { -#if defined(_WIN32) && !defined(__CYGWIN32__) - char* p = _getcwd(path, 256); -#else char* p __attribute__ ((unused)) = getcwd(path, 256); -#endif } void relative_to_absolute(const char* relname, char* path) { -#if defined(_WIN32) && !defined(__CYGWIN32__) - char* p = _getcwd(path, 256); -#else char* p __attribute__ ((unused)) = getcwd(path, 256); -#endif if (strlen(relname)) { strcat(path, "/"); strcat(path, relname);