Module Name: src
Committed By: christos
Date: Mon Feb 1 02:12:55 UTC 2016
Modified Files:
src/external/cddl/osnet/sys/sys: sysmacros.h types.h
Added Files:
src/external/cddl/osnet/sys/sys: opentypes.h
Log Message:
Split the opensolaris types into opentypes.h because linux includes
sysmacros.h from types.h and we can't interpose ourselves to define
the needed types otherwise.
Disable unused macros, get rid of __APPLE__
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/sys/opentypes.h
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/sysmacros.h
cvs rdiff -u -r1.16 -r1.17 src/external/cddl/osnet/sys/sys/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/external/cddl/osnet/sys/sys/sysmacros.h
diff -u src/external/cddl/osnet/sys/sys/sysmacros.h:1.6 src/external/cddl/osnet/sys/sys/sysmacros.h:1.7
--- src/external/cddl/osnet/sys/sys/sysmacros.h:1.6 Sun Dec 27 16:40:21 2015
+++ src/external/cddl/osnet/sys/sys/sysmacros.h Sun Jan 31 21:12:55 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmacros.h,v 1.6 2015/12/27 21:40:21 christos Exp $ */
+/* $NetBSD: sysmacros.h,v 1.7 2016/02/01 02:12:55 christos Exp $ */
/*
* CDDL HEADER START
@@ -33,6 +33,7 @@
#define _SYS_SYSMACROS_H
#include <sys/param.h>
+#include <sys/opentypes.h>
#ifdef __cplusplus
extern "C" {
@@ -348,7 +349,7 @@ extern unsigned char bcd_to_byte[256];
* because if a field crosses a byte boundary it's not likely to be meaningful
* without reassembly in its nonnative endianness.
*/
-#if !defined(__NetBSD__) && !defined(__APPLE__)
+#ifdef notdef
#if defined(_BIT_FIELDS_LTOH)
#define DECL_BITFIELD2(_a, _b) \
uint8_t _a, _b
Index: src/external/cddl/osnet/sys/sys/types.h
diff -u src/external/cddl/osnet/sys/sys/types.h:1.16 src/external/cddl/osnet/sys/sys/types.h:1.17
--- src/external/cddl/osnet/sys/sys/types.h:1.16 Sun Jan 31 01:15:39 2016
+++ src/external/cddl/osnet/sys/sys/types.h Sun Jan 31 21:12:55 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.16 2016/01/31 06:15:39 christos Exp $ */
+/* $NetBSD: types.h,v 1.17 2016/02/01 02:12:55 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -63,11 +63,12 @@
/*
* This is a bag of dirty hacks to keep things compiling.
*/
-#ifdef __APPLE__
+#ifndef _KERNEL
#include <stdint.h>
#else
#include <sys/stdint.h>
#endif
+#ifndef HAVE_NBTOOLS_CONFIG_H
#ifdef _NETBSD_SOURCE
#include_next <sys/types.h>
#include_next <sys/ccompile.h>
@@ -77,6 +78,7 @@
#include_next <sys/ccompile.h>
#undef _NETBSD_SOURCE
#endif
+#endif
#ifndef _KERNEL
#include <stdarg.h>
@@ -84,76 +86,6 @@
#include <sys/stdarg.h>
#endif
-#define MAXNAMELEN 256
-#define FMNAMESZ 8
-
-#ifdef __APPLE__
-typedef int64_t longlong_t;
-typedef uint64_t u_longlong_t;
-typedef unsigned long vsize_t;
-#endif
-
-typedef unsigned int size32_t;
-typedef unsigned int caddr32_t;
-
-typedef struct timespec timestruc_t;
-typedef u_int uint_t;
-typedef u_char uchar_t;
-typedef u_short ushort_t;
-typedef u_long ulong_t;
-typedef off_t off64_t;
-typedef id_t taskid_t;
-typedef id_t projid_t;
-typedef id_t poolid_t;
-typedef id_t zoneid_t;
-typedef id_t ctid_t;
-
-#define B_FALSE 0
-#define B_TRUE 1
-typedef int boolean_t;
-
-typedef longlong_t hrtime_t;
-typedef int32_t t_scalar_t;
-typedef uint32_t t_uscalar_t;
-#if defined(_KERNEL) || defined(_KERNTYPES)
-typedef vsize_t pgcnt_t;
-#endif
-typedef u_longlong_t len_t;
-typedef int major_t;
-typedef int minor_t;
-typedef int o_uid_t;
-typedef int o_gid_t;
-typedef struct kauth_cred cred_t;
-typedef uintptr_t pc_t;
-typedef struct vm_page page_t;
-typedef ushort_t o_mode_t; /* old file attribute type */
-typedef u_longlong_t diskaddr_t;
-typedef void *zone_t;
-typedef struct vfsops vfsops_t;
-
-#ifdef _KERNEL
-
-typedef short index_t;
-typedef off_t offset_t;
-typedef int64_t rlim64_t;
-typedef __caddr_t caddr_t; /* core address */
-
-#else
-
-typedef longlong_t offset_t;
-typedef u_longlong_t u_offset_t;
-typedef uint64_t upad64_t;
-typedef struct timespec timespec_t;
-typedef int32_t daddr32_t;
-typedef int32_t time32_t;
-
-#endif /* !_KERNEL */
-
-#define MAXOFFSET_T 0x7fffffffffffffffLL
-#define seg_rw uio_rw
-#define S_READ UIO_READ
-#define S_WRITE UIO_WRITE
-struct aio_req;
-typedef void *dev_info_t;
+#include <sys/opentypes.h>
#endif /* !_OPENSOLARIS_SYS_TYPES_H_ */
Added files:
Index: src/external/cddl/osnet/sys/sys/opentypes.h
diff -u /dev/null src/external/cddl/osnet/sys/sys/opentypes.h:1.1
--- /dev/null Sun Jan 31 21:12:55 2016
+++ src/external/cddl/osnet/sys/sys/opentypes.h Sun Jan 31 21:12:55 2016
@@ -0,0 +1,76 @@
+#ifndef _OPENSOLARIS_SYS_OPENTYPES_H_
+#define _OPENSOLARIS_SYS_OPENTYPES_H_
+
+#define MAXNAMELEN 256
+#define FMNAMESZ 8
+
+#if defined(__APPLE__) || defined(HAVE_NBTOOL_CONFIG_H)
+typedef int64_t longlong_t;
+typedef uint64_t u_longlong_t;
+typedef unsigned long vsize_t;
+#endif
+
+typedef unsigned int size32_t;
+typedef unsigned int caddr32_t;
+
+typedef struct timespec timestruc_t;
+typedef unsigned int uint_t;
+typedef unsigned char uchar_t;
+typedef unsigned short ushort_t;
+typedef unsigned long ulong_t;
+typedef off_t off64_t;
+typedef id_t taskid_t;
+typedef id_t projid_t;
+typedef id_t poolid_t;
+typedef id_t zoneid_t;
+typedef id_t ctid_t;
+
+#define B_FALSE 0
+#define B_TRUE 1
+typedef int boolean_t;
+
+typedef longlong_t hrtime_t;
+typedef int32_t t_scalar_t;
+typedef uint32_t t_uscalar_t;
+#if defined(_KERNEL) || defined(_KERNTYPES)
+typedef vsize_t pgcnt_t;
+#endif
+typedef u_longlong_t len_t;
+typedef int major_t;
+typedef int minor_t;
+typedef int o_uid_t;
+typedef int o_gid_t;
+typedef struct kauth_cred cred_t;
+typedef uintptr_t pc_t;
+typedef struct vm_page page_t;
+typedef ushort_t o_mode_t; /* old file attribute type */
+typedef u_longlong_t diskaddr_t;
+typedef void *zone_t;
+typedef struct vfsops vfsops_t;
+
+#ifdef _KERNEL
+
+typedef short index_t;
+typedef off_t offset_t;
+typedef int64_t rlim64_t;
+typedef __caddr_t caddr_t; /* core address */
+
+#else
+
+typedef longlong_t offset_t;
+typedef u_longlong_t u_offset_t;
+typedef uint64_t upad64_t;
+typedef struct timespec timespec_t;
+typedef int32_t daddr32_t;
+typedef int32_t time32_t;
+
+#endif /* !_KERNEL */
+
+#define MAXOFFSET_T 0x7fffffffffffffffLL
+#define seg_rw uio_rw
+#define S_READ UIO_READ
+#define S_WRITE UIO_WRITE
+struct aio_req;
+typedef void *dev_info_t;
+
+#endif /* _OPENSOLARIS_SYS_OPENTYPES_H_ */