From 7a576094eca3aebcdf92b6a8b4c37d3cf584892e Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Wed, 3 Oct 2007 11:34:10 +0000 Subject: [PATCH] Fixed compilation errors with GCC 4.3 by adding missing includes and renaming templates: MaxBits to MaxBitsT, Mask to MaskT, Compare to CompareEd. --- zypp/Bit.h | 14 +++++++------- zypp/Digest.cc | 1 + zypp/Edition.h | 2 +- zypp/base/Exception.h | 1 + zypp/base/ExternalDataSource.cc | 2 ++ zypp/base/Logger.h | 1 + zypp/base/String.h | 1 + zypp/solver/detail/Pending.h | 1 + 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/zypp/Bit.h b/zypp/Bit.h index bf4caa3..fc48997 100644 --- a/zypp/Bit.h +++ b/zypp/Bit.h @@ -48,7 +48,7 @@ namespace zypp /** Number of bits available in \a _IntT. */ template - struct MaxBits + struct MaxBitsT { typedef _IntT IntT; static const unsigned value = (sizeof(IntT)*8); @@ -58,8 +58,8 @@ namespace zypp template inline std::string asString( _IntT val, char zero = '0', char one = '1' ) { - std::string s( MaxBits<_IntT>::value, zero ); - for( unsigned i = MaxBits<_IntT>::value; i; ) + std::string s( MaxBitsT<_IntT>::value, zero ); + for( unsigned i = MaxBitsT<_IntT>::value; i; ) { --i; if ( val & (_IntT)1 ) @@ -71,7 +71,7 @@ namespace zypp /** A bitmaks of \a _size 1-bits starting at bit \a _begin. */ template - struct Mask + struct MaskT { typedef _IntT IntT; static const IntT value = bit_detail::Gen1Bits::value << _begin; @@ -83,8 +83,8 @@ namespace zypp struct Range { typedef _IntT IntT; - typedef MaxBits MaxBits; - typedef Mask Mask; + typedef MaxBitsT MaxBits; + typedef MaskT Mask; static const unsigned begin = _begin; static const unsigned size = _size; @@ -158,7 +158,7 @@ namespace zypp * \endcode */ template - class BitField : public Range<_IntT, 0, MaxBits<_IntT>::value> + class BitField : public Range<_IntT, 0, MaxBitsT<_IntT>::value> , private base::SafeBool > { typedef typename base::SafeBool >::bool_type bool_type; diff --git a/zypp/Digest.cc b/zypp/Digest.cc index 415ae01..99fbb77 100644 --- a/zypp/Digest.cc +++ b/zypp/Digest.cc @@ -15,6 +15,7 @@ #include // snprintf #include #include +#include #include diff --git a/zypp/Edition.h b/zypp/Edition.h index b37af0e..90b75ee 100644 --- a/zypp/Edition.h +++ b/zypp/Edition.h @@ -137,7 +137,7 @@ namespace zypp /** \ref compare functor. * \see \ref RelCompare. */ - typedef Compare Compare; + typedef Compare CompareEd; /** \ref Edition \ref Range based on \ref Compare. * \see \ref RelCompare. diff --git a/zypp/base/Exception.h b/zypp/base/Exception.h index 5ff692f..325c14e 100644 --- a/zypp/base/Exception.h +++ b/zypp/base/Exception.h @@ -16,6 +16,7 @@ #include #include #include +#include /////////////////////////////////////////////////////////////////// namespace zypp diff --git a/zypp/base/ExternalDataSource.cc b/zypp/base/ExternalDataSource.cc index cd0ccfd..fb02e1f 100644 --- a/zypp/base/ExternalDataSource.cc +++ b/zypp/base/ExternalDataSource.cc @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include diff --git a/zypp/base/Logger.h b/zypp/base/Logger.h index 5e52987..75e4080 100644 --- a/zypp/base/Logger.h +++ b/zypp/base/Logger.h @@ -13,6 +13,7 @@ #define ZYPP_BASE_LOGGER_H #include +#include /** \defgroup ZYPP_BASE_LOGGER_MACROS ZYPP_BASE_LOGGER_MACROS * Convenience macros for logging. diff --git a/zypp/base/String.h b/zypp/base/String.h index 56476fe..b2851ad 100644 --- a/zypp/base/String.h +++ b/zypp/base/String.h @@ -14,6 +14,7 @@ #include #include +#include #include "zypp/base/PtrTypes.h" diff --git a/zypp/solver/detail/Pending.h b/zypp/solver/detail/Pending.h index e9e487e..b227061 100644 --- a/zypp/solver/detail/Pending.h +++ b/zypp/solver/detail/Pending.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "zypp/base/ReferenceCounted.h" #include "zypp/base/NonCopyable.h" -- 2.7.4