From bffdb8281bdbb2fa6605c782e43483a0d0be1997 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 5 Nov 2004 11:34:49 +0000 Subject: 2004-11-05 Ralf Corsepius * configure.ac: Remove RTEMS_USES_INTTYPES_H. Require inttypes.h. * include/rtems/stdint.h: Remove "wild guesses", require inttypes.h. * libcsupport/include/inttypes.h: Cleanup. * libcsupport/include/stdint.h: Cleanup. --- cpukit/ChangeLog | 7 ++++++ cpukit/configure.ac | 30 ++++++++--------------- cpukit/include/rtems/stdint.h | 46 ++++++----------------------------- cpukit/libcsupport/include/inttypes.h | 12 +-------- cpukit/libcsupport/include/stdint.h | 10 -------- 5 files changed, 26 insertions(+), 79 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index cbf123e9d8..cf5e3bfebb 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2004-11-05 Ralf Corsepius + + * configure.ac: Remove RTEMS_USES_INTTYPES_H. Require inttypes.h. + * include/rtems/stdint.h: Remove "wild guesses", require inttypes.h. + * libcsupport/include/inttypes.h: Cleanup. + * libcsupport/include/stdint.h: Cleanup. + 2004-11-04 Ralf Corsepius * include/sys/_stdint.h: Various changes. diff --git a/cpukit/configure.ac b/cpukit/configure.ac index f58af2c40e..60d43de2da 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -89,22 +89,17 @@ AC_CHECK_FUNCS([bcopy bcmp]) AC_CHECK_FUNCS([isascii fileno]) ## Check if the installed toolchain has these headers -AC_CHECK_HEADER(stdint.h) -AC_CHECK_HEADER(inttypes.h) - -AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[ - RTEMS_USES_STDINT_H=yes - RTEMS_USES_INTTYPES_H=yes],[ - RTEMS_USES_STDINT_H=$ac_cv_header_stdint_h - RTEMS_USES_INTTYPES_H=$ac_cv_header_inttypes_h -]) +AC_CHECK_HEADER([stdint.h]) +AC_CHECK_HEADER([inttypes.h]) + +## if using newlib, we provide stdint.h and inttypes.h +AM_CONDITIONAL([RTEMS_PROVIDES_STDINT_H],[test x"${RTEMS_USE_NEWLIB}" = xyes]) +AM_CONDITIONAL([RTEMS_PROVIDES_INTTYPES_H],[test x"${RTEMS_USE_NEWLIB}" = xyes]) -AM_CONDITIONAL(RTEMS_PROVIDES_STDINT_H, -[test x"${RTEMS_USE_NEWLIB}" = x"yes" \ -&& test x"$ac_cv_header_stdint_h" = xno]) -AM_CONDITIONAL(RTEMS_PROVIDES_INTTYPES_H, -[test x"${RTEMS_USE_NEWLIB}" = x"yes" \ -&& test x"$ac_cv_header_inttypes_h" = xno]) +## if using newlib, force using stdint.h +AS_IF([test x"${RTEMS_USE_NEWLIB}" = xyes], +[RTEMS_USES_STDINT_H=yes], +[RTEMS_USES_STDINT_H=$ac_cv_header_stdint_h]) AS_IF([test x"${RTEMS_CPU}" = x"unix"],[ ## FIXME: This check is doubtful @@ -181,11 +176,6 @@ RTEMS_CPUOPT([RTEMS_USES_STDINT_H], [1], [if RTEMS uses stdint.h]) -RTEMS_CPUOPT([RTEMS_USES_INTTYPES_H], - [test x"${RTEMS_USES_INTTYPES_H}" = x"yes"], - [1], - [if RTEMS uses inttypes.h]) - RTEMS_CPUOPT([RTEMS_VERSION], [true], ["]_RTEMS_VERSION["], diff --git a/cpukit/include/rtems/stdint.h b/cpukit/include/rtems/stdint.h index 5703f4273f..3abdcc4109 100644 --- a/cpukit/include/rtems/stdint.h +++ b/cpukit/include/rtems/stdint.h @@ -1,54 +1,24 @@ -/* - * rtems/stdint.h - * - * ISO C99 integer types +/** + * @file rtems/stdint.h * + * Wrapper to , switching to on systems + * only having (e.g. Solaris-5.7). + */ + +/* * $Id$ */ #ifndef __rtems_stdint_h #define __rtems_stdint_h -#ifdef __cplusplus -extern "C" { -#endif - #include #if RTEMS_USES_STDINT_H #include -#elif RTEMS_USES_INTTYPES_H -#include - #else -/* - * Wild guesses on systems not providing stdint.h nor inttypes.h - * Known to work on Cywgin-1.3 - */ - -#include - -#if !defined(uint8_t) && defined(__uint8_t) -typedef __uint8_t uint8_t; -#endif - -#if !defined(uint16_t) && defined(__uint16_t) -typedef __uint16_t uint16_t; -#endif - -#if !defined(uint32_t) && defined(__uint32_t) -typedef __uint32_t uint32_t; -#endif - -#if !defined(uint64_t) && defined(__uint64_t) -typedef __uint64_t uint64_t; -#endif - -#endif - -#ifdef __cplusplus -} +#include #endif #endif diff --git a/cpukit/libcsupport/include/inttypes.h b/cpukit/libcsupport/include/inttypes.h index 376a93f379..73f9716718 100644 --- a/cpukit/libcsupport/include/inttypes.h +++ b/cpukit/libcsupport/include/inttypes.h @@ -1,25 +1,15 @@ /** * @file inttypes.h */ - + /* - * ISO C99 Format conversion of integer types. - * * $Id$ */ #ifndef __INTTYPES_H #define __INTTYPES_H -#ifdef __cplusplus -extern "C" { -#endif - #include #include -#ifdef __cplusplus -} -#endif - #endif diff --git a/cpukit/libcsupport/include/stdint.h b/cpukit/libcsupport/include/stdint.h index 34cc7032fe..52455a79fe 100644 --- a/cpukit/libcsupport/include/stdint.h +++ b/cpukit/libcsupport/include/stdint.h @@ -3,22 +3,12 @@ */ /* - * ISO C99 integer types - * * $Id$ */ #ifndef __STDINT_H #define __STDINT_H -#ifdef __cplusplus -extern "C" { -#endif - #include -#ifdef __cplusplus -} -#endif - #endif -- cgit v1.2.3