From 1643507aaac7d4506f9e42f214f548c6cc2e214f Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Thu, 3 Jan 2013 14:16:08 -0500 Subject: [PATCH] IOStream: Fix check for compiler 'long long' support In commit bf7f0ddc (Fix KWSys FundamentalType for Universal Binaries, 2009-11-20) we repurposed CMake variables "KWSYS_SIZEOF_${type}" and dropped use of them from configured headers. However, use of one was accidentally left in "IOStream.hxx.in" to record whether the compiler supports 'long long'. Replace it with a better test. Without this, "@KWSYS_SIZEOF_LONG_LONG@" is replaced with "TRUE" which the preprocessor may evaluate as "0" or "1" depending on whether a "TRUE" macro is defined. Change-Id: I8d3e1d3fc5b80ed440dbb8cebd6231068dfbd491 --- IOStream.hxx.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/IOStream.hxx.in b/IOStream.hxx.in index 9eb99e0..2eeedf2 100644 --- a/IOStream.hxx.in +++ b/IOStream.hxx.in @@ -26,12 +26,9 @@ /* Whether ostream supports long long. */ #define @KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG @KWSYS_IOS_HAS_OSTREAM_LONG_LONG@ -/* Size of type long long and 0 if not available. */ -#define @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG @KWSYS_SIZEOF_LONG_LONG@ - /* Determine whether we need to define the streaming operators for long long or __int64. */ -#if @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG +#if @KWSYS_USE_LONG_LONG@ # if !@KWSYS_NAMESPACE@_IOS_HAS_ISTREAM_LONG_LONG || \ !@KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG # define @KWSYS_NAMESPACE@_IOS_NEED_OPERATORS_LL 1 @@ -136,7 +133,6 @@ operator<<(kwsys_ios::ostream& os, @KWSYS_NAMESPACE@::IOStreamULL value) /* If building a C++ file in kwsys itself, give the source file access to the macros without a configured namespace. */ #if defined(KWSYS_NAMESPACE) -# define KWSYS_IOS_SIZEOF_LONG_LONG @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG # define KWSYS_IOS_HAS_ISTREAM_LONG_LONG @KWSYS_NAMESPACE@_IOS_HAS_ISTREAM_LONG_LONG # define KWSYS_IOS_HAS_OSTREAM_LONG_LONG @KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG # define KWSYS_IOS_NEED_OPERATORS_LL @KWSYS_NAMESPACE@_IOS_NEED_OPERATORS_LL -- GitLab