[Cmake-commits] CMake branch, next, updated. v2.8.6-1839-g75ccbf6

Brad King brad.king at kitware.com
Fri Nov 11 19:28:19 EST 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, next has been updated
       via  75ccbf660ac3108e0c187e83700be43a37836e3d (commit)
       via  93cebcaf23118425c1ac51fcd07073c376be4e34 (commit)
       via  b2975adb31b891d87bb9828097a10167b811e96b (commit)
       via  831badeca25a8eca9e92dbbb181ea69b58112b2c (commit)
      from  621055bbdacc566683ff67967c65cc1da33aed6a (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=75ccbf660ac3108e0c187e83700be43a37836e3d
commit 75ccbf660ac3108e0c187e83700be43a37836e3d
Merge: 621055b 93cebca
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 11 19:28:06 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 11 19:28:06 2011 -0500

    Merge topic 'import-KWIML' into next
    
    93cebca Configure KWIML inside CMake as cmIML
    b2975ad Merge branch 'upstream-kwiml' into import-KWIML
    831bade KWIML: The Kitware Information Macro Library


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93cebcaf23118425c1ac51fcd07073c376be4e34
commit 93cebcaf23118425c1ac51fcd07073c376be4e34
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 27 14:15:37 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 27 14:15:37 2011 -0400

    Configure KWIML inside CMake as cmIML

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93822ef..09fd7d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -214,6 +214,12 @@ ENDMACRO(CMAKE_SET_TARGET_FOLDER)
 #-----------------------------------------------------------------------
 MACRO (CMAKE_BUILD_UTILITIES)
   #---------------------------------------------------------------------
+  # Create the KWIML library for CMake.
+  SET(KWIML cmIML)
+  SET(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
+  ADD_SUBDIRECTORY(Utilities/KWIML)
+
+  #---------------------------------------------------------------------
   # Create the kwsys library for CMake.
   SET(KWSYS_NAMESPACE cmsys)
   SET(KWSYS_USE_SystemTools 1)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2975adb31b891d87bb9828097a10167b811e96b
commit b2975adb31b891d87bb9828097a10167b811e96b
Merge: ea1a519 831bade
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 27 14:08:31 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 27 14:09:09 2011 -0400

    Merge branch 'upstream-kwiml' into import-KWIML
    
    Introduce KWIML as a subtree at Utilities/KWIML.

diff --cc Utilities/KWIML/ABI.h.in
index 0000000,c4121ff..c4121ff
mode 000000,100644..100644
--- a/Utilities/KWIML/ABI.h.in
+++ b/Utilities/KWIML/ABI.h.in
diff --cc Utilities/KWIML/CMakeLists.txt
index 0000000,6a8641a..6a8641a
mode 000000,100644..100644
--- a/Utilities/KWIML/CMakeLists.txt
+++ b/Utilities/KWIML/CMakeLists.txt
diff --cc Utilities/KWIML/Copyright.txt
index 0000000,c1e5ebc..c1e5ebc
mode 000000,100644..100644
--- a/Utilities/KWIML/Copyright.txt
+++ b/Utilities/KWIML/Copyright.txt
diff --cc Utilities/KWIML/INT.h.in
index 0000000,4a6298a..4a6298a
mode 000000,100644..100644
--- a/Utilities/KWIML/INT.h.in
+++ b/Utilities/KWIML/INT.h.in
diff --cc Utilities/KWIML/README.txt
index 0000000,6bdf859..6bdf859
mode 000000,100644..100644
--- a/Utilities/KWIML/README.txt
+++ b/Utilities/KWIML/README.txt
diff --cc Utilities/KWIML/test/CMakeLists.txt
index 0000000,aaff9e9..aaff9e9
mode 000000,100644..100644
--- a/Utilities/KWIML/test/CMakeLists.txt
+++ b/Utilities/KWIML/test/CMakeLists.txt
diff --cc Utilities/KWIML/test/test.c
index 0000000,d71a284..d71a284
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test.c
+++ b/Utilities/KWIML/test/test.c
diff --cc Utilities/KWIML/test/test.cxx
index 0000000,bf61421..bf61421
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test.cxx
+++ b/Utilities/KWIML/test/test.cxx
diff --cc Utilities/KWIML/test/test.h
index 0000000,8abb195..8abb195
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test.h
+++ b/Utilities/KWIML/test/test.h
diff --cc Utilities/KWIML/test/test_ABI_C.c
index 0000000,3ca4ad3..3ca4ad3
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_ABI_C.c
+++ b/Utilities/KWIML/test/test_ABI_C.c
diff --cc Utilities/KWIML/test/test_ABI_CXX.cxx
index 0000000,7ede20e..7ede20e
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_ABI_CXX.cxx
+++ b/Utilities/KWIML/test/test_ABI_CXX.cxx
diff --cc Utilities/KWIML/test/test_ABI_endian.h.in
index 0000000,992baea..992baea
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_ABI_endian.h.in
+++ b/Utilities/KWIML/test/test_ABI_endian.h.in
diff --cc Utilities/KWIML/test/test_INT_C.c
index 0000000,5513a0b..5513a0b
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_INT_C.c
+++ b/Utilities/KWIML/test/test_INT_C.c
diff --cc Utilities/KWIML/test/test_INT_CXX.cxx
index 0000000,9f74e96..9f74e96
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_INT_CXX.cxx
+++ b/Utilities/KWIML/test/test_INT_CXX.cxx
diff --cc Utilities/KWIML/test/test_INT_format.h.in
index 0000000,72a62f2..72a62f2
mode 000000,100644..100644
--- a/Utilities/KWIML/test/test_INT_format.h.in
+++ b/Utilities/KWIML/test/test_INT_format.h.in

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=831badeca25a8eca9e92dbbb181ea69b58112b2c
commit 831badeca25a8eca9e92dbbb181ea69b58112b2c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 27 13:58:32 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 27 14:04:32 2011 -0400

    KWIML: The Kitware Information Macro Library
    
    Provides header files that use preprocessor tests to detect and provide
    information about the compiler and its target architecture.  The headers
    contain no configuration-time test results and thus may be installed
    into an architecture-independent include directory.  This makes them
    suitable for use in the public interface of any package.

diff --git a/ABI.h.in b/ABI.h.in
new file mode 100644
index 0000000..c4121ff
--- /dev/null
+++ b/ABI.h.in
@@ -0,0 +1,461 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+  * Neither the name of Kitware, Inc. nor the names of its contributors
+    may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+============================================================================*/
+#ifndef @KWIML at _ABI_H
+#define @KWIML at _ABI_H
+/*
+This header defines macros with information about the C ABI.
+Only information that can be determined using the preprocessor at
+compilation time is available.  No try-compile results may be added
+here.  Instead we memorize results on platforms of interest.
+
+An includer may optionally define the following macros to suppress errors:
+
+  @KWIML at _ABI_NO_VERIFY          = skip verification declarations
+  @KWIML at _ABI_NO_ERROR_CHAR_SIGN = signedness of 'char' may be unknown
+  @KWIML at _ABI_NO_ERROR_LONG_LONG = existence of 'long long' may be unknown
+  @KWIML at _ABI_NO_ERROR_ENDIAN    = byte order of CPU may be unknown
+
+An includer may test the following macros after inclusion:
+
+  @KWIML at _ABI_SIZEOF_DATA_PTR   = sizeof(void*)
+  @KWIML at _ABI_SIZEOF_CODE_PTR   = sizeof(void(*)(void))
+  @KWIML at _ABI_SIZEOF_FLOAT      = sizeof(float)
+  @KWIML at _ABI_SIZEOF_DOUBLE     = sizeof(double)
+  @KWIML at _ABI_SIZEOF_CHAR       = sizeof(char)
+  @KWIML at _ABI_SIZEOF_SHORT      = sizeof(short)
+  @KWIML at _ABI_SIZEOF_INT        = sizeof(int)
+  @KWIML at _ABI_SIZEOF_LONG       = sizeof(long)
+
+  @KWIML at _ABI_SIZEOF_LONG_LONG  = sizeof(long long) or 0 if not a type
+    Undefined if existence is unknown and error suppression macro
+    @KWIML at _ABI_NO_ERROR_LONG_LONG was defined.
+
+  @KWIML at _ABI_SIZEOF___INT64    = 8 if '__int64' exists or 0 if not
+    Undefined if existence is unknown.
+
+  @KWIML at _ABI___INT64_IS_LONG   = 1 if '__int64' is 'long' (same type)
+    Undefined otherwise.
+  @KWIML at _ABI___INT64_IS_LONG_LONG = 1 if '__int64' is 'long long' (same type)
+    Undefined otherwise.
+  @KWIML at _ABI___INT64_IS_UNIQUE = 1 if '__int64' is a distinct type
+    Undefined otherwise.
+
+  @KWIML at _ABI_CHAR_IS_UNSIGNED  = 1 if 'char' is unsigned, else undefined
+  @KWIML at _ABI_CHAR_IS_SIGNED    = 1 if 'char' is signed, else undefined
+    One of these is defined unless signedness of 'char' is unknown and
+    error suppression macro @KWIML at _ABI_NO_ERROR_CHAR_SIGN was defined.
+
+  @KWIML at _ABI_ENDIAN_ID_BIG    = id for big-endian (always defined)
+  @KWIML at _ABI_ENDIAN_ID_LITTLE = id for little-endian (always defined)
+  @KWIML at _ABI_ENDIAN_ID        = id of byte order of target CPU
+    Defined to @KWIML at _ABI_ENDIAN_ID_BIG or @KWIML at _ABI_ENDIAN_ID_LITTLE
+    unless byte order is unknown and error suppression macro
+    @KWIML at _ABI_NO_ERROR_ENDIAN was defined.
+
+We verify most results using dummy "extern" declarations that are
+invalid if the macros are wrong.  Verification is disabled if
+suppression macro @KWIML at _ABI_NO_VERIFY was defined.
+*/
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_DATA_PTR)
+# if defined(__SIZEOF_POINTER__)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR __SIZEOF_POINTER__
+# elif defined(_SIZE_PTR)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR (_SIZE_PTR >> 3)
+# elif defined(_LP64) || defined(__LP64__)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(_ILP32)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 4
+# elif defined(__64BIT__) /* IBM XL */
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(_M_X64)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(__ia64)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(__sparcv9)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(__x86_64) || defined(__x86_64__)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(__amd64) || defined(__amd64__)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 8
+# elif defined(__i386) || defined(__i386__)
+#  define @KWIML at _ABI_SIZEOF_DATA_PTR 4
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_DATA_PTR)
+# define @KWIML at _ABI_SIZEOF_DATA_PTR 4
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_CODE_PTR)
+# define @KWIML at _ABI_SIZEOF_CODE_PTR @KWIML at _ABI_SIZEOF_DATA_PTR
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_CHAR)
+# define @KWIML at _ABI_SIZEOF_CHAR 1
+#endif
+
+#if !defined(@KWIML at _ABI_CHAR_IS_UNSIGNED) && !defined(@KWIML at _ABI_CHAR_IS_SIGNED)
+# if defined(__CHAR_UNSIGNED__) /* GNU, some IBM XL, others?  */
+#  define @KWIML at _ABI_CHAR_IS_UNSIGNED 1
+# elif defined(_CHAR_UNSIGNED) /* Intel, IBM XL, MSVC, Borland, others?  */
+#  define @KWIML at _ABI_CHAR_IS_UNSIGNED 1
+# elif defined(_CHAR_SIGNED) /* IBM XL, others? */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(__CHAR_SIGNED__) /* IBM XL, Watcom, others? */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(__SIGNED_CHARS__) /* EDG, Intel, SGI MIPSpro */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(_CHAR_IS_SIGNED) /* Some SunPro, others? */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(_CHAR_IS_UNSIGNED) /* SunPro, others? */
+#  define @KWIML at _ABI_CHAR_IS_UNSIGNED 1
+# elif defined(__GNUC__) /* GNU default */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro default */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(__HP_cc) || defined(__HP_aCC) /* HP default (unless +uc) */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(_SGI_COMPILER_VERSION) /* SGI MIPSpro default */
+#  define @KWIML at _ABI_CHAR_IS_UNSIGNED 1
+# elif defined(_MSC_VER) /* MSVC default */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# elif defined(__WATCOMC__) /* Watcom default */
+#  define @KWIML at _ABI_CHAR_IS_UNSIGNED 1
+# elif defined(__BORLANDC__) /* Borland default */
+#  define @KWIML at _ABI_CHAR_IS_SIGNED 1
+# endif
+#endif
+#if !defined(@KWIML at _ABI_CHAR_IS_UNSIGNED) && !defined(@KWIML at _ABI_CHAR_IS_SIGNED) \
+ && !defined(@KWIML at _ABI_NO_ERROR_CHAR_SIGN)
+# error "Signedness of 'char' unknown."
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_SHORT)
+# if defined(__SIZEOF_SHORT__)
+#  define @KWIML at _ABI_SIZEOF_SHORT __SIZEOF_SHORT__
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_SHORT)
+# define @KWIML at _ABI_SIZEOF_SHORT 2
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_INT)
+# if defined(__SIZEOF_INT__)
+#  define @KWIML at _ABI_SIZEOF_INT __SIZEOF_INT__
+# elif defined(_SIZE_INT)
+#  define @KWIML at _ABI_SIZEOF_INT (_SIZE_INT >> 3)
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_INT)
+# define @KWIML at _ABI_SIZEOF_INT 4
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_LONG)
+# if defined(__SIZEOF_LONG__)
+#  define @KWIML at _ABI_SIZEOF_LONG __SIZEOF_LONG__
+# elif defined(_SIZE_LONG)
+#  define @KWIML at _ABI_SIZEOF_LONG (_SIZE_LONG >> 3)
+# elif defined(__LONG_MAX__)
+#  if __LONG_MAX__ == 0x7fffffff
+#   define @KWIML at _ABI_SIZEOF_LONG 4
+#  elif __LONG_MAX__>>32 == 0x7fffffff
+#   define @KWIML at _ABI_SIZEOF_LONG 8
+#  endif
+# elif defined(_MSC_VER) /* MSVC and Intel on Windows */
+#  define @KWIML at _ABI_SIZEOF_LONG 4
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_LONG)
+# define @KWIML at _ABI_SIZEOF_LONG @KWIML at _ABI_SIZEOF_DATA_PTR
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG)
+# if defined(__SIZEOF_LONG_LONG__)
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__
+# elif defined(__LONG_LONG_MAX__)
+#  if __LONG_LONG_MAX__ == 0x7fffffff
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 4
+#  elif __LONG_LONG_MAX__>>32 == 0x7fffffff
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+#  endif
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG)
+# if defined(_LONGLONG) /* SGI, some GNU, perhaps others.  */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(_LONG_LONG) /* IBM XL, perhaps others.  */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__NO_LONG_LONG) /* EDG */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 0
+# elif defined(__cplusplus) && __cplusplus > 199711L /* C++0x */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__HP_cc) || defined(__HP_aCC) /* HP */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__WATCOMC__) /* Watcom */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__INTEL_COMPILER) /* Intel */
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__BORLANDC__) /* Borland */
+#  if __BORLANDC__ >= 0x0560
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+#  else
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 0
+#  endif
+# elif defined(_MSC_VER) /* Microsoft */
+#  if _MSC_VER >= 1310
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+#  else
+#   define @KWIML at _ABI_SIZEOF_LONG_LONG 0
+#  endif
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && !defined(@KWIML at _ABI_NO_ERROR_LONG_LONG)
+# error "Existence of 'long long' unknown."
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF___INT64)
+# if defined(__INTEL_COMPILER)
+#  define @KWIML at _ABI_SIZEOF___INT64 8
+# elif defined(_MSC_VER)
+#  define @KWIML at _ABI_SIZEOF___INT64 8
+# elif defined(__BORLANDC__)
+#  define @KWIML at _ABI_SIZEOF___INT64 8
+# else
+#  define @KWIML at _ABI_SIZEOF___INT64 0
+# endif
+#endif
+
+#if defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0
+# if @KWIML at _ABI_SIZEOF_LONG == 8
+#  define @KWIML at _ABI___INT64_IS_LONG 1
+# elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+#  define @KWIML at _ABI___INT64_IS_LONG_LONG 1
+# else
+#  define @KWIML at _ABI___INT64_IS_UNIQUE 1
+# endif
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_FLOAT)
+# if defined(__SIZEOF_FLOAT__)
+#  define @KWIML at _ABI_SIZEOF_FLOAT __SIZEOF_FLOAT__
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_FLOAT)
+# define @KWIML at _ABI_SIZEOF_FLOAT 4
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_SIZEOF_DOUBLE)
+# if defined(__SIZEOF_DOUBLE__)
+#  define @KWIML at _ABI_SIZEOF_DOUBLE __SIZEOF_DOUBLE__
+# endif
+#endif
+#if !defined(@KWIML at _ABI_SIZEOF_DOUBLE)
+# define @KWIML at _ABI_SIZEOF_DOUBLE 8
+#endif
+
+/*--------------------------------------------------------------------------*/
+/* Identify possible endian cases.  The macro @KWIML at _ABI_ENDIAN_ID will be
+   defined to one of these, or undefined if unknown.  */
+#if !defined(@KWIML at _ABI_ENDIAN_ID_BIG)
+# define @KWIML at _ABI_ENDIAN_ID_BIG    4321
+#endif
+#if !defined(@KWIML at _ABI_ENDIAN_ID_LITTLE)
+# define @KWIML at _ABI_ENDIAN_ID_LITTLE 1234
+#endif
+#if @KWIML at _ABI_ENDIAN_ID_BIG == @KWIML at _ABI_ENDIAN_ID_LITTLE
+# error "@KWIML at _ABI_ENDIAN_ID_BIG == @KWIML at _ABI_ENDIAN_ID_LITTLE"
+#endif
+
+#if defined(@KWIML at _ABI_ENDIAN_ID) /* Skip #elif cases if already defined.  */
+
+/* Use dedicated symbols if the compiler defines them.  Do this first
+   because some architectures allow runtime byte order selection by
+   the operating system (values for such architectures below are
+   guesses for compilers that do not define a dedicated symbol).
+   Ensure that only one is defined in case the platform or a header
+   defines both as possible values for some third symbol.  */
+#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+#elif defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+#elif defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+
+/* Alpha */
+#elif defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+
+/* Arm */
+#elif defined(__arm__)
+# if !defined(__ARMEB__)
+#  define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+# else
+#  define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+# endif
+
+/* Intel x86 */
+#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+#elif defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+#elif defined(__MWERKS__) && defined(__INTEL__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+
+/* Intel x86-64 */
+#elif defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+#elif defined(__amd64) || defined(__amd64__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+
+/* Intel Architecture-64 (Itanium) */
+#elif defined(__ia64) || defined(__ia64__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+#elif defined(_IA64) || defined(__IA64__) || defined(_M_IA64)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE
+
+/* PowerPC */
+#elif defined(__powerpc) || defined(__powerpc__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+#elif defined(__ppc) || defined(__ppc__) || defined(__POWERPC__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* SPARC */
+#elif defined(__sparc) || defined(__sparc__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* HP/PA RISC */
+#elif defined(__hppa) || defined(__hppa__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* Motorola 68k */
+#elif defined(__m68k__) || defined(M68000)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* MIPS */
+#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* RS/6000 */
+#elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+#elif defined(_ARCH_PWR) || defined(_ARCH_PWR2)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* System/370 */
+#elif defined(__370__) || defined(__THW_370__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* System/390 */
+#elif defined(__s390__) || defined(__s390x__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* z/Architecture */
+#elif defined(__SYSC_ZARCH__)
+# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG
+
+/* Unknown CPU */
+#elif !defined(@KWIML at _ABI_NO_ERROR_ENDIAN)
+# error "Byte order of target CPU unknown."
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _ABI_NO_VERIFY)
+#define @KWIML at _ABI__VERIFY(n, x, y) extern int (*n)[x]; extern int (*n)[y]
+#define @KWIML at _ABI__VERIFY2(n, x, y) extern int (*n)(x*); extern int (*n)(y*)
+#if defined(__cplusplus)
+# define @KWIML at _ABI__VERIFY3(n, x, y) extern int* n(x*); extern char* n(y*)
+#else
+# define @KWIML at _ABI__VERIFY3(n, x, y) extern int* n(x*) /* TODO: possible? */
+#endif
+#define @KWIML at _ABI__VERIFY_BOOL(m, b) @KWIML at _ABI__VERIFY(m##__VERIFY__, 2, (b)?2:3)
+#define @KWIML at _ABI__VERIFY_SIZE(m, t) @KWIML at _ABI__VERIFY(m##__VERIFY__, m, sizeof(t))
+#define @KWIML at _ABI__VERIFY_SAME(m, x, y) @KWIML at _ABI__VERIFY2(m##__VERIFY__, x, y)
+#define @KWIML at _ABI__VERIFY_DIFF(m, x, y) @KWIML at _ABI__VERIFY3(m##__VERIFY__, x, y)
+
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_DATA_PTR, int*);
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_CODE_PTR, int(*)(int));
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_CHAR, char);
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_SHORT, short);
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_INT, int);
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_LONG, long);
+#if defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG > 0
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_LONG_LONG, long long);
+#endif
+#if defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF___INT64, __int64);
+#endif
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_FLOAT, float);
+ at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_DOUBLE, double);
+
+#if defined(@KWIML at _ABI___INT64_IS_LONG)
+ at KWIML@_ABI__VERIFY_SAME(@KWIML at _ABI___INT64_IS_LONG, __int64, long);
+#elif defined(@KWIML at _ABI___INT64_IS_LONG_LONG)
+ at KWIML@_ABI__VERIFY_SAME(@KWIML at _ABI___INT64_IS_LONG_LONG, __int64, long long);
+#elif defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0
+ at KWIML@_ABI__VERIFY_DIFF(@KWIML at _ABI___INT64_NOT_LONG, __int64, long);
+# if defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG > 0
+ at KWIML@_ABI__VERIFY_DIFF(@KWIML at _ABI___INT64_NOT_LONG_LONG, __int64, long long);
+# endif
+#endif
+
+#if defined(@KWIML at _ABI_CHAR_IS_UNSIGNED)
+ at KWIML@_ABI__VERIFY_BOOL(@KWIML at _ABI_CHAR_IS_UNSIGNED, (char)0x80 > 0);
+#elif defined(@KWIML at _ABI_CHAR_IS_SIGNED)
+ at KWIML@_ABI__VERIFY_BOOL(@KWIML at _ABI_CHAR_IS_SIGNED,   (char)0x80 < 0);
+#endif
+
+#undef @KWIML at _ABI__VERIFY_DIFF
+#undef @KWIML at _ABI__VERIFY_SAME
+#undef @KWIML at _ABI__VERIFY_SIZE
+#undef @KWIML at _ABI__VERIFY_BOOL
+#undef @KWIML at _ABI__VERIFY3
+#undef @KWIML at _ABI__VERIFY2
+#undef @KWIML at _ABI__VERIFY
+
+#endif
+
+#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..6a8641a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,79 @@
+#=============================================================================
+# Kitware Information Macro Library
+# Copyright 2010-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# Import the KWIML directory tree into a subdirectory under a parent
+# project and configure the library as follows:
+#
+#  SET(KWIML myIML)
+#  SUBDIRS(KWIML)
+#
+# Optional settings are as follows:
+#
+#  KWIML_HEADER_ROOT = build tree directory to hold KWIML headers.
+#    Headers will go in a directory called "${KWIML}" under this root.
+#    For example:
+#
+#      SET(KWIML_HEADER_ROOT ${PROJECT_BINARY_DIR})
+#      INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
+#
+#  KWIML_INSTALL_INCLUDE_DIR = install KWIML with "make install"
+#    Specify a value relative to the install prefix and do NOT start with '/'.
+#  KWIML_INSTALL_INCLUDE_OPTIONS = extra header installation options
+#    Specify options for the install(FILES) command.
+#
+#  KWIML_LABELS_TEST = list of labels for KWIML tests
+
+cmake_minimum_required(VERSION 2.6.3 FATAL_ERROR)
+
+#-----------------------------------------------------------------------------
+if(NOT DEFINED KWIML)
+  if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+    message(FATAL_ERROR "Set KWIML namespace in parent directory!")
+  endif()
+  set(KWIML KWIML)
+  set(KWIML_STANDALONE 1)
+  project(KWIML)
+  include(CTest)
+  mark_as_advanced(BUILD_TESTING)
+endif()
+
+#-----------------------------------------------------------------------------
+get_property(KWIML_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
+foreach(lang ${KWIML_LANGUAGES})
+  set(KWIML_LANGUAGE_${lang} 1)
+endforeach()
+if(NOT KWIML_LANGUAGE_C AND NOT KWIML_LANGUAGE_CXX)
+  set(BUILD_TESTING OFF)
+endif()
+
+#-----------------------------------------------------------------------------
+if(NOT KWIML_HEADER_ROOT)
+  set(KWIML_HEADER_ROOT "${PROJECT_BINARY_DIR}")
+endif()
+set(KWIML_HEADER_DIR "${KWIML_HEADER_ROOT}/${KWIML}")
+include_directories(${KWIML_HEADER_ROOT})
+
+#-----------------------------------------------------------------------------
+foreach(h ABI INT)
+  set(header ${KWIML_HEADER_DIR}/${h}.h)
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${h}.h.in ${header} @ONLY)
+  if(KWIML_INSTALL_INCLUDE_DIR)
+    install(FILES ${header}
+      DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/${KWIML}
+      ${KWIML_INSTALL_INCLUDE_OPTIONS})
+  endif()
+endforeach()
+
+#-----------------------------------------------------------------------------
+if(BUILD_TESTING)
+  add_subdirectory(test)
+endif()
diff --git a/Copyright.txt b/Copyright.txt
new file mode 100644
index 0000000..c1e5ebc
--- /dev/null
+++ b/Copyright.txt
@@ -0,0 +1,30 @@
+Kitware Information Macro Library
+Copyright 2010-2011 Kitware, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+* Neither the name of Kitware, Inc. nor the names of its contributors
+  may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/INT.h.in b/INT.h.in
new file mode 100644
index 0000000..4a6298a
--- /dev/null
+++ b/INT.h.in
@@ -0,0 +1,735 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+  * Neither the name of Kitware, Inc. nor the names of its contributors
+    may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+============================================================================*/
+#ifndef @KWIML at _INT_H
+#define @KWIML at _INT_H
+/*
+This header defines macros with information about sized integer types.
+Only information that can be determined using the preprocessor at
+compilation time is available.  No try-compile results may be added
+here.  Instead we memorize results on platforms of interest.
+
+An includer may optionally define the following macros to suppress errors:
+
+Input:
+  @KWIML at _INT_NO_VERIFY          = skip verification declarations
+  @KWIML at _INT_NO_ERROR_INT64_T   = type '@KWIML at _INT_int64_t' is optional (*)
+  @KWIML at _INT_NO_ERROR_UINT64_T  = type '@KWIML at _INT_uint64_t' is optional (*)
+  @KWIML at _INT_NO_ERROR_INTPTR_T  = type '@KWIML at _INT_intptr_t' is optional (*)
+  @KWIML at _INT_NO_ERROR_UINTPTR_T = type '@KWIML at _INT_uintptr_t' is optional (*)
+
+An includer may optionally define the following macros to override defaults.
+Either way, an includer may test these macros after inclusion:
+
+  @KWIML at _INT_HAVE_STDINT_H   = include <stdint.h>
+  @KWIML at _INT_NO_STDINT_H     = do not include <stdint.h>
+  @KWIML at _INT_HAVE_INTTYPES_H = include <inttypes.h>
+  @KWIML at _INT_NO_INTTYPES_H   = do not include <inttypes.h>
+
+An includer may test the following macros after inclusion:
+
+  @KWIML at _INT_HAVE_INT#_T     = type 'int#_t' is available
+  @KWIML at _INT_HAVE_UINT#_T    = type 'uint#_t' is available
+                                # = 8, 16, 32, 64, PTR
+
+  @KWIML at _INT_int#_t          = signed integer type exactly # bits wide
+  @KWIML at _INT_uint#_t         = unsigned integer type exactly # bits wide
+                                # = 8, 16, 32, 64 (*), ptr (*)
+
+  @KWIML at _INT_NO_INT64_T      = type '@KWIML at _INT_int64_t' not available
+  @KWIML at _INT_NO_UINT64_T     = type '@KWIML at _INT_uint64_t' not available
+  @KWIML at _INT_NO_INTPTR_T     = type '@KWIML at _INT_intptr_t' not available
+  @KWIML at _INT_NO_UINTPTR_T    = type '@KWIML at _INT_uintptr_t' not available
+
+  @KWIML at _INT_INT#_C(c)       = signed integer constant at least # bits wide
+  @KWIML at _INT_UINT#_C(c)      = unsigned integer constant at least # bits wide
+                                # = 8, 16, 32, 64 (*)
+
+  @KWIML at _INT_<fmt>#          = print or scan format, <fmt> in table below
+                                # = 8, 16, 32, 64, PTR (*)
+
+             signed                unsigned
+           ----------- ------------------------------
+          |  decimal  | decimal  octal   hexadecimal |
+    print | PRId PRIi |  PRIu    PRIo    PRIx  PRIX  |
+     scan | SCNd SCNi |  SCNu    SCNo    SCNx        |
+           ----------- ------------------------------
+
+    The SCN*8 and SCN*64 format macros will not be defined on systems
+    with scanf implementations known not to support them.
+
+  @KWIML at _INT_BROKEN_INT64_C  = macro INT64_C is incorrect if defined
+  @KWIML at _INT_BROKEN_UINT64_C = macro UINT64_C is incorrect if defined
+    Some compilers define integer constant macros incorrectly and
+    cannot handle literals as large as the integer type.
+
+  @KWIML at _INT_BROKEN_INT8_T   = type 'int8_t' is available but incorrect
+    Some compilers have a flag to make 'char' (un)signed but do not account
+    for it while defining int8_t in the non-default case.
+
+  The broken cases do not affect correctness of the macros documented above.
+*/
+
+#include "ABI.h"
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_STDINT_H) /* Already defined. */
+#elif defined(@KWIML at _INT_NO_STDINT_H) /* Already defined. */
+#elif defined(HAVE_STDINT_H) /* Optionally provided by includer.  */
+# define @KWIML at _INT_HAVE_STDINT_H 1
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+# define @KWIML at _INT_HAVE_STDINT_H 1
+#elif defined(_MSC_VER) /* MSVC */
+# if _MSC_VER >= 1600
+#  define @KWIML at _INT_HAVE_STDINT_H 1
+# else
+#  define @KWIML at _INT_NO_STDINT_H 1
+# endif
+#elif defined(__BORLANDC__) /* Borland */
+# if __BORLANDC__ >= 0x560
+#  define @KWIML at _INT_HAVE_STDINT_H 1
+# else
+#  define @KWIML at _INT_NO_STDINT_H 1
+# endif
+#elif defined(__WATCOMC__) /* Watcom */
+# define @KWIML at _INT_NO_STDINT_H 1
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INTTYPES_H) /* Already defined. */
+#elif defined(@KWIML at _INT_NO_INTTYPES_H) /* Already defined. */
+#elif defined(HAVE_INTTYPES_H) /* Optionally provided by includer.  */
+# define @KWIML at _INT_HAVE_INTTYPES_H 1
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+# define @KWIML at _INT_HAVE_INTTYPES_H 1
+#elif defined(_MSC_VER) /* MSVC */
+# define @KWIML at _INT_NO_INTTYPES_H 1
+#elif defined(__BORLANDC__) /* Borland */
+# define @KWIML at _INT_NO_INTTYPES_H 1
+#elif defined(__WATCOMC__) /* Watcom */
+# define @KWIML at _INT_NO_INTTYPES_H 1
+#else /* Assume it exists.  */
+# define @KWIML at _INT_HAVE_INTTYPES_H 1
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_STDINT_H) && defined(@KWIML at _INT_NO_STDINT_H)
+# error "Both @KWIML at _INT_HAVE_STDINT_H and @KWIML at _INT_NO_STDINT_H defined!"
+#endif
+#if defined(@KWIML at _INT_HAVE_INTTYPES_H) && defined(@KWIML at _INT_NO_INTTYPES_H)
+# error "Both @KWIML at _INT_HAVE_INTTYPES_H and @KWIML at _INT_NO_INTTYPES_H defined!"
+#endif
+
+#if defined(@KWIML at _INT_HAVE_STDINT_H)
+# include <stdint.h>
+#endif
+#if defined(@KWIML at _INT_HAVE_INTTYPES_H)
+# if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
+#  define __STDC_FORMAT_MACROS
+# endif
+# include <inttypes.h>
+#endif
+
+#if defined(@KWIML at _INT_HAVE_STDINT_H) || defined(@KWIML at _INT_HAVE_INTTYPES_H)
+#define @KWIML at _INT_HAVE_INT8_T 1
+#define @KWIML at _INT_HAVE_UINT8_T 1
+#define @KWIML at _INT_HAVE_INT16_T 1
+#define @KWIML at _INT_HAVE_UINT16_T 1
+#define @KWIML at _INT_HAVE_INT32_T 1
+#define @KWIML at _INT_HAVE_UINT32_T 1
+#define @KWIML at _INT_HAVE_INT64_T 1
+#define @KWIML at _INT_HAVE_UINT64_T 1
+#define @KWIML at _INT_HAVE_INTPTR_T 1
+#define @KWIML at _INT_HAVE_UINTPTR_T 1
+#endif
+
+#if (defined(__SUNPRO_C)||defined(__SUNPRO_CC)) && defined(_CHAR_IS_UNSIGNED)
+# define @KWIML at _INT_BROKEN_INT8_T /* system type defined incorrectly */
+#elif defined(__BORLANDC__) && defined(_CHAR_UNSIGNED)
+# define @KWIML at _INT_BROKEN_INT8_T /* system type defined incorrectly */
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INT8_T) && !defined(@KWIML at _INT_BROKEN_INT8_T)
+# define @KWIML at _INT_int8_t int8_t
+#else
+# define @KWIML at _INT_int8_t signed char
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T)
+# define @KWIML at _INT_uint8_t uint8_t
+#else
+# define @KWIML at _INT_uint8_t unsigned char
+#endif
+
+#if defined(__INTEL_COMPILER)
+#elif defined(__SUNPRO_C) && __SUNPRO_C < 0x570
+# define @KWIML at _INT__NO_SCN8
+#elif defined(__SUNPRO_CC) && __SUNPRO_CC < 0x570
+# define @KWIML at _INT__NO_SCN8
+#elif defined(__HP_cc) || defined(__HP_aCC)
+# define @KWIML at _INT__NO_SCN8
+#elif defined(__BORLANDC__)
+# define @KWIML at _INT__NO_SCN8
+# define @KWIML at _INT__NO_SCN64
+#elif defined(_MSC_VER)
+# define @KWIML at _INT__NO_SCN8
+#elif defined(__WATCOMC__)
+# define @KWIML at _INT__NO_SCN8
+#endif
+
+/* 8-bit d, i */
+#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(PRId8)
+# define @KWIML at _INT_PRId8 PRId8
+#else
+# define @KWIML at _INT_PRId8   "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(SCNd8)
+# define @KWIML at _INT_SCNd8 SCNd8
+#elif !defined(@KWIML at _INT__NO_SCN8)
+# define @KWIML at _INT_SCNd8 "hhd"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(PRIi8)
+# define @KWIML at _INT_PRIi8 PRIi8
+#else
+# define @KWIML at _INT_PRIi8   "i"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(SCNi8)
+# define @KWIML at _INT_SCNi8 SCNi8
+#elif !defined(@KWIML at _INT__NO_SCN8)
+# define @KWIML at _INT_SCNi8 "hhi"
+#endif
+
+/* 8-bit o, u, x, X */
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIo8)
+# define @KWIML at _INT_PRIo8 PRIo8
+#else
+# define @KWIML at _INT_PRIo8   "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNo8)
+# define @KWIML at _INT_SCNo8 SCNo8
+#elif !defined(@KWIML at _INT__NO_SCN8)
+# define @KWIML at _INT_SCNo8 "hho"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIu8)
+# define @KWIML at _INT_PRIu8 PRIu8
+#else
+# define @KWIML at _INT_PRIu8   "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNu8)
+# define @KWIML at _INT_SCNu8 SCNu8
+#elif !defined(@KWIML at _INT__NO_SCN8)
+# define @KWIML at _INT_SCNu8 "hhu"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIx8)
+# define @KWIML at _INT_PRIx8 PRIx8
+#else
+# define @KWIML at _INT_PRIx8   "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNx8)
+# define @KWIML at _INT_SCNx8 SCNx8
+#elif !defined(@KWIML at _INT__NO_SCN8)
+# define @KWIML at _INT_SCNx8 "hhx"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIX8)
+# define @KWIML at _INT_PRIX8 PRIX8
+#else
+# define @KWIML at _INT_PRIX8   "X"
+#endif
+
+/* 8-bit constants */
+#if defined(INT8_C)
+# define @KWIML at _INT_INT8_C(c) INT8_C(c)
+#else
+# define @KWIML at _INT_INT8_C(c) c
+#endif
+#if defined(UINT8_C)
+# define @KWIML at _INT_UINT8_C(c) UINT8_C(c)
+#else
+# define @KWIML at _INT_UINT8_C(c) c ## u
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INT16_T)
+# define @KWIML at _INT_int16_t int16_t
+#else
+# define @KWIML at _INT_int16_t signed short
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T)
+# define @KWIML at _INT_uint16_t uint16_t
+#else
+# define @KWIML at _INT_uint16_t unsigned short
+#endif
+
+/* 16-bit d, i */
+#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(PRId16)
+# define @KWIML at _INT_PRId16 PRId16
+#else
+# define @KWIML at _INT_PRId16  "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(SCNd16)
+# define @KWIML at _INT_SCNd16 SCNd16
+#else
+# define @KWIML at _INT_SCNd16 "hd"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(PRIi16)
+# define @KWIML at _INT_PRIi16 PRIi16
+#else
+# define @KWIML at _INT_PRIi16  "i"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(SCNi16)
+# define @KWIML at _INT_SCNi16 SCNi16
+#else
+# define @KWIML at _INT_SCNi16 "hi"
+#endif
+
+/* 16-bit o, u, x, X */
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIo16)
+# define @KWIML at _INT_PRIo16 PRIo16
+#else
+# define @KWIML at _INT_PRIo16  "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNo16)
+# define @KWIML at _INT_SCNo16 SCNo16
+#else
+# define @KWIML at _INT_SCNo16 "ho"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIu16)
+# define @KWIML at _INT_PRIu16 PRIu16
+#else
+# define @KWIML at _INT_PRIu16  "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNu16)
+# define @KWIML at _INT_SCNu16 SCNu16
+#else
+# define @KWIML at _INT_SCNu16 "hu"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIx16)
+# define @KWIML at _INT_PRIx16 PRIx16
+#else
+# define @KWIML at _INT_PRIx16  "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNx16)
+# define @KWIML at _INT_SCNx16 SCNx16
+#else
+# define @KWIML at _INT_SCNx16 "hx"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIX16)
+# define @KWIML at _INT_PRIX16 PRIX16
+#else
+# define @KWIML at _INT_PRIX16  "X"
+#endif
+
+/* 16-bit constants */
+#if defined(INT16_C)
+# define @KWIML at _INT_INT16_C(c) INT16_C(c)
+#else
+# define @KWIML at _INT_INT16_C(c) c
+#endif
+#if defined(UINT16_C)
+# define @KWIML at _INT_UINT16_C(c) UINT16_C(c)
+#else
+# define @KWIML at _INT_UINT16_C(c) c ## u
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INT32_T)
+# define @KWIML at _INT_int32_t int32_t
+#else
+# define @KWIML at _INT_int32_t signed int
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T)
+# define @KWIML at _INT_uint32_t uint32_t
+#else
+# define @KWIML at _INT_uint32_t unsigned int
+#endif
+
+/* 32-bit d, i */
+#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(PRId32)
+# define @KWIML at _INT_PRId32 PRId32
+#else
+# define @KWIML at _INT_PRId32 "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(SCNd32)
+# define @KWIML at _INT_SCNd32 SCNd32
+#else
+# define @KWIML at _INT_SCNd32 "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(PRIi32)
+# define @KWIML at _INT_PRIi32 PRIi32
+#else
+# define @KWIML at _INT_PRIi32 "i"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(SCNi32)
+# define @KWIML at _INT_SCNi32 SCNi32
+#else
+# define @KWIML at _INT_SCNi32 "i"
+#endif
+
+/* 32-bit o, u, x, X */
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIo32)
+# define @KWIML at _INT_PRIo32 PRIo32
+#else
+# define @KWIML at _INT_PRIo32 "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNo32)
+# define @KWIML at _INT_SCNo32 SCNo32
+#else
+# define @KWIML at _INT_SCNo32 "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIu32)
+# define @KWIML at _INT_PRIu32 PRIu32
+#else
+# define @KWIML at _INT_PRIu32 "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNu32)
+# define @KWIML at _INT_SCNu32 SCNu32
+#else
+# define @KWIML at _INT_SCNu32 "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIx32)
+# define @KWIML at _INT_PRIx32 PRIx32
+#else
+# define @KWIML at _INT_PRIx32 "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNx32)
+# define @KWIML at _INT_SCNx32 SCNx32
+#else
+# define @KWIML at _INT_SCNx32 "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIX32)
+# define @KWIML at _INT_PRIX32 PRIX32
+#else
+# define @KWIML at _INT_PRIX32 "X"
+#endif
+
+/* 32-bit constants */
+#if defined(INT32_C)
+# define @KWIML at _INT_INT32_C(c) INT32_C(c)
+#else
+# define @KWIML at _INT_INT32_C(c) c
+#endif
+#if defined(UINT32_C)
+# define @KWIML at _INT_UINT32_C(c) UINT32_C(c)
+#else
+# define @KWIML at _INT_UINT32_C(c) c ## u
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INT64_T)
+# define @KWIML at _INT_int64_t int64_t
+#elif @KWIML at _ABI_SIZEOF_LONG == 8
+# define @KWIML at _INT_int64_t signed long
+#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+# define @KWIML at _INT_int64_t signed long long
+#elif defined(@KWIML at _ABI_SIZEOF___INT64)
+# define @KWIML at _INT_int64_t signed __int64
+#elif defined(@KWIML at _INT_NO_ERROR_INT64_T)
+# define @KWIML at _INT_NO_INT64_T
+#else
+# error "No type known for 'int64_t'."
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T)
+# define @KWIML at _INT_uint64_t uint64_t
+#elif @KWIML at _ABI_SIZEOF_LONG == 8
+# define @KWIML at _INT_uint64_t unsigned long
+#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+# define @KWIML at _INT_uint64_t unsigned long long
+#elif defined(@KWIML at _ABI_SIZEOF___INT64)
+# define @KWIML at _INT_uint64_t unsigned __int64
+#elif defined(@KWIML at _INT_NO_ERROR_UINT64_T)
+# define @KWIML at _INT_NO_UINT64_T
+#else
+# error "No type known for 'uint64_t'."
+#endif
+
+#if defined(__INTEL_COMPILER)
+#elif defined(__BORLANDC__)
+# define @KWIML at _INT__NO_FMTLL /* type 'long long' but not 'll' format */
+# define @KWIML at _INT_BROKEN_INT64_C   /* system macro defined incorrectly */
+# define @KWIML at _INT_BROKEN_UINT64_C  /* system macro defined incorrectly */
+#elif defined(_MSC_VER) && _MSC_VER < 1400
+# define @KWIML at _INT__NO_FMTLL /* type 'long long' but not 'll' format */
+#endif
+
+#if @KWIML at _ABI_SIZEOF_LONG == 8
+# define @KWIML at _INT__FMT64 "l"
+#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+# if !defined(@KWIML at _INT__NO_FMTLL)
+#  define @KWIML at _INT__FMT64 "ll"
+# else
+#  define @KWIML at _INT__FMT64 "I64"
+# endif
+#elif defined(@KWIML at _ABI_SIZEOF___INT64)
+# if defined(__BORLANDC__)
+#  define @KWIML at _INT__FMT64 "L"
+# else
+#  define @KWIML at _INT__FMT64 "I64"
+# endif
+#endif
+
+/* 64-bit d, i */
+#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(PRId64)
+# define @KWIML at _INT_PRId64 PRId64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRId64 @KWIML at _INT__FMT64 "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(SCNd64)
+# define @KWIML at _INT_SCNd64 SCNd64
+#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64)
+# define @KWIML at _INT_SCNd64 @KWIML at _INT__FMT64 "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(PRIi64)
+# define @KWIML at _INT_PRIi64 PRIi64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRIi64 @KWIML at _INT__FMT64 "d"
+#endif
+#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(SCNi64)
+# define @KWIML at _INT_SCNi64 SCNi64
+#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64)
+# define @KWIML at _INT_SCNi64 @KWIML at _INT__FMT64 "d"
+#endif
+
+/* 64-bit o, u, x, X */
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIo64)
+# define @KWIML at _INT_PRIo64 PRIo64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRIo64 @KWIML at _INT__FMT64 "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNo64)
+# define @KWIML at _INT_SCNo64 SCNo64
+#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64)
+# define @KWIML at _INT_SCNo64 @KWIML at _INT__FMT64 "o"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIu64)
+# define @KWIML at _INT_PRIu64 PRIu64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRIu64 @KWIML at _INT__FMT64 "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNu64)
+# define @KWIML at _INT_SCNu64 SCNu64
+#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64)
+# define @KWIML at _INT_SCNu64 @KWIML at _INT__FMT64 "u"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIx64)
+# define @KWIML at _INT_PRIx64 PRIx64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRIx64 @KWIML at _INT__FMT64 "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNx64)
+# define @KWIML at _INT_SCNx64 SCNx64
+#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64)
+# define @KWIML at _INT_SCNx64 @KWIML at _INT__FMT64 "x"
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIX64)
+# define @KWIML at _INT_PRIX64 PRIX64
+#elif defined(@KWIML at _INT__FMT64)
+# define @KWIML at _INT_PRIX64 @KWIML at _INT__FMT64 "X"
+#endif
+
+/* 64-bit constants */
+#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(INT64_C) \
+  && !defined(@KWIML at _INT_BROKEN_INT64_C)
+# define @KWIML at _INT_INT64_C(c) INT64_C(c)
+#elif @KWIML at _ABI_SIZEOF_LONG == 8
+# define @KWIML at _INT_INT64_C(c) c ## l
+#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+# define @KWIML at _INT_INT64_C(c) c ## ll
+#elif defined(@KWIML at _ABI_SIZEOF___INT64)
+# define @KWIML at _INT_INT64_C(c) c ## i64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(UINT64_C) \
+  && !defined(@KWIML at _INT_BROKEN_UINT64_C)
+# define @KWIML at _INT_UINT64_C(c) UINT64_C(c)
+#elif @KWIML at _ABI_SIZEOF_LONG == 8
+# define @KWIML at _INT_UINT64_C(c) c ## ul
+#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8
+# define @KWIML at _INT_UINT64_C(c) c ## ull
+#elif defined(@KWIML at _ABI_SIZEOF___INT64)
+# define @KWIML at _INT_UINT64_C(c) c ## ui64
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if defined(@KWIML at _INT_HAVE_INTPTR_T)
+# define @KWIML at _INT_intptr_t intptr_t
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_intptr_t @KWIML at _INT_int32_t
+#elif !defined(@KWIML at _INT_NO_INT64_T)
+# define @KWIML at _INT_intptr_t @KWIML at _INT_int64_t
+#elif defined(@KWIML at _INT_NO_ERROR_INTPTR_T)
+# define @KWIML at _INT_NO_INTPTR_T
+#else
+# error "No type known for 'intptr_t'."
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T)
+# define @KWIML at _INT_uintptr_t uintptr_t
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_uintptr_t @KWIML at _INT_uint32_t
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_uintptr_t @KWIML at _INT_uint64_t
+#elif defined(@KWIML at _INT_NO_ERROR_UINTPTR_T)
+# define @KWIML at _INT_NO_UINTPTR_T
+#else
+# error "No type known for 'uintptr_t'."
+#endif
+
+#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(PRIdPTR)
+# define @KWIML at _INT_PRIdPTR PRIdPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIdPTR @KWIML at _INT_PRId32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIdPTR @KWIML at _INT_PRId64
+#endif
+#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(SCNdPTR)
+# define @KWIML at _INT_SCNdPTR SCNdPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_SCNdPTR @KWIML at _INT_SCNd32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_SCNdPTR @KWIML at _INT_SCNd64
+#endif
+#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(PRIiPTR)
+# define @KWIML at _INT_PRIiPTR PRIiPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIiPTR @KWIML at _INT_PRIi32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIiPTR @KWIML at _INT_PRIi64
+#endif
+#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(SCNiPTR)
+# define @KWIML at _INT_SCNiPTR SCNiPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_SCNiPTR @KWIML at _INT_SCNi32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_SCNiPTR @KWIML at _INT_SCNi64
+#endif
+
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIoPTR)
+# define @KWIML at _INT_PRIoPTR PRIoPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIoPTR @KWIML at _INT_PRIo32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIoPTR @KWIML at _INT_PRIo64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNoPTR)
+# define @KWIML at _INT_SCNoPTR SCNoPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_SCNoPTR @KWIML at _INT_SCNo32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_SCNoPTR @KWIML at _INT_SCNo64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIuPTR)
+# define @KWIML at _INT_PRIuPTR PRIuPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIuPTR @KWIML at _INT_PRIu32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIuPTR @KWIML at _INT_PRIu64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNuPTR)
+# define @KWIML at _INT_SCNuPTR SCNuPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_SCNuPTR @KWIML at _INT_SCNu32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_SCNuPTR @KWIML at _INT_SCNu64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIxPTR)
+# define @KWIML at _INT_PRIxPTR PRIxPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIxPTR @KWIML at _INT_PRIx32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIxPTR @KWIML at _INT_PRIx64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNxPTR)
+# define @KWIML at _INT_SCNxPTR SCNxPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_SCNxPTR @KWIML at _INT_SCNx32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_SCNxPTR @KWIML at _INT_SCNx64
+#endif
+#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIXPTR)
+# define @KWIML at _INT_PRIXPTR PRIXPTR
+#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+# define @KWIML at _INT_PRIXPTR @KWIML at _INT_PRIX32
+#elif !defined(@KWIML at _INT_NO_UINT64_T)
+# define @KWIML at _INT_PRIXPTR @KWIML at _INT_PRIX64
+#endif
+
+/*--------------------------------------------------------------------------*/
+#if !defined(@KWIML at _INT_NO_VERIFY)
+#define @KWIML at _INT__VERIFY(n, x, y) extern int (*n)[x]; extern int (*n)[y]
+#define @KWIML at _INT__VERIFY_BOOL(m, b) @KWIML at _INT__VERIFY(m##__VERIFY__, 2, (b)?2:3)
+#define @KWIML at _INT__VERIFY_TYPE(t, s) @KWIML at _INT__VERIFY(t##__VERIFY__, s, sizeof(t))
+#define @KWIML at _INT__VERIFY_SIGN(t, u, o) @KWIML at _INT__VERIFY_BOOL(t##__SIGN, (t)((u)1 << ((sizeof(t)<<3)-1)) o 0)
+
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int8_t,    1);
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint8_t,   1);
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int16_t,   2);
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint16_t,  2);
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int32_t,   4);
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint32_t,  4);
+#if !defined(@KWIML at _INT_NO_INT64_T)
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int64_t,   8);
+#endif
+#if !defined(@KWIML at _INT_NO_UINT64_T)
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint64_t,  8);
+#endif
+#if !defined(@KWIML at _INT_NO_INTPTR_T)
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_intptr_t,  sizeof(void*));
+#endif
+#if !defined(@KWIML at _INT_NO_UINTPTR_T)
+ at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uintptr_t, sizeof(void*));
+#endif
+
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int8_t,    @KWIML at _INT_uint8_t,   <);
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint8_t,   @KWIML at _INT_uint8_t,   >);
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int16_t,   @KWIML at _INT_uint16_t,  <);
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint16_t,  @KWIML at _INT_uint16_t,  >);
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int32_t,   @KWIML at _INT_uint32_t,  <);
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint32_t,  @KWIML at _INT_uint32_t,  >);
+#if !defined(@KWIML at _INT_NO_INT64_T)
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int64_t,   @KWIML at _INT_uint64_t,  <);
+#endif
+#if !defined(@KWIML at _INT_NO_UINT64_T)
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint64_t,  @KWIML at _INT_uint64_t,  >);
+#endif
+#if !defined(@KWIML at _INT_NO_INTPTR_T)
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_intptr_t,  @KWIML at _INT_uintptr_t, <);
+#endif
+#if !defined(@KWIML at _INT_NO_UINTPTR_T)
+ at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uintptr_t, @KWIML at _INT_uintptr_t, >);
+#endif
+
+#undef @KWIML at _INT__VERIFY_SIGN
+#undef @KWIML at _INT__VERIFY_TYPE
+#undef @KWIML at _INT__VERIFY_BOOL
+#undef @KWIML at _INT__VERIFY
+
+#endif
+
+#endif
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..6bdf859
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,29 @@
+KWIML - The Kitware Information Macro Library
+
+KWIML provides header files that use preprocessor tests to detect and
+provide information about the compiler and its target architecture.  The
+headers contain no configuration-time test results and thus may be
+installed into an architecture-independent include directory.  This
+makes them suitable for use in the public interface of any package.
+
+This source tree is intended for distribution inside the source trees of
+other packages.  In order to avoid name collisions among multiple
+packages the KWIML headers are configured with a per-package prefix on
+both the header locations and the macros they define.  See comments in
+CMakeLists.txt for instructions to include KWIML inside another project.
+
+The entire KWIML source tree is distributed under the OSI-approved
+3-clause BSD License.  Files used only for build and test purposes
+contain a copyright notice and reference Copyright.txt for details.
+Headers meant for installation and distribution outside the source tree
+come with full inlined copies of the copyright notice and license text.
+This makes them suitable for distribution with any package under
+compatible license terms.
+
+The following components are provided.  See header comments for details:
+
+  ABI.h = Fundamental type size and representation
+  INT.h = Fixed-size integer types and format specifiers
+
+The "test" subdirectory builds tests that verify correctness of the
+information provided by each header.
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..aaff9e9
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,51 @@
+#=============================================================================
+# Kitware Information Macro Library
+# Copyright 2010-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+set(test_defs KWIML_NAMESPACE=${KWIML})
+
+# Tell CMake how to follow dependencies of sources in this directory.
+set_property(DIRECTORY
+  PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
+  "KWIML_HEADER(%)=<${KWIML}/%>"
+  )
+
+if(KWIML_LANGUAGE_C)
+  set(test_srcs test.c)
+else()
+  set(test_srcs test.cxx)
+endif()
+if(KWIML_LANGUAGE_C)
+  list(APPEND test_defs KWIML_LANGUAGE_C)
+  list(APPEND test_srcs
+    test_ABI_C.c
+    test_INT_C.c
+    )
+endif()
+if(KWIML_LANGUAGE_CXX)
+  list(APPEND test_defs KWIML_LANGUAGE_CXX)
+  list(APPEND test_srcs
+    test_ABI_CXX.cxx
+    test_INT_CXX.cxx
+    )
+endif()
+
+foreach(th test_ABI_endian test_INT_format)
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${th}.h.in
+                 ${CMAKE_CURRENT_BINARY_DIR}/${th}.h @ONLY)
+endforeach()
+include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+add_executable(${KWIML}_test ${test_srcs})
+set_property(TARGET ${KWIML}_test PROPERTY COMPILE_DEFINITIONS ${test_defs})
+set_property(TARGET ${KWIML}_test PROPERTY
+  RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+add_test(${KWIML}.test ${CMAKE_CURRENT_BINARY_DIR}/${KWIML}_test)
+set_property(TEST ${KWIML}.test PROPERTY LABELS ${KWIML_LABELS_TEST})
diff --git a/test/test.c b/test/test.c
new file mode 100644
index 0000000..d71a284
--- /dev/null
+++ b/test/test.c
@@ -0,0 +1,35 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int test_ABI_C(void);
+extern int test_INT_C(void);
+extern int test_ABI_CXX(void);
+extern int test_INT_CXX(void);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+int main(void)
+{
+  int result = 1;
+#ifdef KWIML_LANGUAGE_C
+  result = test_ABI_C() && result;
+  result = test_INT_C() && result;
+#endif
+#ifdef KWIML_LANGUAGE_CXX
+  result = test_ABI_CXX() && result;
+  result = test_INT_CXX() && result;
+#endif
+  return result? 0 : 1;
+}
diff --git a/test/test.cxx b/test/test.cxx
new file mode 100644
index 0000000..bf61421
--- /dev/null
+++ b/test/test.cxx
@@ -0,0 +1,12 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "test.c"
diff --git a/test/test.h b/test/test.h
new file mode 100644
index 0000000..8abb195
--- /dev/null
+++ b/test/test.h
@@ -0,0 +1,35 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifndef KWIML_NAMESPACE
+# error "Do not include test.h outside of KWIML test files."
+#endif
+
+#ifndef KWIML_TEST_H
+#define KWIML_TEST_H
+
+/*
+  Define KWIML_HEADER macro to help the test files include kwiml
+  headers from the configured namespace directory.  The macro can be
+  used like this:
+
+  #include KWIML_HEADER(ABI.h)
+*/
+#define KWIML_HEADER(x) KWIML_HEADER0(KWIML_NAMESPACE/x)
+#define KWIML_HEADER0(x) KWIML_HEADER1(x)
+#define KWIML_HEADER1(x) <x>
+
+/* Quiet MS standard library deprecation warnings.  */
+#define _CRT_SECURE_NO_DEPRECATE
+
+#else
+# error "test.h included multiple times."
+#endif
diff --git a/test/test_ABI_C.c b/test/test_ABI_C.c
new file mode 100644
index 0000000..3ca4ad3
--- /dev/null
+++ b/test/test_ABI_C.c
@@ -0,0 +1,22 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "test.h"
+#include KWIML_HEADER(ABI.h)
+#include "test_ABI_endian.h"
+int test_ABI_C(void)
+{
+  if(!test_ABI_endian())
+    {
+    return 0;
+    }
+  return 1;
+}
diff --git a/test/test_ABI_CXX.cxx b/test/test_ABI_CXX.cxx
new file mode 100644
index 0000000..7ede20e
--- /dev/null
+++ b/test/test_ABI_CXX.cxx
@@ -0,0 +1,22 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "test.h"
+#include KWIML_HEADER(ABI.h)
+#include "test_ABI_endian.h"
+extern "C" int test_ABI_CXX(void)
+{
+  if(!test_ABI_endian())
+    {
+    return 0;
+    }
+  return 1;
+}
diff --git a/test/test_ABI_endian.h.in b/test/test_ABI_endian.h.in
new file mode 100644
index 0000000..992baea
--- /dev/null
+++ b/test/test_ABI_endian.h.in
@@ -0,0 +1,47 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include <stdio.h>
+
+#ifdef __cplusplus
+# define LANG "C++ "
+#else
+# define LANG "C "
+#endif
+
+static int test_ABI_endian(void)
+{
+  int result = 1;
+  {
+#if defined(@KWIML at _ABI_ENDIAN_ID)
+  int expect;
+  union { short s; unsigned char c[sizeof(short)]; } x;
+  x.s = 1;
+  expect = (x.c[0] == 1 ?
+            @KWIML at _ABI_ENDIAN_ID_LITTLE : @KWIML at _ABI_ENDIAN_ID_BIG);
+  printf(LANG "@KWIML at _ABI_ENDIAN_ID: expected [%d], got [%d]",
+         expect, @KWIML at _ABI_ENDIAN_ID);
+  if(@KWIML at _ABI_ENDIAN_ID == expect)
+    {
+    printf(", PASSED\n");
+    }
+  else
+    {
+    printf(", FAILED\n");
+    result = 0;
+    }
+#else
+  printf(LANG "@KWIML at _ABI_ENDIAN_ID: unknown, FAILED\n");
+  result = 0;
+#endif
+  }
+  return result;
+}
diff --git a/test/test_INT_C.c b/test/test_INT_C.c
new file mode 100644
index 0000000..5513a0b
--- /dev/null
+++ b/test/test_INT_C.c
@@ -0,0 +1,22 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "test.h"
+#include KWIML_HEADER(INT.h)
+#include "test_INT_format.h"
+int test_INT_C(void)
+{
+  if(!test_INT_format())
+    {
+    return 0;
+    }
+  return 1;
+}
diff --git a/test/test_INT_CXX.cxx b/test/test_INT_CXX.cxx
new file mode 100644
index 0000000..9f74e96
--- /dev/null
+++ b/test/test_INT_CXX.cxx
@@ -0,0 +1,22 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "test.h"
+#include KWIML_HEADER(INT.h)
+#include "test_INT_format.h"
+extern "C" int test_INT_CXX(void)
+{
+  if(!test_INT_format())
+    {
+    return 0;
+    }
+  return 1;
+}
diff --git a/test/test_INT_format.h.in b/test/test_INT_format.h.in
new file mode 100644
index 0000000..72a62f2
--- /dev/null
+++ b/test/test_INT_format.h.in
@@ -0,0 +1,188 @@
+/*============================================================================
+  Kitware Information Macro Library
+  Copyright 2010-2011 Kitware, Inc.
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include <stdio.h>
+#include <string.h>
+
+#ifdef __cplusplus
+# define LANG "C++ "
+#else
+# define LANG "C "
+#endif
+
+#define VALUE(T, U)                                                     \
+    (@KWIML at _INT_##T)((@KWIML at _INT_##U)0xab <<                          \
+                    ((sizeof(@KWIML at _INT_##T)-1)<<3))                   \
+
+#define TEST_C(C, V, PRI, T, U)                                         \
+  {                                                                     \
+  @KWIML at _INT_##T const x = VALUE(T, U);                                \
+  @KWIML at _INT_##T y = @KWIML at _INT_##C(V);                               \
+  printf(LANG "@KWIML at _INT_" #C ":"                                     \
+         " expression [%"@KWIML at _INT_PRI##PRI"],"                       \
+         " literal [%"@KWIML at _INT_PRI##PRI"]", x, y);                   \
+  if(x == y)                                                            \
+    {                                                                   \
+    printf(", PASSED\n");                                               \
+    }                                                                   \
+  else                                                                  \
+    {                                                                   \
+    printf(", FAILED\n");                                               \
+    result = 0;                                                         \
+    }                                                                   \
+  }
+
+#define TEST_PRI(PRI, T, U, STR)                                        \
+  {                                                                     \
+  @KWIML at _INT_##T const x = VALUE(T, U);                                \
+  char const* str = STR;                                                \
+  sprintf(buf, "%"@KWIML at _INT_PRI##PRI, x);                             \
+  printf(LANG "@KWIML at _INT_PRI" #PRI ":"                                \
+         " expected [%s], got [%s]", str, buf);                         \
+  if(strcmp(str, buf) == 0)                                             \
+    {                                                                   \
+    printf(", PASSED\n");                                               \
+    }                                                                   \
+  else                                                                  \
+    {                                                                   \
+    printf(", FAILED\n");                                               \
+    result = 0;                                                         \
+    }                                                                   \
+  }
+
+#define TEST_SCN(SCN, T, U, STR) TEST_SCN2(SCN, SCN, T, U, STR)
+#define TEST_SCN2(PRI, SCN, T, U, STR)                                  \
+  {                                                                     \
+  @KWIML at _INT_##T const x = VALUE(T, U);                                \
+  @KWIML at _INT_##T y;                                                    \
+  char const* str = STR;                                                \
+  if(sscanf(str, "%"@KWIML at _INT_SCN##SCN, &y) != 1)                     \
+    {                                                                   \
+    y = 0;                                                              \
+    }                                                                   \
+  printf(LANG "@KWIML at _INT_SCN" #SCN ":"                                \
+         " expected [%"@KWIML at _INT_PRI##PRI"],"                         \
+         " got [%"@KWIML at _INT_PRI##PRI"]", x, y);                       \
+  if(x == y)                                                            \
+    {                                                                   \
+    printf(", PASSED\n");                                               \
+    }                                                                   \
+  else                                                                  \
+    {                                                                   \
+    printf(", FAILED\n");                                               \
+    result = 0;                                                         \
+    }                                                                   \
+  }
+
+#define TEST(FMT, T, U, STR) TEST2(FMT, FMT, T, U, STR)
+#define TEST2(PRI, SCN, T, U, STR)                                       \
+  TEST_PRI(PRI, T, U, STR)                                               \
+  TEST_SCN2(PRI, SCN, T, U, STR)
+
+static int test_INT_format(void)
+{
+  int result = 1;
+  char buf[256];
+  TEST_PRI(i8, int8_t, uint8_t, "-85")
+#if defined(@KWIML at _INT_SCNi8)
+  TEST_SCN(i8, int8_t, uint8_t, "-85")
+#endif
+  TEST_PRI(d8, int8_t, uint8_t, "-85")
+#if defined(@KWIML at _INT_SCNd8)
+  TEST_SCN(d8, int8_t, uint8_t, "-85")
+#endif
+  TEST_PRI(o8, uint8_t, uint8_t, "253")
+#if defined(@KWIML at _INT_SCNo8)
+  TEST_SCN(o8, uint8_t, uint8_t, "253")
+#endif
+  TEST_PRI(u8, uint8_t, uint8_t, "171")
+#if defined(@KWIML at _INT_SCNu8)
+  TEST_SCN(u8, uint8_t, uint8_t, "171")
+#endif
+  TEST_PRI(x8, uint8_t, uint8_t, "ab")
+  TEST_PRI(X8, uint8_t, uint8_t, "AB")
+#if defined(@KWIML at _INT_SCNx8)
+  TEST_SCN(x8, uint8_t, uint8_t, "ab")
+  TEST_SCN2(X8, x8, uint8_t, uint8_t, "AB")
+#endif
+
+  TEST(i16, int16_t, uint16_t, "-21760")
+  TEST(d16, int16_t, uint16_t, "-21760")
+  TEST(o16, uint16_t, uint16_t, "125400")
+  TEST(u16, uint16_t, uint16_t, "43776")
+  TEST(x16, uint16_t, uint16_t, "ab00")
+  TEST2(X16, x16, uint16_t, uint16_t, "AB00")
+
+  TEST(i32, int32_t, uint32_t, "-1426063360")
+  TEST(d32, int32_t, uint32_t, "-1426063360")
+  TEST(o32, uint32_t, uint32_t, "25300000000")
+  TEST(u32, uint32_t, uint32_t, "2868903936")
+  TEST(x32, uint32_t, uint32_t, "ab000000")
+  TEST2(X32, x32, uint32_t, uint32_t, "AB000000")
+
+  TEST_PRI(i64, int64_t, uint64_t, "-6124895493223874560")
+#if defined(@KWIML at _INT_SCNi64)
+  TEST_SCN(i64, int64_t, uint64_t, "-6124895493223874560")
+#endif
+  TEST_PRI(d64, int64_t, uint64_t, "-6124895493223874560")
+#if defined(@KWIML at _INT_SCNd64)
+  TEST_SCN(d64, int64_t, uint64_t, "-6124895493223874560")
+#endif
+  TEST_PRI(o64, uint64_t, uint64_t, "1254000000000000000000")
+#if defined(@KWIML at _INT_SCNo64)
+  TEST_SCN(o64, uint64_t, uint64_t, "1254000000000000000000")
+#endif
+  TEST_PRI(u64, uint64_t, uint64_t, "12321848580485677056")
+#if defined(@KWIML at _INT_SCNu64)
+  TEST_SCN(u64, uint64_t, uint64_t, "12321848580485677056")
+#endif
+  TEST_PRI(x64, uint64_t, uint64_t, "ab00000000000000")
+  TEST_PRI(X64, uint64_t, uint64_t, "AB00000000000000")
+#if defined(@KWIML at _INT_SCNx64)
+  TEST_SCN(x64, uint64_t, uint64_t, "ab00000000000000")
+  TEST_SCN2(X64, x64, uint64_t, uint64_t, "AB00000000000000")
+#endif
+
+#if !defined(@KWIML at _INT_NO_INTPTR_T)
+# if @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+  TEST(iPTR, intptr_t, uint32_t, "-1426063360")
+  TEST(dPTR, intptr_t, uint32_t, "-1426063360")
+# else
+  TEST(iPTR, intptr_t, uint64_t, "-6124895493223874560")
+  TEST(dPTR, intptr_t, uint64_t, "-6124895493223874560")
+# endif
+#endif
+
+#if !defined(@KWIML at _INT_NO_UINTPTR_T)
+# if @KWIML at _ABI_SIZEOF_DATA_PTR == 4
+  TEST(oPTR, uintptr_t, uintptr_t, "25300000000")
+  TEST(uPTR, uintptr_t, uintptr_t, "2868903936")
+  TEST(xPTR, uintptr_t, uintptr_t, "ab000000")
+  TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB000000")
+# else
+  TEST(oPTR, uintptr_t, uintptr_t, "1254000000000000000000")
+  TEST(uPTR, uintptr_t, uintptr_t, "12321848580485677056")
+  TEST(xPTR, uintptr_t, uintptr_t, "ab00000000000000")
+  TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB00000000000000")
+# endif
+#endif
+
+  TEST_C(INT8_C,  -0x55, i8, int8_t, uint8_t)
+  TEST_C(UINT8_C,  0xAB, u8, uint8_t, uint8_t)
+  TEST_C(INT16_C, -0x5500, i16, int16_t, uint16_t)
+  TEST_C(UINT16_C, 0xAB00, u16, uint16_t, uint16_t)
+  TEST_C(INT32_C, -0x55000000, i32, int32_t, uint32_t)
+  TEST_C(UINT32_C, 0xAB000000, u32, uint32_t, uint32_t)
+  TEST_C(INT64_C, -0x5500000000000000, i64, int64_t, uint64_t)
+  TEST_C(UINT64_C, 0xAB00000000000000, u64, uint64_t, uint64_t)
+
+  return result;
+}

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt                            |    6 +
 Utilities/KWIML/ABI.h.in                  |  461 ++++++++++++++++++
 Utilities/KWIML/CMakeLists.txt            |   79 +++
 Utilities/KWIML/Copyright.txt             |   30 ++
 Utilities/KWIML/INT.h.in                  |  735 +++++++++++++++++++++++++++++
 Utilities/KWIML/README.txt                |   29 ++
 Utilities/KWIML/test/CMakeLists.txt       |   51 ++
 Utilities/KWIML/test/test.c               |   35 ++
 Utilities/KWIML/test/test.cxx             |   12 +
 Utilities/KWIML/test/test.h               |   35 ++
 Utilities/KWIML/test/test_ABI_C.c         |   22 +
 Utilities/KWIML/test/test_ABI_CXX.cxx     |   22 +
 Utilities/KWIML/test/test_ABI_endian.h.in |   47 ++
 Utilities/KWIML/test/test_INT_C.c         |   22 +
 Utilities/KWIML/test/test_INT_CXX.cxx     |   22 +
 Utilities/KWIML/test/test_INT_format.h.in |  188 ++++++++
 16 files changed, 1796 insertions(+), 0 deletions(-)
 create mode 100644 Utilities/KWIML/ABI.h.in
 create mode 100644 Utilities/KWIML/CMakeLists.txt
 create mode 100644 Utilities/KWIML/Copyright.txt
 create mode 100644 Utilities/KWIML/INT.h.in
 create mode 100644 Utilities/KWIML/README.txt
 create mode 100644 Utilities/KWIML/test/CMakeLists.txt
 create mode 100644 Utilities/KWIML/test/test.c
 create mode 100644 Utilities/KWIML/test/test.cxx
 create mode 100644 Utilities/KWIML/test/test.h
 create mode 100644 Utilities/KWIML/test/test_ABI_C.c
 create mode 100644 Utilities/KWIML/test/test_ABI_CXX.cxx
 create mode 100644 Utilities/KWIML/test/test_ABI_endian.h.in
 create mode 100644 Utilities/KWIML/test/test_INT_C.c
 create mode 100644 Utilities/KWIML/test/test_INT_CXX.cxx
 create mode 100644 Utilities/KWIML/test/test_INT_format.h.in


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list