Commit Graph

21 Commits

Author SHA1 Message Date
Riku Voipio 349165223d KWIML: Teach ABI.h about Aarch64
The __aarch64__ defines Aarch64, while __AARCH64EB__ defines bigendian
and __AARCH64EL__ little endian.  Only little endian tested, no big
endian toolchain exists yet.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-12-21 08:27:29 -05:00
Thomas Klausner 415623581d KWIML: Teach ABI.h that VAX is big endian 2012-10-25 07:53:32 -04:00
Brad King ec1d352485 KWIML: Teach INT about broken UINT32_C on old HP
Old HP inttypes.h defines UINT32_C as:

 #define __CONCAT__(_A,_B) _A ## _B
 #define __CONCAT_U__(_A) _A ## u
 #define UINT32_C(__c) __CONCAT__(__CONCAT_U__(__c),l)

The __CONCAT__ macro does not delay concatenation for an extra level so
standard preprocessor implementations like GNU complain that they cannot
concatenate the ")" and "l".
2012-06-21 08:04:16 -04:00
Brad King 64d0e15627 KWIML: Teach INT.h that no HP platform implements SCN*8 formats
The "hh" class of scan formats is not implemented by the HP runtime.
2012-06-21 08:04:16 -04:00
Brad King 6dc053114b KWIML: Teach ABI.h about 'long long' and 'char' on old HP
The "HP92453-01 A.11.01.20 HP C Compiler" does not define any
identifying macros except for platform __hpux.  If we see that platform
with no other compiler identification then assume this compiler.  It has
'long long' and its 'char' is signed unless the +uc option is added.
2012-06-21 08:03:47 -04:00
Brad King 539064d4f7 KWIML: Generalize interface to report broken integer literal macros
The <inttypes.h> header on some platforms define the integer literal
macros incorrectly for some of the integer types.  Generalize the
documented interface reporting broken U/INT64_C to all integer sizes.
2012-06-20 08:17:05 -04:00
Brad King 6240f853a3 KWIML: Report broken integer format macros on AIX 4.3
The <inttypes.h> on this platform defines the macros incorrectly, as in

 #define PRId32 %d

instead of

 #define PRId32 "d"
2012-06-07 15:19:20 -04:00
Brad King e1b0fc9c9a KWIML: Add interface to report broken integer format macros
The <inttypes.h> header on some platforms define the integer format
macros incorrectly for some of the integer types.  Document macros that
we can define to report such platforms to the includer.  Check these
reports before trusting the system-defined macros.
2012-06-07 14:20:14 -04:00
Brad King 10272e6403 KWIML: Avoid conflict with C++11 user-defined literals
Clang warns

 test/test_INT_format.h:28:26: warning: identifier after literal will
 be treated as a reserved user-defined literal suffix in C++11
 [-Wc++11-compat-reserved-user-defined-literal]
  " expression [%"KWIML_INT_PRI##PRI"],"

because the KWIML_... part is an identifier lexically immediately
following a string literal.  Add a space between the string literal
and the identifier to avoid the C++11 user-defined literal syntax.
2012-03-20 15:49:49 -04:00
Brad King f94ae0ecda KWIML: Make test_INT robust to #define-d int#_t and INT#_C
Our TEST* macro calls pass arguments such as "int64_t" with the
expectation that the preprocessing token will be used literally.
Some platforms #define int64_t as "long long" which is not a valid
preprocessing token.  Perform preprocessor symbol concatenation
on the type names at the first level of macro evaluation to avoid
expanding the names.
2012-03-09 15:26:26 -05:00
Modestas Vainius aabf65a073 KWIML: Teach ABI.h that MIPS is biendian
MIPS machines are biendian hence they can run both big endian kernels
e.g. Debian mips architecture, and little endian kernels e.g. Debian
mipsel architecture.  Use predefined macros to distinguish them.
2012-02-20 09:43:36 -05:00
Brad King b421c2477c KWIML: Avoid MSVC linker warning about not using C++ runtime
Teach KWIML_test to use part of the C++ runtime library.  Otherwise the
linker complains:

  warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF
2011-11-21 11:02:26 -05:00
Brad King ae7cf91b13 KWIML: Teach ABI.h about PGI compiler
The PGI compiler appears to define "long long" as size 8 but does not
provide a feature macro for it.  It does provide options for the
signedness of char (-Mschar, -Muchar) but does not define a feature
macro indicating the choice.  The default is signed, at least on Linux.
2011-11-18 13:46:22 -05:00
Brad King 9ccd639ad7 KWIML: Ignore _LONGLONG on MS compiler
The VS 7.0 header <yvals.h> included by most C++ system headers defines
the macro _LONGLONG as __int64.  Teach ABI.h to ignore the definition in
this case because "long long" does not exist.
2011-11-17 10:15:02 -05:00
Brad King 8be93fc487 KWIML: Test header inclusion after system headers
Some system headers may define macros that interfere with preprocessor
tests in KWIML headers.  Test this case to be sure that the verification
checks at the bottom of the headers do not fail.
2011-11-17 08:57:26 -05:00
Brad King a8f6159f69 KWIML: Create test output dir for Xcode
Xcode 2.x forgets to create the target output directory before linking
the individual architecture pieces of a universal binary for the target
KWIML_test.  Then it passes the directory to -L and -F options when
linking the and warns that the directory does not exist.  We work around
the problem by using a pre-build rule on the target to create the output
directory.
2011-11-14 07:54:10 -05:00
Brad King 33fff24aca KWIML: No INT_SCN*8 on Intel for Windows
Intel C/C++ for Windows does not support the SCN*8 format (%hh*).
The MS runtime does not support it.
2011-11-13 15:06:12 -05:00
Brad King bcc06d498c KWIML: No INT_SCN*8 on SunPro compiler
The Sun compiler does not document support for SCN*8 format (%hh*).
It works only on platforms that happen to provide a runtime library
that supports the format.
2011-11-12 10:10:07 -05:00
Brad King 6d12ab3f89 KWIML: Suppress printf/scanf format warnings in test
KWIML defines format string macros matching the fixed-sized types.  This
test checks that they behave as expected and that the arguments match
the *sizes* expected by the format strings.
2011-11-12 09:39:40 -05:00
Brad King 553acec76b KWIML: Avoid redefining _CRT_SECURE_NO_DEPRECATE in test.h
If the including project defines this macro do not re-define it
in the test header.
2011-11-12 08:00:13 -05:00
Brad King 831badeca2 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.
2011-06-27 14:04:32 -04:00