Dirk Mueller
52da4a74c5
- boost-compute-uuid.patch: added OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=331
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
|
|
https://github.com/boostorg/uuid/issues/166
|
|
|
|
https://github.com/boostorg/compute/pull/887
|
|
https://github.com/boostorg/compute/pull/893
|
|
|
|
diff --git a/boost/compute/detail/sha1.hpp b/boost/compute/detail/sha1.hpp
|
|
index 5afe5f9c4..3a1820074 100644
|
|
--- a/boost/compute/detail/sha1.hpp
|
|
+++ b/boost/compute/detail/sha1.hpp
|
|
@@ -37,13 +37,22 @@ class sha1 {
|
|
}
|
|
|
|
operator std::string() {
|
|
+ #if BOOST_VERSION >= 108600
|
|
+ boost::uuids::detail::sha1::digest_type digest;
|
|
+ #else
|
|
unsigned int digest[5];
|
|
+ #endif
|
|
+
|
|
h.get_digest(digest);
|
|
|
|
std::ostringstream buf;
|
|
+ #if BOOST_VERSION >= 108600
|
|
+ for(int i = 0; i < 20; ++i)
|
|
+ buf << std::hex << std::setfill('0') << std::setw(2) << +digest[i];
|
|
+ #else
|
|
for(int i = 0; i < 5; ++i)
|
|
buf << std::hex << std::setfill('0') << std::setw(8) << digest[i];
|
|
-
|
|
+ #endif
|
|
return buf.str();
|
|
}
|
|
private:
|