aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog8
-rw-r--r--newlib/libc/include/inttypes.h24
-rw-r--r--newlib/libc/include/stdint.h16
3 files changed, 28 insertions, 20 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 742d8be..888553f 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,11 @@
+2009-01-19 Neal H. Walfield <neal@gnu.org>
+
+ * libc/include/stdint.h (INT64_C, UINT64_C, INTMAX_C, UINTMAX_C)
+ [__have_long64 && __have_longlong64]: Use L and UL, not LL and ULL.
+ * libc/include/inttypes.h (__PRI64, __SCN64, __PRIMAX, __SCNMAX,
+ __PRIPTR, __SCNPTR) [__have_long64 && __have_longlong64]: Use l,
+ not ll.
+
2009-01-12 Nathan Froyd <froydnj@codesourcery.com>
* libc/machine/powerpc/vfscanf.c (__sccl): Remove declaration.
diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 0bcbd31..02bef1a 100644
--- a/newlib/libc/include/inttypes.h
+++ b/newlib/libc/include/inttypes.h
@@ -163,12 +163,12 @@
/* 64-bit types */
-#if __have_longlong64
-#define __PRI64(x) __STRINGIFY(ll##x)
-#define __SCN64(x) __STRINGIFY(ll##x)
-#elif __have_long64
+#if __have_long64
#define __PRI64(x) __STRINGIFY(l##x)
#define __SCN64(x) __STRINGIFY(l##x)
+#elif __have_longlong64
+#define __PRI64(x) __STRINGIFY(ll##x)
+#define __SCN64(x) __STRINGIFY(ll##x)
#else
#define __PRI64(x) __STRINGIFY(x)
#define __SCN64(x) __STRINGIFY(x)
@@ -217,12 +217,12 @@
#endif
/* max-bit types */
-#if __have_longlong64
-#define __PRIMAX(x) __STRINGIFY(ll##x)
-#define __SCNMAX(x) __STRINGIFY(ll##x)
-#elif __have_long64
+#if __have_long64
#define __PRIMAX(x) __STRINGIFY(l##x)
#define __SCNMAX(x) __STRINGIFY(l##x)
+#elif __have_longlong64
+#define __PRIMAX(x) __STRINGIFY(ll##x)
+#define __SCNMAX(x) __STRINGIFY(ll##x)
#else
#define __PRIMAX(x) __STRINGIFY(x)
#define __SCNMAX(x) __STRINGIFY(x)
@@ -242,12 +242,12 @@
#define SCNxMAX __SCNMAX(x)
/* ptr types */
-#if __have_longlong64
-#define __PRIPTR(x) __STRINGIFY(ll##x)
-#define __SCNPTR(x) __STRINGIFY(ll##x)
-#elif __have_long64
+#if __have_long64
#define __PRIPTR(x) __STRINGIFY(l##x)
#define __SCNPTR(x) __STRINGIFY(l##x)
+#elif __have_longlong64
+#define __PRIPTR(x) __STRINGIFY(ll##x)
+#define __SCNPTR(x) __STRINGIFY(ll##x)
#else
#define __PRIPTR(x) __STRINGIFY(x)
#define __SCNPTR(x) __STRINGIFY(x)
diff --git a/newlib/libc/include/stdint.h b/newlib/libc/include/stdint.h
index 671400b..d47b222 100644
--- a/newlib/libc/include/stdint.h
+++ b/newlib/libc/include/stdint.h
@@ -457,22 +457,22 @@ typedef unsigned long uintptr_t;
#endif
#if __int64_t_defined
-#if __have_longlong64
-#define INT64_C(x) x##LL
-#define UINT64_C(x) x##ULL
-#else
+#if __have_long64
#define INT64_C(x) x##L
#define UINT64_C(x) x##UL
+#else
+#define INT64_C(x) x##LL
+#define UINT64_C(x) x##ULL
#endif
#endif
/** Macros for greatest-width integer constant expression */
-#if __have_longlong64
-#define INTMAX_C(x) x##LL
-#define UINTMAX_C(x) x##ULL
-#else
+#if __have_long64
#define INTMAX_C(x) x##L
#define UINTMAX_C(x) x##UL
+#else
+#define INTMAX_C(x) x##LL
+#define UINTMAX_C(x) x##ULL
#endif