summaryrefslogtreecommitdiffstats
path: root/lib/libspl/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-15 17:53:18 -0800
committerBrian Behlendorf <[email protected]>2018-05-29 16:00:33 -0700
commit93ce2b4ca5a40c41ac945cd3aaf4a4a22bb751e1 (patch)
tree6832f5c9dfdbe0f0bd5c8708344a769676b1f95d /lib/libspl/include
parent1272941f49321bcb7b26025670720c98785427ee (diff)
Update build system and packaging
Minimal changes required to integrate the SPL sources in to the ZFS repository build infrastructure and packaging. Build system and packaging: * Renamed SPL_* autoconf m4 macros to ZFS_*. * Removed redundant SPL_* autoconf m4 macros. * Updated the RPM spec files to remove SPL package dependency. * The zfs package obsoletes the spl package, and the zfs-kmod package obsoletes the spl-kmod package. * The zfs-kmod-devel* packages were updated to add compatibility symlinks under /usr/src/spl-x.y.z until all dependent packages can be updated. They will be removed in a future release. * Updated copy-builtin script for in-kernel builds. * Updated DKMS package to include the spl.ko. * Updated stale AUTHORS file to include all contributors. * Updated stale COPYRIGHT and included the SPL as an exception. * Renamed README.markdown to README.md * Renamed OPENSOLARIS.LICENSE to LICENSE. * Renamed DISCLAIMER to NOTICE. Required code changes: * Removed redundant HAVE_SPL macro. * Removed _BOOT from nvpairs since it doesn't apply for Linux. * Initial header cleanup (removal of empty headers, refactoring). * Remove SPL repository clone/build from zimport.sh. * Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due to build issues when forcing C99 compilation. * Replaced legacy ACCESS_ONCE with READ_ONCE. * Include needed headers for `current` and `EXPORT_SYMBOL`. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> TEST_ZIMPORT_SKIP="yes" Closes #7556
Diffstat (limited to 'lib/libspl/include')
-rw-r--r--lib/libspl/include/Makefile.am3
-rw-r--r--lib/libspl/include/attr.h25
-rw-r--r--lib/libspl/include/note.h53
-rw-r--r--lib/libspl/include/sys/Makefile.am5
-rw-r--r--lib/libspl/include/sys/compress.h30
-rw-r--r--lib/libspl/include/sys/note.h54
-rw-r--r--lib/libspl/include/sys/stdtypes.h (renamed from lib/libspl/include/sys/systm.h)38
-rw-r--r--lib/libspl/include/sys/strings.h (renamed from lib/libspl/include/strings.h)6
-rw-r--r--lib/libspl/include/sys/sysmacros.h2
-rw-r--r--lib/libspl/include/sys/types.h27
-rw-r--r--lib/libspl/include/sys/types32.h2
-rw-r--r--lib/libspl/include/umem.h1
12 files changed, 40 insertions, 206 deletions
diff --git a/lib/libspl/include/Makefile.am b/lib/libspl/include/Makefile.am
index 7882c1b9c..7f4098a16 100644
--- a/lib/libspl/include/Makefile.am
+++ b/lib/libspl/include/Makefile.am
@@ -4,19 +4,16 @@ libspldir = $(includedir)/libspl
libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/assert.h \
$(top_srcdir)/lib/libspl/include/atomic.h \
- $(top_srcdir)/lib/libspl/include/attr.h \
$(top_srcdir)/lib/libspl/include/devid.h \
$(top_srcdir)/lib/libspl/include/libdevinfo.h \
$(top_srcdir)/lib/libspl/include/libgen.h \
$(top_srcdir)/lib/libspl/include/libshare.h \
$(top_srcdir)/lib/libspl/include/limits.h \
$(top_srcdir)/lib/libspl/include/locale.h \
- $(top_srcdir)/lib/libspl/include/note.h \
$(top_srcdir)/lib/libspl/include/statcommon.h \
$(top_srcdir)/lib/libspl/include/stdio.h \
$(top_srcdir)/lib/libspl/include/stdlib.h \
$(top_srcdir)/lib/libspl/include/string.h \
- $(top_srcdir)/lib/libspl/include/strings.h \
$(top_srcdir)/lib/libspl/include/stropts.h \
$(top_srcdir)/lib/libspl/include/synch.h \
$(top_srcdir)/lib/libspl/include/thread.h \
diff --git a/lib/libspl/include/attr.h b/lib/libspl/include/attr.h
deleted file mode 100644
index da1671a75..000000000
--- a/lib/libspl/include/attr.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-#ifndef _LIBSPL_ATTR_H
-#define _LIBSPL_ATTR_H
-
-#endif /* _LIBSPL_ATTR_H */
diff --git a/lib/libspl/include/note.h b/lib/libspl/include/note.h
deleted file mode 100644
index cb6b33e1d..000000000
--- a/lib/libspl/include/note.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1994 by Sun Microsystems, Inc.
- */
-
-/*
- * note.h: interface for annotating source with info for tools
- *
- * NOTE is the default interface, but if the identifier NOTE is in use for
- * some other purpose, you may prepare a similar header file using your own
- * identifier, mapping that identifier to _NOTE. Also, exported header
- * files should *not* use NOTE, since the name may already be in use in
- * a program's namespace. Rather, exported header files should include
- * sys/note.h directly and use _NOTE. For consistency, all kernel source
- * should use _NOTE.
- */
-
-#ifndef _NOTE_H
-#define _NOTE_H
-
-#include <sys/note.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NOTE _NOTE
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NOTE_H */
diff --git a/lib/libspl/include/sys/Makefile.am b/lib/libspl/include/sys/Makefile.am
index 9c67e14b0..e7af317e0 100644
--- a/lib/libspl/include/sys/Makefile.am
+++ b/lib/libspl/include/sys/Makefile.am
@@ -8,7 +8,6 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/byteorder.h \
$(top_srcdir)/lib/libspl/include/sys/callb.h \
$(top_srcdir)/lib/libspl/include/sys/cmn_err.h \
- $(top_srcdir)/lib/libspl/include/sys/compress.h \
$(top_srcdir)/lib/libspl/include/sys/cred.h \
$(top_srcdir)/lib/libspl/include/sys/debug.h \
$(top_srcdir)/lib/libspl/include/sys/dkio.h \
@@ -28,7 +27,6 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/mkdev.h \
$(top_srcdir)/lib/libspl/include/sys/mnttab.h \
$(top_srcdir)/lib/libspl/include/sys/mount.h \
- $(top_srcdir)/lib/libspl/include/sys/note.h \
$(top_srcdir)/lib/libspl/include/sys/param.h \
$(top_srcdir)/lib/libspl/include/sys/policy.h \
$(top_srcdir)/lib/libspl/include/sys/poll.h \
@@ -37,11 +35,12 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/signal.h \
$(top_srcdir)/lib/libspl/include/sys/stack.h \
$(top_srcdir)/lib/libspl/include/sys/stat.h \
+ $(top_srcdir)/lib/libspl/include/sys/stdtypes.h \
+ $(top_srcdir)/lib/libspl/include/sys/strings.h \
$(top_srcdir)/lib/libspl/include/sys/stropts.h \
$(top_srcdir)/lib/libspl/include/sys/sunddi.h \
$(top_srcdir)/lib/libspl/include/sys/sysmacros.h \
$(top_srcdir)/lib/libspl/include/sys/systeminfo.h \
- $(top_srcdir)/lib/libspl/include/sys/systm.h \
$(top_srcdir)/lib/libspl/include/sys/time.h \
$(top_srcdir)/lib/libspl/include/sys/types32.h \
$(top_srcdir)/lib/libspl/include/sys/types.h \
diff --git a/lib/libspl/include/sys/compress.h b/lib/libspl/include/sys/compress.h
deleted file mode 100644
index 282f178ba..000000000
--- a/lib/libspl/include/sys/compress.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LIBSPL_SYS_COMPRESS_H
-#define _LIBSPL_SYS_COMPRESS_H
-
-#endif /* _LIBSPL_SYS_COMPRESS_H */
diff --git a/lib/libspl/include/sys/note.h b/lib/libspl/include/sys/note.h
deleted file mode 100644
index 6625b68d9..000000000
--- a/lib/libspl/include/sys/note.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1994 by Sun Microsystems, Inc.
- */
-
-/*
- * sys/note.h: interface for annotating source with info for tools
- *
- * This is the underlying interface; NOTE (/usr/include/note.h) is the
- * preferred interface, but all exported header files should include this
- * file directly and use _NOTE so as not to take "NOTE" from the user's
- * namespace. For consistency, *all* kernel source should use _NOTE.
- *
- * By default, annotations expand to nothing. This file implements
- * that. Tools using annotations will interpose a different version
- * of this file that will expand annotations as needed.
- */
-
-#ifndef _SYS_NOTE_H
-#define _SYS_NOTE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _NOTE
-#define _NOTE(s)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_NOTE_H */
diff --git a/lib/libspl/include/sys/systm.h b/lib/libspl/include/sys/stdtypes.h
index 1ed031d4e..c26e2dc96 100644
--- a/lib/libspl/include/sys/systm.h
+++ b/lib/libspl/include/sys/stdtypes.h
@@ -19,12 +19,36 @@
*
* CDDL HEADER END
*/
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-#ifndef _LIBSPL_SYS_SYSTM_H
-#define _LIBSPL_SYS_SYSTM_H
+#ifndef __SYS_STDTYPES_H
+#define __SYS_STDTYPES_H
+
+typedef enum {
+ B_FALSE = 0,
+ B_TRUE = 1
+} boolean_t;
+
+typedef unsigned char uchar_t;
+typedef unsigned short ushort_t;
+typedef unsigned int uint_t;
+typedef unsigned long ulong_t;
+typedef unsigned long long u_longlong_t;
+typedef long long longlong_t;
+
+typedef longlong_t offset_t;
+typedef u_longlong_t u_offset_t;
+typedef u_longlong_t len_t;
+typedef longlong_t diskaddr_t;
+
+typedef ulong_t pgcnt_t; /* number of pages */
+typedef long spgcnt_t; /* signed number of pages */
+
+typedef short pri_t;
+typedef ushort_t o_mode_t; /* old file attribute type */
+
+typedef int major_t;
+typedef int minor_t;
+
+typedef short index_t;
-#endif /* _LIBSPL_SYS_SYSTM_H */
+#endif /* __SYS_STDTYPES_H */
diff --git a/lib/libspl/include/strings.h b/lib/libspl/include/sys/strings.h
index 3f35af4a4..c142047dc 100644
--- a/lib/libspl/include/strings.h
+++ b/lib/libspl/include/sys/strings.h
@@ -24,10 +24,10 @@
* Use is subject to license terms.
*/
-#ifndef _LIBSPL_STRINGS_H
-#define _LIBSPL_STRINGS_H
+#ifndef _LIBSPL_SYS_STRINGS_H
+#define _LIBSPL_SYS_STRINGS_H
#include <string.h>
-#include_next <strings.h>
+#include <strings.h>
#endif
diff --git a/lib/libspl/include/sys/sysmacros.h b/lib/libspl/include/sys/sysmacros.h
index 31f347c6f..22fcb04b9 100644
--- a/lib/libspl/include/sys/sysmacros.h
+++ b/lib/libspl/include/sys/sysmacros.h
@@ -98,4 +98,6 @@
#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
#endif
+#define _NOTE(x)
+
#endif /* _LIBSPL_SYS_SYSMACROS_H */
diff --git a/lib/libspl/include/sys/types.h b/lib/libspl/include/sys/types.h
index 7fb53730f..ea02ffac9 100644
--- a/lib/libspl/include/sys/types.h
+++ b/lib/libspl/include/sys/types.h
@@ -38,40 +38,15 @@
#include_next <sys/types.h>
#include <sys/types32.h>
#include <sys/va_list.h>
+#include <sys/stdtypes.h>
#ifndef HAVE_INTTYPES
#include <inttypes.h>
-
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-
-typedef unsigned char uchar_t;
-typedef unsigned short ushort_t;
-typedef unsigned int uint_t;
-typedef unsigned long ulong_t;
-
-typedef long long longlong_t;
-typedef unsigned long long u_longlong_t;
#endif /* HAVE_INTTYPES */
-typedef longlong_t offset_t;
-typedef u_longlong_t u_offset_t;
-typedef u_longlong_t len_t;
-typedef longlong_t diskaddr_t;
-
-typedef ulong_t pgcnt_t; /* number of pages */
-typedef long spgcnt_t; /* signed number of pages */
-
-typedef short pri_t;
-
typedef int zoneid_t;
typedef int projid_t;
-typedef int major_t;
-typedef int minor_t;
-
-typedef ushort_t o_mode_t; /* old file attribute type */
-typedef short index_t;
-
/*
* Definitions remaining from previous partial support for 64-bit file
* offsets. This partial support for devices greater than 2gb requires
diff --git a/lib/libspl/include/sys/types32.h b/lib/libspl/include/sys/types32.h
index 9ab3b0782..bb41aa34b 100644
--- a/lib/libspl/include/sys/types32.h
+++ b/lib/libspl/include/sys/types32.h
@@ -26,8 +26,6 @@
#ifndef _SYS_TYPES32_H
#define _SYS_TYPES32_H
-
-
#include <sys/inttypes.h>
#ifdef __cplusplus
diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h
index 5b10ac801..59dc93144 100644
--- a/lib/libspl/include/umem.h
+++ b/lib/libspl/include/umem.h
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#ifdef __cplusplus
extern "C" {