summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-11-04 21:48:12 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-11-04 21:48:12 +0000
commit07a984b1ada22813e3bac131711a9c2cf89611bd (patch)
treeff13bc96b803614598d4fb4d9f45443b24841328 /cpukit
parent2004-11-03 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-07a984b1ada22813e3bac131711a9c2cf89611bd.tar.bz2
2004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org>
* include/sys/_stdint.h: Various changes. Add *leastN_t types. Add INTN_{MIN|MAX} macros. Add doxygen preamble. * include/sys/_inttypes.h: Add doxygen preamble. Reflect changes above. * libcsupport/include/stdint.h: Add doxygen preamble. * libcsupport/include/inttypes.h: Add doxygen preamble. * configure.ac: Add doxygen preamble to cpuopts.h.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog11
-rw-r--r--cpukit/configure.ac3
-rw-r--r--cpukit/libcsupport/include/inttypes.h6
-rw-r--r--cpukit/libcsupport/include/stdint.h6
-rw-r--r--cpukit/libcsupport/include/sys/_inttypes.h8
-rw-r--r--cpukit/libcsupport/include/sys/_stdint.h153
6 files changed, 163 insertions, 24 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index b2b1c96e62..cbf123e9d8 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,14 @@
+2004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org>
+
+ * include/sys/_stdint.h: Various changes.
+ Add *leastN_t types. Add INTN_{MIN|MAX} macros.
+ Add doxygen preamble.
+ * include/sys/_inttypes.h: Add doxygen preamble.
+ Reflect changes above.
+ * libcsupport/include/stdint.h: Add doxygen preamble.
+ * libcsupport/include/inttypes.h: Add doxygen preamble.
+ * configure.ac: Add doxygen preamble to cpuopts.h.
+
2004-11-02 Joel Sherrill <joel@OARcorp.com>
* posix/src/mqueueunlink.c, posix/src/semunlink.c,
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index fef551717d..f58af2c40e 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -127,6 +127,9 @@ typedef struct {
])
cat >>cpuopts.tmp <<\_ACEOF
+/**
+ * @file rtems/score/cpuopts.h
+ */
/* target cpu dependent options file */
/* automatically generated -- DO NOT EDIT!! */
#ifndef __CPU_OPTIONS_h
diff --git a/cpukit/libcsupport/include/inttypes.h b/cpukit/libcsupport/include/inttypes.h
index 87e1798f17..376a93f379 100644
--- a/cpukit/libcsupport/include/inttypes.h
+++ b/cpukit/libcsupport/include/inttypes.h
@@ -1,6 +1,8 @@
+/**
+ * @file inttypes.h
+ */
+
/*
- * inttypes.h
- *
* ISO C99 Format conversion of integer types.
*
* $Id$
diff --git a/cpukit/libcsupport/include/stdint.h b/cpukit/libcsupport/include/stdint.h
index 1277aae4be..34cc7032fe 100644
--- a/cpukit/libcsupport/include/stdint.h
+++ b/cpukit/libcsupport/include/stdint.h
@@ -1,6 +1,8 @@
+/**
+ * @file stdint.h
+ */
+
/*
- * stdint.h
- *
* ISO C99 integer types
*
* $Id$
diff --git a/cpukit/libcsupport/include/sys/_inttypes.h b/cpukit/libcsupport/include/sys/_inttypes.h
index 8e2bac8a66..6f14db3cfe 100644
--- a/cpukit/libcsupport/include/sys/_inttypes.h
+++ b/cpukit/libcsupport/include/sys/_inttypes.h
@@ -1,3 +1,7 @@
+/**
+ * @file sys/_inttypes.h
+ */
+
/*
* COPYRIGHT (c) 2004.
* Ralf Corsepius, Ulm/Germany.
@@ -184,7 +188,7 @@
#define SCNu64 __SCN64(u)
#define SCNx64 __SCN64(x)
-
+#if __int64_t_defined
#define PRIdLEAST64 __PRI64(d)
#define PRIiLEAST64 __PRI64(i)
#define PRIoLEAST64 __PRI64(o)
@@ -211,7 +215,7 @@
#define SCNoFAST64 __SCN64(o)
#define SCNuFAST64 __SCN64(u)
#define SCNxFAST64 __SCN64(x)
-
+#endif
/* max-bit types */
#if defined(__rtems_longlong64)
diff --git a/cpukit/libcsupport/include/sys/_stdint.h b/cpukit/libcsupport/include/sys/_stdint.h
index a960fe15eb..901e135989 100644
--- a/cpukit/libcsupport/include/sys/_stdint.h
+++ b/cpukit/libcsupport/include/sys/_stdint.h
@@ -1,3 +1,7 @@
+/**
+ * @file sys/_stdint.h
+ */
+
/*
* COPYRIGHT (c) 2004.
* Ralf Corsepius, Ulm/Germany.
@@ -27,60 +31,117 @@ extern "C" {
#if __EXP(SCHAR_MAX) == 0x7f
typedef signed char int8_t ;
typedef unsigned char uint8_t ;
-#define int8_t_defined 1
+#define __int8_t_defined 1
+#endif
+#if __int8_t_defined
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
-#define int_least8_t_defined 1
+#define __int_least8_t_defined 1
#endif
-#if __EXP(INT_MAX) == 0x7fff
-typedef signed int int16_t;
-typedef unsigned int uint16_t;
-#define int16_t_defined 1
-#elif __EXP(SHRT_MAX) == 0x7fff
+#if __EXP(SHRT_MAX) == 0x7fff
typedef signed short int16_t;
typedef unsigned short uint16_t;
-#define int16_t_defined 1
+#define __int16_t_defined 1
+#elif __EXP(INT_MAX) == 0x7fff
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+#define __int16_t_defined 1
#elif __EXP(SCHAR_MAX) == 0x7fff
-typedef signed char int32_t;
-typedef unsigned char uint32_t;
-#define int16_t_defined 1
+typedef signed char int16_t;
+typedef unsigned char uint16_t;
+#define __int16_t_defined 1
+#endif
+
+#if __int16_t_defined
+typedef int16_t int_least16_t;
+typedef uint16_t uint_least16_t;
+#define __int_least16_t_defined 1
+
+#ifndef __int_least8_t_defined
+typedef int16_t int_least8_t;
+typedef uint16_t uint_least8_t;
+#define __int_least8_t_defined 1
+#endif
#endif
#if __EXP(INT_MAX) == 0x7fffffffL
typedef signed int int32_t;
typedef unsigned int uint32_t;
-#define int32_t_defined 1
+#define __int32_t_defined 1
#elif __EXP(LONG_MAX) == 0x7fffffffL
typedef signed long int32_t;
typedef unsigned long uint32_t;
-#define int32_t_defined 1
+#define __int32_t_defined 1
#define __rtems_long32 1
#elif __EXP(SHRT_MAX) == 0x7fffffffL
typedef signed short int32_t;
typedef unsigned short uint32_t;
-#define int32_t_defined 1
+#define __int32_t_defined 1
#elif __EXP(SCHAR_MAX) == 0x7fffffffL
typedef signed char int32_t;
typedef unsigned char uint32_t;
-#define int32_t_defined 1
+#define INT32_C(x) x
+#define __int32_t_defined 1
+#endif
+
+#if __int32_t_defined
+typedef int32_t int_least32_t;
+typedef uint32_t uint_least32_t;
+#define __int_least32_t_defined 1
+
+#ifndef __int_least8_t_defined
+typedef int32_t int_least8_t;
+typedef uint32_t uint_least8_t;
+#define __int_least8_t_defined 1
+#endif
+
+#ifndef __int_least16_t_defined
+typedef int32_t int_least16_t;
+typedef uint32_t uint_least16_t;
+#define __int_least16_t_defined 1
+#endif
#endif
#if __EXP(LONG_MAX) > 0x7fffffff
typedef signed long int64_t;
typedef unsigned long uint64_t;
-#define int64_t_defined 1
+#define __int64_t_defined 1
#define __rtems_long64 1
#elif __EXP(LONG_LONG_MAX) > 0x7fffffff
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
-#define int64_t_defined 1
+#define __int64_t_defined 1
#define __rtems_longlong64 1
#elif __EXP(INT_MAX) > 0x7fffffff
typedef signed int int64_t;
typedef unsigned int uint64_t;
-#define int64_t_defined 1
+#define __int64_t_defined 1
+#endif
+
+#if __int64_t_defined
+typedef int64_t int_least64_t;
+typedef uint64_t uint_least64_t;
+#define __int_least64_t_defined 1
+
+#ifndef __int_least8_t_defined
+typedef int64_t int_least8_t;
+typedef uint64_t uint_least8_t;
+#define __int_least8_t_defined 1
+#endif
+
+#ifndef __int_least16_t_defined
+typedef int64_t int_least16_t;
+typedef uint64_t uint_least16_t;
+#define __int_least16_t_defined 1
+#endif
+
+#ifndef __int_least32_t_defined
+typedef int64_t int_least32_t;
+typedef uint64_t uint_least32_t;
+#define __int_least32_t_defined 1
+#endif
#endif
#if __rtems_longlong64
@@ -94,6 +155,62 @@ typedef unsigned long uintmax_t;
typedef signed long intptr_t;
typedef unsigned long uintptr_t;
+/* Limits of Specified-Width Integer Types */
+
+#if __int8_t_defined
+#define INT8_MIN -128
+#define INT8_MAX 127
+#define UINT8_MAX 255
+#endif
+
+#if __int_least8_t_defined
+#define INTLEAST8_MIN -128
+#define INTLEAST8_MAX 127
+#define UINTLEAST8_MAX 255
+#else
+#error required type int_least8_t missing
+#endif
+
+#if __int16_t_defined
+#define INT16_MIN -32768
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+#endif
+
+#if __int_least16_t_defined
+#define INTLEAST16_MIN -32768
+#define INTLEAST16_MAX 32767
+#define UINTLEAST16_MAX 65535
+#else
+#error required type int_least16_t missing
+#endif
+
+#if __int32_t_defined
+#define INT32_MIN -2147483648
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295
+#endif
+
+#if __int_least32_t_defined
+#define INTLEAST32_MIN -2147483648
+#define INTLEAST32_MAX 2147483647
+#define UINTLEAST32_MAX 4294967295
+#else
+#error required type int_least32_t missing
+#endif
+
+#if __int64_t_defined
+#define INT64_MIN -9223372036854775808
+#define INT64_MAX 9223372036854775807
+#define UINT64_MAX 18446744073709551615
+#endif
+
+#if __int_least64_t_defined
+#define INTLEAST64_MIN -9223372036854775808
+#define INTLEAST64_MAX 9223372036854775807
+#define UINTLEAST64_MAX 18446744073709551615
+#endif
+
#undef __EXP
#ifdef __cplusplus