summaryrefslogtreecommitdiff
path: root/buildlib
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:55:00 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:55:00 +0000
commit021988eaf4dd67c73dbbb26302e8466836fc7566 (patch)
treeb58df989691dae7af0bf922cbb0cf4247f598b66 /buildlib
parent1b6d659c38ff5fd44aa4bc22f28cfeae43e8f8f5 (diff)
C9x types
Author: jgg Date: 1999-10-25 03:36:41 GMT C9x types
Diffstat (limited to 'buildlib')
-rw-r--r--buildlib/config.h.in34
-rw-r--r--buildlib/inttypes.h.in43
2 files changed, 43 insertions, 34 deletions
diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index 2c98a11ac..f882ca25d 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -35,37 +35,3 @@
/* The package name string */
#undef PACKAGE
-/* Generate the fixed bit size types */
-#if SIZEOF_INT == 4
-# define INT32 int
-# define UINT32 unsigned int
-#else
-# if SIZEOF_LONG == 4
-# define INT32 long
-# define UINT32 unsigned long
-# else
-# if SIZEOF_SHORT == 4
-# define INT32 short
-# define UINT32 unsigned short
-# else
-# error Must have a form of 32-bit integer
-# endif
-# endif
-#endif
-
-#if SIZEOF_INT == 2
-# define INT16 int
-# define UINT16 unsigned int
-#else
-# if SIZEOF_LONG == 2
-# define INT16 long
-# define UINT16 unsigned long
-# else
-# if SIZEOF_SHORT == 2
-# define INT16 short
-# define UINT16 short
-# else
-# error Must have a form of 16-bit integer
-# endif
-# endif
-#endif
diff --git a/buildlib/inttypes.h.in b/buildlib/inttypes.h.in
new file mode 100644
index 000000000..3be720794
--- /dev/null
+++ b/buildlib/inttypes.h.in
@@ -0,0 +1,43 @@
+/* This is an ISO C 9X header file. We omit this copy to the include
+ directory if the local platform does not have inttypes.h, it contains
+ [u]int[8,16,32]_t fixed width types */
+
+#include <config.h>
+
+/* Generate the fixed bit size types */
+#if SIZEOF_INT == 4
+ typedef int int32_t;
+ typedef unsigned int uint32_t;
+#else
+# if SIZEOF_LONG == 4
+ typedef long int32_t;
+ typedef unsigned long uint32_t;
+# else
+# if SIZEOF_SHORT == 4
+ typedef short int32_t;
+ typedef unsigned short uint32_t;
+# else
+# error Must have a form of 32-bit integer
+# endif
+# endif
+#endif
+
+#if SIZEOF_INT == 2
+ typedef int int16_t;
+ typedef unsigned int uint16_t;
+#else
+# if SIZEOF_LONG == 2
+ typedef long int16_t;
+ typedef unsigned long uint16_t;
+# else
+# if SIZEOF_SHORT == 2
+ typedef short int16_t;
+ typedef unsigned short uint16_t;
+# else
+# error Must have a form of 16-bit integer
+# endif
+# endif
+#endif
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;