Module Name:    src
Committed By:   joerg
Date:           Sun Jul 13 16:31:20 UTC 2014

Modified Files:
        src/sys/arch/arm/include: int_types.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/int_types.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/include/int_types.h
diff -u src/sys/arch/arm/include/int_types.h:1.14 src/sys/arch/arm/include/int_types.h:1.15
--- src/sys/arch/arm/include/int_types.h:1.14	Mon Feb 24 16:57:57 2014
+++ src/sys/arch/arm/include/int_types.h	Sun Jul 13 16:31:20 2014
@@ -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;

Reply via email to