Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add generic versions of machine/int_*.h for compilers providing



details:   https://anonhg.NetBSD.org/src/rev/d60763cb5b16
branches:  trunk
changeset: 330965:d60763cb5b16
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Jul 25 21:43:13 2014 +0000

description:
Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.

diffstat:

 distrib/sets/lists/comp/mi             |    7 +-
 sys/arch/amd64/include/int_const.h     |    8 +-
 sys/arch/amd64/include/int_fmtio.h     |    8 +-
 sys/arch/amd64/include/int_limits.h    |    8 +-
 sys/arch/amd64/include/int_mwgwtypes.h |    8 +-
 sys/arch/amd64/include/int_types.h     |    8 +-
 sys/arch/arm/include/int_const.h       |    6 +-
 sys/arch/arm/include/int_fmtio.h       |    7 +-
 sys/arch/arm/include/int_limits.h      |    6 +-
 sys/arch/arm/include/int_mwgwtypes.h   |    6 +-
 sys/arch/arm/include/int_types.h       |    6 +-
 sys/arch/i386/include/int_const.h      |    8 +-
 sys/arch/i386/include/int_fmtio.h      |    8 +-
 sys/arch/i386/include/int_limits.h     |    8 +-
 sys/arch/i386/include/int_mwgwtypes.h  |    8 +-
 sys/arch/i386/include/int_types.h      |    8 +-
 sys/sys/Makefile                       |    7 +-
 sys/sys/common_int_const.h             |   62 ++++++++
 sys/sys/common_int_fmtio.h             |  230 +++++++++++++++++++++++++++++++++
 sys/sys/common_int_limits.h            |  130 ++++++++++++++++++
 sys/sys/common_int_mwgwtypes.h         |   69 +++++++++
 sys/sys/common_int_types.h             |   61 ++++++++
 22 files changed, 658 insertions(+), 19 deletions(-)

diffs (truncated from 1020 to 300 lines):

diff -r 6deba9c71ba7 -r d60763cb5b16 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Fri Jul 25 21:38:52 2014 +0000
+++ b/distrib/sets/lists/comp/mi        Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.1903 2014/07/25 08:32:22 dholland Exp $
+#      $NetBSD: mi,v 1.1904 2014/07/25 21:43:13 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3129,6 +3129,11 @@
 ./usr/include/sys/chio.h                       comp-c-include
 ./usr/include/sys/clist.h                      comp-obsolete           obsolete
 ./usr/include/sys/clockctl.h                   comp-c-include
+./usr/include/sys/common_int_const.h           comp-c-include
+./usr/include/sys/common_int_fmtio.h           comp-c-include
+./usr/include/sys/common_int_limits.h          comp-c-include
+./usr/include/sys/common_int_mwgwtypes.h       comp-c-include
+./usr/include/sys/common_int_types.h           comp-c-include
 ./usr/include/sys/condvar.h                    comp-c-include
 ./usr/include/sys/conf.h                       comp-c-include
 ./usr/include/sys/core.h                       comp-c-include
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/amd64/include/int_const.h
--- a/sys/arch/amd64/include/int_const.h        Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/amd64/include/int_const.h        Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_const.h,v 1.4 2010/05/29 17:33:57 tnozaki Exp $    */
+/*     $NetBSD: int_const.h,v 1.5 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _AMD64_INT_CONST_H_
 #define _AMD64_INT_CONST_H_
 
+#ifdef __INTMAX_C_SUFFIX__
+#include <sys/common_int_const.h>
+#else
+
 #ifdef __x86_64__
 
 /*
@@ -61,4 +65,6 @@
 
 #endif /*      __x86_64__      */
 
+#endif
+
 #endif /* !_AMD64_INT_CONST_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/amd64/include/int_fmtio.h
--- a/sys/arch/amd64/include/int_fmtio.h        Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/amd64/include/int_fmtio.h        Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_fmtio.h,v 1.6 2008/10/26 00:08:15 mrg Exp $        */
+/*     $NetBSD: int_fmtio.h,v 1.7 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _AMD64_INT_FMTIO_H_
 #define _AMD64_INT_FMTIO_H_
 
+#ifdef __INTPTR_FMTd__
+#include <sys/common_int_fmtio.h>
+#else
+
 #ifdef __x86_64__
 
 /*
@@ -217,4 +221,6 @@
 
 #endif /*      __x86_64__      */
 
+#endif
+
 #endif /* !_AMD64_INT_FMTIO_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/amd64/include/int_limits.h
--- a/sys/arch/amd64/include/int_limits.h       Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/amd64/include/int_limits.h       Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_limits.h,v 1.8 2012/01/27 15:41:02 christos Exp $  */
+/*     $NetBSD: int_limits.h,v 1.9 2014/07/25 21:43:13 joerg Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _AMD64_INT_LIMITS_H_
 #define _AMD64_INT_LIMITS_H_
 
+#ifdef __SIG_ATOMIC_MAX__
+#include <sys/common_int_limits.h>
+#else
+
 #ifdef __x86_64__
 
 /*
@@ -132,4 +136,6 @@
 
 #endif /*      __x86_64__      */
 
+#endif
+
 #endif /* !_AMD64_INT_LIMITS_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/amd64/include/int_mwgwtypes.h
--- a/sys/arch/amd64/include/int_mwgwtypes.h    Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/amd64/include/int_mwgwtypes.h    Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_mwgwtypes.h,v 1.7 2008/10/26 00:08:15 mrg Exp $    */
+/*     $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/25 21:43:13 joerg Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _AMD64_INT_MWGWTYPES_H_
 #define _AMD64_INT_MWGWTYPES_H_
 
+#ifdef __UINT_FAST64_TYPE__
+#include <sys/common_int_mwgwtypes.h>
+#else
+
 #ifdef __x86_64__
 
 /*
@@ -70,4 +74,6 @@
 
 #endif /*      __x86_64__      */
 
+#endif
+
 #endif /* !_AMD64_INT_MWGWTYPES_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/amd64/include/int_types.h
--- a/sys/arch/amd64/include/int_types.h        Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/amd64/include/int_types.h        Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_types.h,v 1.6 2008/10/26 00:08:15 mrg Exp $        */
+/*     $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -34,6 +34,10 @@
 #ifndef        _AMD64_INT_TYPES_H_
 #define        _AMD64_INT_TYPES_H_
 
+#ifdef __UINTPTR_TYPE__
+#include <sys/common_int_types.h>
+#else
+
 #ifdef __x86_64__
 
 #include <sys/cdefs.h>
@@ -66,4 +70,6 @@
 
 #endif /*      __x86_64__      */
 
+#endif
+
 #endif /* !_AMD64_INT_TYPES_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/arm/include/int_const.h
--- a/sys/arch/arm/include/int_const.h  Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/arm/include/int_const.h  Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_const.h,v 1.3 2010/05/29 17:33:57 tnozaki Exp $    */
+/*     $NetBSD: int_const.h,v 1.4 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,9 @@
 #ifndef _ARM_INT_CONST_H_
 #define _ARM_INT_CONST_H_
 
+#ifdef __INTMAX_C_SUFFIX__
+#include <sys/common_int_const.h>
+#else
 /*
  * 7.18.4 Macros for integer constants
  */
@@ -52,5 +55,6 @@
 
 #define        INTMAX_C(c)     c ## LL
 #define        UINTMAX_C(c)    c ## ULL
+#endif
 
 #endif /* !_ARM_INT_CONST_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/arm/include/int_fmtio.h
--- a/sys/arch/arm/include/int_fmtio.h  Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/arm/include/int_fmtio.h  Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_fmtio.h,v 1.7 2014/01/29 18:51:37 matt Exp $       */
+/*     $NetBSD: int_fmtio.h,v 1.8 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,12 +32,14 @@
 #ifndef _ARM_INT_FMTIO_H_
 #define _ARM_INT_FMTIO_H_
 
+#ifdef __INTPTR_FMTd__
+#include <sys/common_int_fmtio.h>
+#else
 /*
  * 7.8.1 Macros for format specifiers
  */
 
 /* fprintf macros for signed integers */
-
 #define        PRId8           "d"     /* int8_t               */
 #define        PRId16          "d"     /* int16_t              */
 #define        PRId32          "d"     /* int32_t              */
@@ -208,5 +210,6 @@
 #define        SCNxFAST64      "llx"   /* uint_fast64_t        */
 #define        SCNxMAX         "llx"   /* uintmax_t            */
 #define        SCNxPTR         "lx"    /* uintptr_t            */
+#endif
 
 #endif /* !_ARM_INT_FMTIO_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/arm/include/int_limits.h
--- a/sys/arch/arm/include/int_limits.h Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/arm/include/int_limits.h Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_limits.h,v 1.10 2014/01/29 01:40:35 matt Exp $     */
+/*     $NetBSD: int_limits.h,v 1.11 2014/07/25 21:43:13 joerg Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,6 +32,9 @@
 #ifndef _ARM_INT_LIMITS_H_
 #define _ARM_INT_LIMITS_H_
 
+#ifdef __SIG_ATOMIC_MAX__
+#include <sys/common_int_limits.h>
+#else
 /*
  * 7.18.2 Limits of specified-width integer types
  */
@@ -138,5 +141,6 @@
 #else
 #define        SIZE_MAX        0xffffffffUL                    /* size_t         */
 #endif
+#endif
 
 #endif /* !_ARM_INT_LIMITS_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/arm/include/int_mwgwtypes.h
--- a/sys/arch/arm/include/int_mwgwtypes.h      Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/arm/include/int_mwgwtypes.h      Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: int_mwgwtypes.h,v 1.6 2014/01/29 18:51:37 matt Exp $ */
+/* $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,6 +32,9 @@
 #ifndef _ARM_INT_MWGWTYPES_H_
 #define _ARM_INT_MWGWTYPES_H_
 
+#ifdef __UINT_FAST64_TYPE__
+#include <sys/common_int_mwgwtypes.h>
+#else
 /*
  * 7.18.1 Integer types
  */
@@ -119,5 +122,6 @@
 
 typedef        __INTMAX_TYPE__               intmax_t;
 typedef        __UINTMAX_TYPE__             uintmax_t;
+#endif
 
 #endif /* !_ARM_INT_MWGWTYPES_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/arm/include/int_types.h
--- a/sys/arch/arm/include/int_types.h  Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/arm/include/int_types.h  Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_types.h,v 1.16 2014/07/14 20:20:31 joerg Exp $     */
+/*     $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $     */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,6 +32,9 @@
 #ifndef _ARM_INT_TYPES_H_
 #define _ARM_INT_TYPES_H_
 
+#ifdef __UINTPTR_TYPE__
+#include <sys/common_int_types.h>
+#else
 #include <sys/cdefs.h>
 
 /*
@@ -91,5 +94,6 @@
 
 typedef        __INTPTR_TYPE__          __intptr_t;
 typedef        __UINTPTR_TYPE__        __uintptr_t;
+#endif
 
 #endif /* !_ARM_INT_TYPES_H_ */
diff -r 6deba9c71ba7 -r d60763cb5b16 sys/arch/i386/include/int_const.h
--- a/sys/arch/i386/include/int_const.h Fri Jul 25 21:38:52 2014 +0000
+++ b/sys/arch/i386/include/int_const.h Fri Jul 25 21:43:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_const.h,v 1.3 2010/05/29 17:33:57 tnozaki Exp $    */
+/*     $NetBSD: int_const.h,v 1.4 2014/07/25 21:43:13 joerg Exp $      */
 
 /*-



Home | Main Index | Thread Index | Old Index