From 345481a4754e8d26e6a1cc06035db4e566ec9fa0 Mon Sep 17 00:00:00 2001 From: xantares Date: Mon, 22 Dec 2014 19:12:41 +0100 Subject: [PATCH 01/11] do not guess mingw include/link dirs let cmake do the job as we dont want mingw headers to conflict with system headers and libs, they are provided in a separate tree --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdd8eafb5..56d07e7d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,8 +156,6 @@ endif(CMAKE_SYSTEM MATCHES "SunOS") if (CMAKE_COMPILER_IS_MINGW) add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8) add_definitions(-mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) - link_directories(/usr/local/lib /usr/lib) - include_directories(/usr/local/include /usr/include) endif (CMAKE_COMPILER_IS_MINGW) if (CYGWIN) From bf929f97043c2b907929c2ef13775a4fe3454504 Mon Sep 17 00:00:00 2001 From: xantares Date: Mon, 22 Dec 2014 22:08:32 +0100 Subject: [PATCH 02/11] Fix missing windows includes for mingw --- Foundation/src/Environment_WIN32.cpp | 2 ++ Foundation/src/Environment_WIN32U.cpp | 2 ++ Net/src/NetworkInterface.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp index 7c96a8da9..b0584eb49 100644 --- a/Foundation/src/Environment_WIN32.cpp +++ b/Foundation/src/Environment_WIN32.cpp @@ -19,6 +19,8 @@ #include #include #include "Poco/UnWindows.h" +#include +#include #include diff --git a/Foundation/src/Environment_WIN32U.cpp b/Foundation/src/Environment_WIN32U.cpp index c82699ad5..65fed1e62 100644 --- a/Foundation/src/Environment_WIN32U.cpp +++ b/Foundation/src/Environment_WIN32U.cpp @@ -21,6 +21,8 @@ #include #include #include "Poco/UnWindows.h" +#include +#include #include diff --git a/Net/src/NetworkInterface.cpp b/Net/src/NetworkInterface.cpp index bc5221340..e8140afec 100644 --- a/Net/src/NetworkInterface.cpp +++ b/Net/src/NetworkInterface.cpp @@ -30,6 +30,7 @@ #include "Poco/UnicodeConverter.h" #endif #include "Poco/Error.h" + #include #include #include #endif @@ -37,7 +38,6 @@ #include #include - using Poco::NumberFormatter; using Poco::FastMutex; using Poco::format; From 1e28368222f5dcbc7a84bfba6f58daaef2ebef1a Mon Sep 17 00:00:00 2001 From: xantares Date: Tue, 23 Dec 2014 16:23:08 +0100 Subject: [PATCH 03/11] fixed win32 defines --- Foundation/include/Poco/FPEnvironment_WIN32.h | 37 ++++++++++++++----- Foundation/src/FPEnvironment_WIN32.cpp | 6 +-- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Foundation/include/Poco/FPEnvironment_WIN32.h b/Foundation/include/Poco/FPEnvironment_WIN32.h index 33310289b..17b720795 100644 --- a/Foundation/include/Poco/FPEnvironment_WIN32.h +++ b/Foundation/include/Poco/FPEnvironment_WIN32.h @@ -24,6 +24,25 @@ #include #include +#ifndef _SW_INEXACT + #define _SW_INEXACT 0x00000001 /* inexact (precision) */ +#endif +#ifndef _SW_UNDERFLOW + #define _SW_UNDERFLOW 0x00000002 /* underflow */ +#endif +#ifndef _SW_OVERFLOW + #define _SW_OVERFLOW 0x00000004 /* overflow */ +#endif +#ifndef _SW_ZERODIVIDE + #define _SW_ZERODIVIDE 0x00000008 /* zero divide */ +#endif +#ifndef _SW_INVALID + #define _SW_INVALID 0x00000010 /* invalid */ +#endif +#ifndef _SW_DENORMAL + #define _SW_DENORMAL 0x00080000 /* denormal status bit */ +#endif + namespace Poco { @@ -33,18 +52,18 @@ class Foundation_API FPEnvironmentImpl protected: enum RoundingModeImpl { - FP_ROUND_DOWNWARD_IMPL = RC_DOWN, - FP_ROUND_UPWARD_IMPL = RC_UP, - FP_ROUND_TONEAREST_IMPL = RC_NEAR, - FP_ROUND_TOWARDZERO_IMPL = RC_CHOP + FP_ROUND_DOWNWARD_IMPL = _RC_DOWN, + FP_ROUND_UPWARD_IMPL = _RC_UP, + FP_ROUND_TONEAREST_IMPL = _RC_NEAR, + FP_ROUND_TOWARDZERO_IMPL = _RC_CHOP }; enum FlagImpl { - FP_DIVIDE_BY_ZERO_IMPL = SW_ZERODIVIDE, - FP_INEXACT_IMPL = SW_INEXACT, - FP_OVERFLOW_IMPL = SW_OVERFLOW, - FP_UNDERFLOW_IMPL = SW_UNDERFLOW, - FP_INVALID_IMPL = SW_INVALID + FP_DIVIDE_BY_ZERO_IMPL = _SW_ZERODIVIDE, + FP_INEXACT_IMPL = _SW_INEXACT, + FP_OVERFLOW_IMPL = _SW_OVERFLOW, + FP_UNDERFLOW_IMPL = _SW_UNDERFLOW, + FP_INVALID_IMPL = _SW_INVALID }; FPEnvironmentImpl(); FPEnvironmentImpl(const FPEnvironmentImpl& env); diff --git a/Foundation/src/FPEnvironment_WIN32.cpp b/Foundation/src/FPEnvironment_WIN32.cpp index ebbb763e2..9f51b69c7 100644 --- a/Foundation/src/FPEnvironment_WIN32.cpp +++ b/Foundation/src/FPEnvironment_WIN32.cpp @@ -34,7 +34,7 @@ FPEnvironmentImpl::FPEnvironmentImpl(const FPEnvironmentImpl& env) FPEnvironmentImpl::~FPEnvironmentImpl() { - _controlfp(_env, MCW_RC); + _controlfp(_env, _MCW_RC); } @@ -65,13 +65,13 @@ bool FPEnvironmentImpl::isFlagImpl(FlagImpl flag) void FPEnvironmentImpl::setRoundingModeImpl(RoundingModeImpl mode) { - _controlfp(mode, MCW_RC); + _controlfp(mode, _MCW_RC); } FPEnvironmentImpl::RoundingModeImpl FPEnvironmentImpl::getRoundingModeImpl() { - return RoundingModeImpl(_controlfp(0, 0) & MCW_RC); + return RoundingModeImpl(_controlfp(0, 0) & _MCW_RC); } From d1436c09fd9c202a6daed73553b2931f1b4fc788 Mon Sep 17 00:00:00 2001 From: Asari Takashi Date: Thu, 25 Dec 2014 09:53:44 +0000 Subject: [PATCH 04/11] Added WINDMC variable to build scripts --- Foundation/Makefile | 2 +- build/config/MinGW | 1 + build/config/MinGW-CrossEnv | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Foundation/Makefile b/Foundation/Makefile index 627c664a0..45ade1c0c 100644 --- a/Foundation/Makefile +++ b/Foundation/Makefile @@ -61,7 +61,7 @@ target_version = $(LIBVERSION) target_libs = ifeq ($(findstring MinGW, $(POCO_CONFIG)), MinGW) - $(shell cd src; windmc pocomsg.mc) + $(shell cd src; $(WINDMC) pocomsg.mc) endif include $(POCO_BASE)/build/rules/lib diff --git a/build/config/MinGW b/build/config/MinGW index e9e579268..35439203d 100644 --- a/build/config/MinGW +++ b/build/config/MinGW @@ -29,6 +29,7 @@ SHELL = sh RM = rm -rf CP = cp MKDIR = mkdir -p +WINDMC = windmc # # Extension for Shared Libraries diff --git a/build/config/MinGW-CrossEnv b/build/config/MinGW-CrossEnv index 4fb68760b..acd9bf38a 100644 --- a/build/config/MinGW-CrossEnv +++ b/build/config/MinGW-CrossEnv @@ -31,6 +31,7 @@ SHELL = sh RM = rm -rf CP = cp MKDIR = mkdir -p +WINDMC = $(CROSSENV)-windmc # # Extension for Shared Libraries From 427a9bc4e42fbb35bb28fe15abb043f561e824c1 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 1 Jan 2015 12:10:30 -0600 Subject: [PATCH 05/11] indentation style fix --- Net/samples/httpget/src/httpget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Net/samples/httpget/src/httpget.cpp b/Net/samples/httpget/src/httpget.cpp index dc4a4d444..3e6edd047 100644 --- a/Net/samples/httpget/src/httpget.cpp +++ b/Net/samples/httpget/src/httpget.cpp @@ -69,17 +69,17 @@ int main(int argc, char** argv) std::string path(uri.getPathAndQuery()); if (path.empty()) path = "/"; - std::string username; - std::string password; - Poco::Net::HTTPCredentials::extractCredentials(uri, username, password); - Poco::Net::HTTPCredentials credentials(username, password); + std::string username; + std::string password; + Poco::Net::HTTPCredentials::extractCredentials(uri, username, password); + Poco::Net::HTTPCredentials credentials(username, password); HTTPClientSession session(uri.getHost(), uri.getPort()); HTTPRequest request(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1); HTTPResponse response; if (!doRequest(session, request, response)) { - credentials.authenticate(request, response); + credentials.authenticate(request, response); if (!doRequest(session, request, response)) { std::cerr << "Invalid username or password" << std::endl; From eb04ffc423021aba9fa4f50ac95353f00a8a73e8 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 1 Jan 2015 12:35:26 -0600 Subject: [PATCH 06/11] style fixes --- Foundation/include/Poco/FPEnvironment_WIN32.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Foundation/include/Poco/FPEnvironment_WIN32.h b/Foundation/include/Poco/FPEnvironment_WIN32.h index 17b720795..79a9fb16f 100644 --- a/Foundation/include/Poco/FPEnvironment_WIN32.h +++ b/Foundation/include/Poco/FPEnvironment_WIN32.h @@ -25,22 +25,22 @@ #include #ifndef _SW_INEXACT - #define _SW_INEXACT 0x00000001 /* inexact (precision) */ +# define _SW_INEXACT 0x00000001 // inexact (precision) #endif #ifndef _SW_UNDERFLOW - #define _SW_UNDERFLOW 0x00000002 /* underflow */ +# define _SW_UNDERFLOW 0x00000002 // underflow #endif #ifndef _SW_OVERFLOW - #define _SW_OVERFLOW 0x00000004 /* overflow */ +# define _SW_OVERFLOW 0x00000004 // overflow #endif #ifndef _SW_ZERODIVIDE - #define _SW_ZERODIVIDE 0x00000008 /* zero divide */ +# define _SW_ZERODIVIDE 0x00000008 // zero divide #endif #ifndef _SW_INVALID - #define _SW_INVALID 0x00000010 /* invalid */ +# define _SW_INVALID 0x00000010 // invalid #endif #ifndef _SW_DENORMAL - #define _SW_DENORMAL 0x00080000 /* denormal status bit */ +# define _SW_DENORMAL 0x00080000 // denormal status bit #endif @@ -69,7 +69,7 @@ protected: FPEnvironmentImpl(const FPEnvironmentImpl& env); ~FPEnvironmentImpl(); FPEnvironmentImpl& operator = (const FPEnvironmentImpl& env); - void keepCurrentImpl(); + void keepCurrentImpl(); static void clearFlagsImpl(); static bool isFlagImpl(FlagImpl flag); static void setRoundingModeImpl(RoundingModeImpl mode); From 767d268eed83c88d680f5a67112c4649941731c6 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 1 Jan 2015 13:11:36 -0600 Subject: [PATCH 07/11] moved PBKDF2 tests into VS120 project Crypt filter --- Foundation/testsuite/TestSuite_vs120.vcxproj.filters | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Foundation/testsuite/TestSuite_vs120.vcxproj.filters b/Foundation/testsuite/TestSuite_vs120.vcxproj.filters index 3d476fd48..e933b5a4e 100644 --- a/Foundation/testsuite/TestSuite_vs120.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_vs120.vcxproj.filters @@ -585,7 +585,9 @@ _Driver\Source Files - + + Crypt\Source Files + @@ -990,6 +992,8 @@ Streams\Header Files - + + Crypt\Header Files + \ No newline at end of file From 5424aade0eb12852e22ce093ca83ad49394ba88c Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 1 Jan 2015 14:09:45 -0600 Subject: [PATCH 08/11] remove deprecated mno-cygwin option #651 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56d07e7d2..c045c31d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ endif(CMAKE_SYSTEM MATCHES "SunOS") if (CMAKE_COMPILER_IS_MINGW) add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8) - add_definitions(-mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) + add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) endif (CMAKE_COMPILER_IS_MINGW) if (CYGWIN) From eb28010c1667b1310b9ca790a6d65d4396c3a1d5 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 1 Jan 2015 14:12:17 -0600 Subject: [PATCH 09/11] remove deprecated mno-cygwin option #651, part II --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c045c31d0..29d66c75d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ endif(CMAKE_SYSTEM MATCHES "SunOS") if (CMAKE_COMPILER_IS_MINGW) add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8) - add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED ) + add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE) endif (CMAKE_COMPILER_IS_MINGW) if (CYGWIN) From 1b9aac5f7c6e6959c04fd5486aed4791b0ee2006 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 1 Jan 2015 14:41:09 -0600 Subject: [PATCH 10/11] Mingw64 #414 (small portion) --- Foundation/src/File_WIN32.cpp | 12 ++++++------ Foundation/src/File_WIN32U.cpp | 12 ++++++------ Foundation/src/File_WINCE.cpp | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Foundation/src/File_WIN32.cpp b/Foundation/src/File_WIN32.cpp index 202152d7f..4d4ae343e 100644 --- a/Foundation/src/File_WIN32.cpp +++ b/Foundation/src/File_WIN32.cpp @@ -92,7 +92,7 @@ bool FileImpl::existsImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributes(_path.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -114,7 +114,7 @@ bool FileImpl::canReadImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributes(_path.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -133,7 +133,7 @@ bool FileImpl::canWriteImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributes(_path.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_READONLY) == 0; } @@ -157,7 +157,7 @@ bool FileImpl::isDirectoryImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributes(_path.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0; } @@ -190,7 +190,7 @@ bool FileImpl::isHiddenImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributes(_path.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_HIDDEN) != 0; } @@ -255,7 +255,7 @@ void FileImpl::setSizeImpl(FileSizeImpl size) FileHandle fh(_path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING); LARGE_INTEGER li; li.QuadPart = size; - if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == -1) + if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER) handleLastErrorImpl(_path); if (SetEndOfFile(fh.get()) == 0) handleLastErrorImpl(_path); diff --git a/Foundation/src/File_WIN32U.cpp b/Foundation/src/File_WIN32U.cpp index 0c2a053e8..80d340305 100644 --- a/Foundation/src/File_WIN32U.cpp +++ b/Foundation/src/File_WIN32U.cpp @@ -96,7 +96,7 @@ bool FileImpl::existsImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -118,7 +118,7 @@ bool FileImpl::canReadImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -137,7 +137,7 @@ bool FileImpl::canWriteImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_READONLY) == 0; } @@ -161,7 +161,7 @@ bool FileImpl::isDirectoryImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0; } @@ -194,7 +194,7 @@ bool FileImpl::isHiddenImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_HIDDEN) != 0; } @@ -259,7 +259,7 @@ void FileImpl::setSizeImpl(FileSizeImpl size) FileHandle fh(_path, _upath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING); LARGE_INTEGER li; li.QuadPart = size; - if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == -1) + if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER) handleLastErrorImpl(_path); if (SetEndOfFile(fh.get()) == 0) handleLastErrorImpl(_path); diff --git a/Foundation/src/File_WINCE.cpp b/Foundation/src/File_WINCE.cpp index 4d0f0cf9f..61ab5d671 100644 --- a/Foundation/src/File_WINCE.cpp +++ b/Foundation/src/File_WINCE.cpp @@ -97,7 +97,7 @@ bool FileImpl::existsImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -119,7 +119,7 @@ bool FileImpl::canReadImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) { switch (GetLastError()) { @@ -138,7 +138,7 @@ bool FileImpl::canWriteImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_READONLY) == 0; } @@ -162,7 +162,7 @@ bool FileImpl::isDirectoryImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0; } @@ -185,7 +185,7 @@ bool FileImpl::isHiddenImpl() const poco_assert (!_path.empty()); DWORD attr = GetFileAttributesW(_upath.c_str()); - if (attr == 0xFFFFFFFF) + if (attr == INVALID_FILE_ATTRIBUTES) handleLastErrorImpl(_path); return (attr & FILE_ATTRIBUTE_HIDDEN) != 0; } @@ -250,7 +250,7 @@ void FileImpl::setSizeImpl(FileSizeImpl size) FileHandle fh(_path, _upath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING); LARGE_INTEGER li; li.QuadPart = size; - if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == -1) + if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER) handleLastErrorImpl(_path); if (SetEndOfFile(fh.get()) == 0) handleLastErrorImpl(_path); From 4ae9aa96745b2255e79ba9f7994374fa73ca8fd2 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 1 Jan 2015 22:47:03 -0600 Subject: [PATCH 11/11] building with gcc 4.6.3 gives lots lots of warnings #658 --- Foundation/include/Poco/Bugcheck.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Foundation/include/Poco/Bugcheck.h b/Foundation/include/Poco/Bugcheck.h index 904200fc2..ede6f1924 100644 --- a/Foundation/include/Poco/Bugcheck.h +++ b/Foundation/include/Poco/Bugcheck.h @@ -148,7 +148,9 @@ protected: // -GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings +#if defined(GNUC) && (GNUC > 4) && (GNUC_MINOR > 6) + GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings +#endif // (GNUC) && (GNUC > 4) && (GNUC_MINOR > 6) template