Commit 1643507a authored by Brad King's avatar Brad King
Browse files

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
parent 7e3f205b
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment