From a73bbac1dc89ecb1e6ce9f0984d59142e8fc1c13 Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Wed, 20 Oct 2010 11:28:02 +0000 Subject: [PATCH] lib: - fixed whitespace error in Makefile.mingw - build and install svn_version.h in Makefile.mingw - fixed boinc_win.h for MinGW gcc-4 - not sure why client_msgs.h was ever included in procinfo_unix.cpp, but in current code caused a nasty trail of includes breaking the Linux build, so removed it svn path=/trunk/boinc/; revision=22561 --- checkin_notes | 14 ++++++++++++++ lib/Makefile.mingw | 8 ++++++-- lib/boinc_win.h | 6 ++++-- lib/procinfo_unix.cpp | 1 - 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index df033cfb05..969a0dc3c2 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7528,3 +7528,17 @@ Charlie 16 Oct 2010 lib/ mac/ mac_backtrace.cpp + +Bernd 20 Oct 2010 + - lib: + - fixed whitespace error in Makefile.mingw + - build and install svn_version.h in Makefile.mingw + - fixed boinc_win.h for MinGW gcc-4 + - not sure why "client_msgs.h" was ever included in procinfo_unix.cpp, + but in current code caused a nasty trail of includes breaking the + Linux build, so removed it + + lib/ + Makefile.mingw + boinc_win.h + procinfo_unix.cpp diff --git a/lib/Makefile.mingw b/lib/Makefile.mingw index dfd4c6fd2a..844f9c9d60 100644 --- a/lib/Makefile.mingw +++ b/lib/Makefile.mingw @@ -12,7 +12,8 @@ HEADERS = $(BOINC_SRC)/version.h $(BOINC_SRC)/api/boinc_api.h $(BOINC_SRC)/api/g $(BOINC_SRC)/lib/boinc_win.h $(BOINC_SRC)/lib/url.h $(BOINC_SRC)/lib/common_defs.h $(BOINC_SRC)/lib/diagnostics.h \ $(BOINC_SRC)/lib/diagnostics_win.h $(BOINC_SRC)/lib/filesys.h $(BOINC_SRC)/lib/hostinfo.h $(BOINC_SRC)/lib/proxy_info.h \ $(BOINC_SRC)/lib/prefs.h $(BOINC_SRC)/lib/miofile.h $(BOINC_SRC)/lib/mfile.h $(BOINC_SRC)/lib/parse.h \ - $(BOINC_SRC)/lib/util.h $(BOINC_SRC)/lib/coproc.h $(BOINC_SRC)/lib/cal_boinc.h $(BOINC_SRC)/win_build/config.h + $(BOINC_SRC)/lib/util.h $(BOINC_SRC)/lib/coproc.h $(BOINC_SRC)/lib/cal_boinc.h $(BOINC_SRC)/lib/svn_version.h \ + $(BOINC_SRC)/win_build/config.h ZIP_HEADERS = zip/boinc_zip.h @@ -55,7 +56,7 @@ INCS = -I"$(BOINC_SRC)" -I"$(BOINC_SRC)/db" -I"$(BOINC_SRC)/lib" -I"$(BOINC_SRC) # set NOCYGWIN=-mno-cygwin to build non-Cywin Windows libs under Cygwin # -D_WIN32_WINDOWS=0x0410 sets to use Win98 API CCXXFLAGS = $(INCS) $(DEBUG) --include $(BOINC_SRC)/version.h -DEINSTEINATHOME_CROSS_BUILD -DMINGW_WIN32 \ - -DHAVE_STRCASECMP -DWIN32 -D_WIN32 -D_WIN32_WINDOWS=0x0410 -D_MT -DNDEBUG -D_WINDOWS -DBOINC \ + -DHAVE_STRCASECMP -DWIN32 -D_WIN32 -D_WIN32_WINDOWS=0x0410 -D_MT -DNDEBUG -D_WINDOWS -DBOINC \ -DNODB -D_CONSOLE -mtune=pentium-m -fexceptions -march=i386 -O2 $(NOCYGWIN) # flags for compiling boinc_zip @@ -110,6 +111,9 @@ md5.o: $(BOINC_SRC)/lib/md5.c z_util.o: $(BOINC_SRC)/zip/zip/util.c $(CC) -c $< -o $@ $(ZIP_FLAGS) +$(BOINC_SRC)/lib/svn_version.h: + cd $(BOINC_SRC)/lib && sh ../generate_svn_version.sh + # set to the target ranlib when cross-compiling RANLIB ?= ranlib diff --git a/lib/boinc_win.h b/lib/boinc_win.h index 6e3fa0c05a..ed56f26048 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -249,13 +249,15 @@ extern "C" { #endif void __cdecl _fpreset (void); void __cdecl fpreset (void); +#if (__GNUC__ < 4) // breaks build on MinGW gcc-4 #define SetClassLongPtr SetClassLong #define GCLP_HICON GCL_HICON #define GCLP_HICONSM GCL_HICONSM +#endif //GNUC #ifdef __cplusplus } -#endif -#endif +#endif //cplusplus +#endif //MINGW // On the Win32 platform include file and line number information for each // memory allocation/deallocation diff --git a/lib/procinfo_unix.cpp b/lib/procinfo_unix.cpp index 47575a9b42..4c4da10d08 100644 --- a/lib/procinfo_unix.cpp +++ b/lib/procinfo_unix.cpp @@ -45,7 +45,6 @@ #include "procinfo.h" #include "str_util.h" #include "str_replace.h" -#include "client_msgs.h" using std::vector;