diff --git a/checkin_notes b/checkin_notes index ef2235c573..84946db503 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8498,3 +8498,12 @@ Rom 7 Oct 2009 ViewProjectsGrid.cpp, .h (deleted) ViewTransfersGrid.cpp, .h (deleted) ViewWorkGrid.cpp, .h (deleted) + +Bernd 7 Oct 2009 + - lib: some changes to help building the WIN32 library with MinGW/gcc + enable by defining MINGW_WIN32 macro, nothing should change if + this is not set + lib/ + boinc_win.h + diagnostics.h + filesys.cpp diff --git a/lib/boinc_win.h b/lib/boinc_win.h index 51236efbdd..f4dcc606bb 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -96,7 +96,11 @@ typedef size_t socklen_t; #include #include +#if defined(MINGW_WIN32) +#include +#else #include +#endif #include #include @@ -129,7 +133,9 @@ typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; // C headers #include #include +#if !defined(MINGW_WIN32) #include +#endif #include #if !defined(__MINGW32__) && !defined(__CYGWIN32__) @@ -211,9 +217,11 @@ extern "C" { #endif void __cdecl _fpreset (void); void __cdecl fpreset (void); +#ifndef MINGW_WIN32 #define SetClassLongPtr SetClassLong #define GCLP_HICON GCL_HICON #define GCLP_HICONSM GCL_HICONSM +#endif #ifdef __cplusplus } #endif diff --git a/lib/diagnostics.h b/lib/diagnostics.h index ab36e26257..f71801b2bb 100644 --- a/lib/diagnostics.h +++ b/lib/diagnostics.h @@ -114,7 +114,12 @@ extern int diagnostics_finish_unhandled_exception_monitor(); #ifdef _WIN32 extern UINT WINAPI diagnostics_unhandled_exception_monitor(LPVOID lpParameter); extern LONG CALLBACK boinc_catch_signal(EXCEPTION_POINTERS *ExceptionInfo); +#ifndef MINGW_WIN32 extern void boinc_catch_signal_invalid_parameter(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line, uintptr_t pReserved); +#else +extern void boinc_catch_signal_invalid_parameter(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line); +#endif + #else extern void boinc_catch_signal(int signal); extern void boinc_set_signal_handler(int sig, void(*handler)(int)); diff --git a/lib/filesys.cpp b/lib/filesys.cpp index 2b270ee989..98ae0f719a 100644 --- a/lib/filesys.cpp +++ b/lib/filesys.cpp @@ -23,6 +23,10 @@ #define getcwd _getcwd #endif +#if defined(MINGW_WIN32) +#include +#endif + #if !defined(_WIN32) || defined(__CYGWIN32__) #include "config.h" #ifdef _USING_FCGI_