summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-11-05 11:34:49 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-11-05 11:34:49 +0000
commitbffdb8281bdbb2fa6605c782e43483a0d0be1997 (patch)
treef5ba7948841cddbc60edbaa8adef31c7b847baf2
parent9bb5b9d110ad2593cc71d739d3a6f50c67db74b4 (diff)
downloadrtems-bffdb8281bdbb2fa6605c782e43483a0d0be1997.tar.bz2
2004-11-05 Ralf Corsepius <ralf_corsepiu@rtems.org>
* 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.
-rw-r--r--cpukit/ChangeLog7
-rw-r--r--cpukit/configure.ac30
-rw-r--r--cpukit/include/rtems/stdint.h46
-rw-r--r--cpukit/libcsupport/include/inttypes.h12
-rw-r--r--cpukit/libcsupport/include/stdint.h10
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 <ralf_corsepiu@rtems.org>
+
+ * 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 <ralf_corsepiu@rtems.org>
* 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 <stdint.h>, switching to <inttypes.h> on systems
+ * only having <inttypes.h> (e.g. Solaris-5.7).
+ */
+
+/*
* $Id$
*/
#ifndef __rtems_stdint_h
#define __rtems_stdint_h
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <rtems/score/cpuopts.h>
#if RTEMS_USES_STDINT_H
#include <stdint.h>
-#elif RTEMS_USES_INTTYPES_H
-#include <inttypes.h>
-
#else
-/*
- * Wild guesses on systems not providing stdint.h nor inttypes.h
- * Known to work on Cywgin-1.3
- */
-
-#include <sys/types.h>
-
-#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 <inttypes.h>
#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 <stdint.h>
#include <sys/_inttypes.h>
-#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 <sys/_stdint.h>
-#ifdef __cplusplus
-}
-#endif
-
#endif