[Cmake-commits] CMake branch, master, updated. v2.8.5-146-gc04613a
KWSys Robot
kwrobot at kitware.com
Tue Aug 9 18:04:05 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via c04613a55de394e17dab5972c540a3577d5a0f43 (commit)
from 4675f5d20423cd3331570a75794468bb3af1edaf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c04613a55de394e17dab5972c540a3577d5a0f43
commit c04613a55de394e17dab5972c540a3577d5a0f43
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 9 18:03:09 2011 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 9 18:04:04 2011 -0400
KWSys: __int64 and long long may be same type in specialization
For the specialization of hash<>(), the types long long and __int64
may be the same type. While the CMakeLists indicate that if __int64 is
a alias for another type the it will not be enabled, on mingw they
both appear to be the same type and enabled.
This patch only enable specialization for long long OR __int64 to
avoid the potential conflict.
Author: Bradley Lowekamp <blowekamp at mail.nih.gov>
Change-Id: I813a9ac008b296fab5a369c48e6dd5460fd0c035
diff --git a/Source/kwsys/hash_fun.hxx.in b/Source/kwsys/hash_fun.hxx.in
index 9a9cf47..926ec92 100644
--- a/Source/kwsys/hash_fun.hxx.in
+++ b/Source/kwsys/hash_fun.hxx.in
@@ -110,6 +110,7 @@ struct hash<unsigned long> {
size_t operator()(unsigned long __x) const { return __x; }
};
+// use long long or __int64
#if @KWSYS_NAMESPACE at _USE_LONG_LONG
@KWSYS_NAMESPACE at _CXX_DEFINE_SPECIALIZATION
struct hash<long long> {
@@ -120,9 +121,7 @@ struct hash<long long> {
struct hash<unsigned long long> {
size_t operator()(unsigned long long __x) const { return __x; }
};
-#endif
-
-#if @KWSYS_NAMESPACE at _USE___INT64
+#elif @KWSYS_NAMESPACE at _USE___INT64
@KWSYS_NAMESPACE at _CXX_DEFINE_SPECIALIZATION
struct hash<__int64> {
size_t operator()(__int64 __x) const { return __x; }
@@ -131,7 +130,7 @@ struct hash<__int64> {
struct hash<unsigned __int64> {
size_t operator()(unsigned __int64 __x) const { return __x; }
};
-#endif
+#endif // use long long or __int64
} // namespace @KWSYS_NAMESPACE@
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/hash_fun.hxx.in | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list