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.
This commit is contained in:
Ralf Corsepius
2004-11-05 11:34:49 +00:00
parent 9bb5b9d110
commit bffdb8281b
5 changed files with 25 additions and 78 deletions

View File

@@ -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.

View File

@@ -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)
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
])
## 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["],

View File

@@ -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

View File

@@ -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

View File

@@ -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