Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-10-03 21:02:48 +0400
committerJeff Johnston <jjohnstn@redhat.com>2005-10-03 21:02:48 +0400
commit14491fd0e0714d98351f632dbd64d6b6b6e428dd (patch)
tree6d7a5f0dc66f6eab4708ea123752cd2af84a3b70
parentb94d50c035e3a1633e47c56312a52ba4e408f199 (diff)
2005-10-03 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/stdint.h: Use __INTMAX_TYPE__ to derive intmax_t. Use __UINTMAX_TYPE__ to derive uintmax_t. Fix minor typo.
-rw-r--r--newlib/ChangeLog7
-rw-r--r--newlib/libc/include/stdint.h23
2 files changed, 24 insertions, 6 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 0ed1b83c5..e6eafdb64 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-03 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h:
+ Use __INTMAX_TYPE__ to derive intmax_t.
+ Use __UINTMAX_TYPE__ to derive uintmax_t.
+ Fix minor typo.
+
2005-09-27 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly
diff --git a/newlib/libc/include/stdint.h b/newlib/libc/include/stdint.h
index f9e8d837f..a95c149a2 100644
--- a/newlib/libc/include/stdint.h
+++ b/newlib/libc/include/stdint.h
@@ -148,16 +148,27 @@ typedef uint64_t uint_least32_t;
#endif
#endif
-#if __have_longlong64
-typedef signed long long intmax_t;
-typedef unsigned long long uintmax_t;
+/* Greatest-width integer types */
+/* Modern GCCs provide __INTMAX_TYPE__ */
+#if defined(__INTMAX_TYPE__)
+ typedef __INTMAX_TYPE__ intmax_t;
+#elif __have_longlong64
+ typedef signed long long intmax_t;
#else
-typedef signed long intmax_t;
-typedef unsigned long uintmax_t;
+ typedef signed long intmax_t;
#endif
+/* Modern GCCs provide __UINTMAX_TYPE__ */
+#if defined(__UINTMAX_TYPE__)
+ typedef __UINTMAX_TYPE__ uintmax_t;
+#elif __have_longlong64
+ typedef unsigned long long uintmax_t;
+ #else
+ typedef unsigned long uintmax_t;
+ #endif
+
/*
- * GCC doesn't provide an propriate macro for [u]intptr_t
+ * GCC doesn't provide an appropriate macro for [u]intptr_t
* For now, use __PTRDIFF_TYPE__
*/
#if defined(__PTRDIFF_TYPE__)