From: Peter Howkins Date: Mon, 12 Mar 2012 00:04:39 +0000 (+0000) Subject: No easy access to min() or max() macros, rewrite code to not use them. X-Git-Tag: 2.2.0a~26^2~130 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=13f6ea01d48ba36f4a70826faad4550af2ba3f9e;p=oweals%2Fcde.git No easy access to min() or max() macros, rewrite code to not use them. --- diff --git a/cde/lib/tt/slib/mp_otype.C b/cde/lib/tt/slib/mp_otype.C index c0ad4484..cde56abf 100644 --- a/cde/lib/tt/slib/mp_otype.C +++ b/cde/lib/tt/slib/mp_otype.C @@ -32,7 +32,7 @@ */ #include #if defined(linux) -# include +/*# include */ #else # include #endif @@ -311,7 +311,12 @@ int _Tt_otype:: xdr_version_required() const { int version = _Tt_signature::xdr_version_required_( _hsigs ); - return max(version, _Tt_signature::xdr_version_required_( _osigs )); +// return max(version, _Tt_signature::xdr_version_required_( _osigs )); + if (version > _Tt_signature::xdr_version_required_( _osigs )) { + return version; + } else { + return _Tt_signature::xdr_version_required_( _osigs ); + } } // diff --git a/cde/lib/tt/slib/mp_ptype.C b/cde/lib/tt/slib/mp_ptype.C index 3d5b0157..68787336 100644 --- a/cde/lib/tt/slib/mp_ptype.C +++ b/cde/lib/tt/slib/mp_ptype.C @@ -27,7 +27,7 @@ //%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $ #include #if defined(linux) -# include +/*# include */ #else # include #endif @@ -711,7 +711,12 @@ int _Tt_ptype:: xdr_version_required() const { int version = _Tt_signature::xdr_version_required_( _hsigs ); - return max(version, _Tt_signature::xdr_version_required_( _osigs )); +// return max(version, _Tt_signature::xdr_version_required_( _osigs )); + if(version > _Tt_signature::xdr_version_required_( _osigs )) { + return version; + } else { + return _Tt_signature::xdr_version_required_( _osigs ); + } }