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!
This commit is contained in:
parent
bbc1fb973a
commit
c0824e2dbe
|
@ -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 size32_t;
|
|||
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 @@ typedef id_t ctid_t;
|
|||
#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 __caddr_t caddr_t; /* core address */
|
|||
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;
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
@ -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) \
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue