Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include Clang expects __INTx_TYPE__ to be used ...
details: https://anonhg.NetBSD.org/src/rev/1bf15ce3bb60
branches: trunk
changeset: 330543:1bf15ce3bb60
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Jul 13 16:31:20 2014 +0000
description:
Clang expects __INTx_TYPE__ to be used with signed/unsigned modifier
when defining (u)intx_t, GCC has a separate __UINTx_TYPE__. Newer Clang
will also provide the latter, but expects the behavior of the former to
remain. As ARM uses unsigned char by default, distinguish between Clang
and non-Clang here to the right type for int8_t.
diffstat:
sys/arch/arm/include/int_types.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 1812c54b80b4 -r 1bf15ce3bb60 sys/arch/arm/include/int_types.h
--- a/sys/arch/arm/include/int_types.h Sun Jul 13 16:23:55 2014 +0000
+++ b/sys/arch/arm/include/int_types.h Sun Jul 13 16:31:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: int_types.h,v 1.14 2014/02/24 16:57:57 christos Exp $ */
+/* $NetBSD: int_types.h,v 1.15 2014/07/13 16:31:20 joerg Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -68,7 +68,11 @@
# define __UINT64_TYPE__ unsigned __INT64_TYPE__
#endif
+#ifdef __clang__
+typedef signed __INT8_TYPE__ __int8_t;
+#else
typedef __INT8_TYPE__ __int8_t;
+#endif
typedef __UINT8_TYPE__ __uint8_t;
typedef __INT16_TYPE__ __int16_t;
typedef __UINT16_TYPE__ __uint16_t;
Home |
Main Index |
Thread Index |
Old Index