Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/sys/sys Avoid duplicate typedefs so thes...



details:   https://anonhg.NetBSD.org/src/rev/f903ca8a3865
branches:  trunk
changeset: 362229:f903ca8a3865
user:      kre <kre%NetBSD.org@localhost>
date:      Fri Jun 01 00:56:19 2018 +0000

description:
Avoid duplicate typedefs so these headers can be used
as part of tools build, when the base system compiler does
not allow duplicate type definitions.

Someone please fix this some better way than this!

diffstat:

 external/cddl/osnet/sys/sys/opentypes.h |  12 ++++++++++++
 external/cddl/osnet/sys/sys/time.h      |   5 ++++-
 external/cddl/osnet/sys/sys/types.h     |   5 ++++-
 3 files changed, 20 insertions(+), 2 deletions(-)

diffs (89 lines):

diff -r 7111b96cd982 -r f903ca8a3865 external/cddl/osnet/sys/sys/opentypes.h
--- a/external/cddl/osnet/sys/sys/opentypes.h   Fri Jun 01 00:42:49 2018 +0000
+++ b/external/cddl/osnet/sys/sys/opentypes.h   Fri Jun 01 00:56:19 2018 +0000
@@ -5,8 +5,11 @@
 #define        FMNAMESZ        8
 
 #if defined(__APPLE__) || defined(HAVE_NBTOOL_CONFIG_H)
+#ifndef __defined_ll_t
+#define __defined_ll_t
 typedef long long longlong_t;
 typedef unsigned long long u_longlong_t;
+#endif
 typedef unsigned long vsize_t;
 #endif
 
@@ -14,7 +17,10 @@
 typedef unsigned int   caddr32_t;
 
 typedef        struct timespec timestruc_t;
+#ifndef __defined_ts_t
+#define __defined_ts_t
 typedef        struct timespec timespec_t;
+#endif
 typedef unsigned int   uint_t;
 typedef unsigned char  uchar_t;
 typedef unsigned short ushort_t;
@@ -30,7 +36,10 @@
 #define        B_TRUE  1
 typedef int            boolean_t;
 
+#ifndef __defined_hr_t
+#define __defined_hr_t
 typedef longlong_t      hrtime_t;
+#endif
 typedef int32_t                t_scalar_t;
 typedef uint32_t       t_uscalar_t;
 #if defined(_KERNEL) || defined(_KERNTYPES)
@@ -61,7 +70,10 @@
 typedef        longlong_t      offset_t;
 typedef        u_longlong_t    u_offset_t;
 typedef        uint64_t        upad64_t;
+#ifndef __defined_ts_t
+#define __defined_ts_t
 typedef        struct timespec timespec_t;
+#endif
 typedef        int32_t         daddr32_t;
 typedef        int32_t         time32_t;
 
diff -r 7111b96cd982 -r f903ca8a3865 external/cddl/osnet/sys/sys/time.h
--- a/external/cddl/osnet/sys/sys/time.h        Fri Jun 01 00:42:49 2018 +0000
+++ b/external/cddl/osnet/sys/sys/time.h        Fri Jun 01 00:56:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.9 2018/05/28 21:05:10 chs Exp $     */
+/*     $NetBSD: time.h,v 1.10 2018/06/01 00:56:19 kre Exp $    */
 
 /*-
  * Copyright (c) 2007 Pawel Jakub Dawidek <pjd%FreeBSD.org@localhost>
@@ -45,7 +45,10 @@
 #define        NSEC2SEC(n)     ((n) / (NANOSEC / SEC))
 #define        SEC2NSEC(m)     ((hrtime_t)(m) * (NANOSEC / SEC))
 
+#ifndef __defined_hr_t
+#define __defined_hr_t
 typedef longlong_t     hrtime_t;
+#endif
 
 #if defined(__i386__) || defined(__powerpc__)
 #define        TIMESPEC_OVERFLOW(ts)                                           \
diff -r 7111b96cd982 -r f903ca8a3865 external/cddl/osnet/sys/sys/types.h
--- a/external/cddl/osnet/sys/sys/types.h       Fri Jun 01 00:42:49 2018 +0000
+++ b/external/cddl/osnet/sys/sys/types.h       Fri Jun 01 00:56:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.18 2018/05/28 21:05:10 chs Exp $   */
+/*     $NetBSD: types.h,v 1.19 2018/06/01 00:56:19 kre Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -83,8 +83,11 @@
 #endif
 #undef longlong_t
 #undef u_longlong_t
+#ifndef __defined_ll_t
+#define __defined_ll_t
 typedef long long longlong_t;
 typedef unsigned long long u_longlong_t;
+#endif
 
 #ifndef _KERNEL
 #include <stdarg.h>



Home | Main Index | Thread Index | Old Index