summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-10 13:53:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-10 13:53:10 (GMT)
commit9ac73a8c03734fe3dfe094ec2fa7cecc46d8e855 (patch)
treed7084476605041e6ea20da99f91b0c9934b44e5f
parent5e6f2794117ff75d0eaba5211e64fa475c25f308 (diff)
parentf401b925cf1711d4b77b1039204cb78c10b9252d (diff)
downloadCMake-9ac73a8c03734fe3dfe094ec2fa7cecc46d8e855.zip
CMake-9ac73a8c03734fe3dfe094ec2fa7cecc46d8e855.tar.gz
CMake-9ac73a8c03734fe3dfe094ec2fa7cecc46d8e855.tar.bz2
Merge topic 'update-kwsys'
f401b925 Merge branch 'upstream-kwsys' into update-kwsys c54be583 KWSys 2014-04-07 (8b085635)
-rw-r--r--Source/kwsys/CMakeLists.txt7
-rw-r--r--Source/kwsys/MD5.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 977d57b..5e6a226 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -299,6 +299,13 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
IF(CMAKE_SYSTEM MATCHES "HP-UX")
SET(KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS "+p")
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "HP")
+ # it is known that version 3.85 fails and 6.25 works without these flags
+ IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
+ # use new C++ library and improved template support
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
+ ENDIF()
+ ENDIF()
ENDIF(CMAKE_SYSTEM MATCHES "HP-UX")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Source/kwsys/MD5.c b/Source/kwsys/MD5.c
index 56776a3..a147057 100644
--- a/Source/kwsys/MD5.c
+++ b/Source/kwsys/MD5.c
@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5)
/*--------------------------------------------------------------------------*/
void kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length)
{
+ size_t dlen;
if(length < 0)
{
- length = (int)strlen((char const*)data);
+ dlen = strlen((char const*)data);
}
- md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length);
+ else
+ {
+ dlen = (size_t)length;
+ }
+ md5_append(&md5->md5_state, (md5_byte_t const*)data, dlen);
}
/*--------------------------------------------------------------------------*/