From 07394c4b645bf1972d8716d0dfd2eeeae270b71e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 17 Dec 2008 10:04:04 -0800 Subject: [PATCH 1/3] Add mkdev.h rename _SOL_SYS to _LIBSPL_SYS --- lib/libspl/include/sys/bitmap.h | 4 ++-- lib/libspl/include/sys/cmn_err.h | 4 ++-- lib/libspl/include/sys/cred.h | 4 ++-- lib/libspl/include/sys/debug.h | 4 ++-- lib/libspl/include/sys/file.h | 4 ++-- lib/libspl/include/sys/int_limits.h | 4 ++-- lib/libspl/include/sys/mkdev.h | 30 +++++++++++++++++++++++++++++ lib/libspl/include/sys/mount.h | 6 +++--- lib/libspl/include/sys/param.h | 4 ++-- lib/libspl/include/sys/priv.h | 4 ++-- lib/libspl/include/sys/processor.h | 4 ++-- lib/libspl/include/sys/sdt.h | 4 ++-- lib/libspl/include/sys/sysevent.h | 4 ++-- lib/libspl/include/sys/sysmacros.h | 6 +++--- lib/libspl/include/sys/systeminfo.h | 4 ++-- lib/libspl/include/sys/time.h | 4 ++-- lib/libspl/include/sys/types.h | 4 ++-- lib/libspl/include/sys/uio.h | 4 ++-- lib/libspl/include/sys/varargs.h | 4 ++-- lib/libspl/include/sys/zone.h | 4 ++-- 20 files changed, 70 insertions(+), 40 deletions(-) create mode 100644 lib/libspl/include/sys/mkdev.h diff --git a/lib/libspl/include/sys/bitmap.h b/lib/libspl/include/sys/bitmap.h index 9f494fe72b..8fef7fcfe3 100644 --- a/lib/libspl/include/sys/bitmap.h +++ b/lib/libspl/include/sys/bitmap.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_BITMAP_H -#define _SOL_SYS_BITMAP_H +#ifndef _LIBSPL_SYS_BITMAP_H +#define _LIBSPL_SYS_BITMAP_H #endif diff --git a/lib/libspl/include/sys/cmn_err.h b/lib/libspl/include/sys/cmn_err.h index 525e3cadb2..d199361d78 100644 --- a/lib/libspl/include/sys/cmn_err.h +++ b/lib/libspl/include/sys/cmn_err.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_CMN_ERR_H -#define _SOL_SYS_CMN_ERR_H +#ifndef _LIBSPL_SYS_CMN_ERR_H +#define _LIBSPL_SYS_CMN_ERR_H #endif diff --git a/lib/libspl/include/sys/cred.h b/lib/libspl/include/sys/cred.h index b4fb6381ec..6a58315d47 100644 --- a/lib/libspl/include/sys/cred.h +++ b/lib/libspl/include/sys/cred.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_CRED_H -#define _SOL_SYS_CRED_H +#ifndef _LIBSPL_SYS_CRED_H +#define _LIBSPL_SYS_CRED_H typedef struct cred cred_t; diff --git a/lib/libspl/include/sys/debug.h b/lib/libspl/include/sys/debug.h index 238ffc00f7..0069620557 100644 --- a/lib/libspl/include/sys/debug.h +++ b/lib/libspl/include/sys/debug.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_DEBUG_H -#define _SOL_SYS_DEBUG_H +#ifndef _LIBSPL_SYS_DEBUG_H +#define _LIBSPL_SYS_DEBUG_H #include diff --git a/lib/libspl/include/sys/file.h b/lib/libspl/include/sys/file.h index 8908390b84..9aaba35bef 100644 --- a/lib/libspl/include/sys/file.h +++ b/lib/libspl/include/sys/file.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_FILE_H -#define _SOL_SYS_FILE_H +#ifndef _LIBSPL_SYS_FILE_H +#define _LIBSPL_SYS_FILE_H #include_next diff --git a/lib/libspl/include/sys/int_limits.h b/lib/libspl/include/sys/int_limits.h index 73deeeee1a..2b50ddd1bb 100644 --- a/lib/libspl/include/sys/int_limits.h +++ b/lib/libspl/include/sys/int_limits.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_INT_LIMITS_H -#define _SOL_SYS_INT_LIMITS_H +#ifndef _LIBSPL_SYS_INT_LIMITS_H +#define _LIBSPL_SYS_INT_LIMITS_H #endif diff --git a/lib/libspl/include/sys/mkdev.h b/lib/libspl/include/sys/mkdev.h new file mode 100644 index 0000000000..76e3a4fffb --- /dev/null +++ b/lib/libspl/include/sys/mkdev.h @@ -0,0 +1,30 @@ +/* + * 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_MKDEV_H +#define _LIBSPL_SYS_MKDEV_H + +#endif diff --git a/lib/libspl/include/sys/mount.h b/lib/libspl/include/sys/mount.h index 640e160a72..144f915d2d 100644 --- a/lib/libspl/include/sys/mount.h +++ b/lib/libspl/include/sys/mount.h @@ -26,8 +26,8 @@ #include_next -#ifndef _SOL_SYS_MOUNT_H -#define _SOL_SYS_MOUNT_H +#ifndef _LIBSPL_SYS_MOUNT_H +#define _LIBSPL_SYS_MOUNT_H #include #include @@ -47,4 +47,4 @@ #define MS_NOMNTTAB 0 /* Not supported in Linux */ #define MS_OPTIONSTR 0 /* Not necessary in Linux */ -#endif /* _SOL_SYS_MOUNT_H */ +#endif /* _LIBSPL_SYS_MOUNT_H */ diff --git a/lib/libspl/include/sys/param.h b/lib/libspl/include/sys/param.h index a0576266be..5ea896fa40 100644 --- a/lib/libspl/include/sys/param.h +++ b/lib/libspl/include/sys/param.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_PARAM_H -#define _SOL_SYS_PARAM_H +#ifndef _LIBSPL_SYS_PARAM_H +#define _LIBSPL_SYS_PARAM_H #include_next #include diff --git a/lib/libspl/include/sys/priv.h b/lib/libspl/include/sys/priv.h index a7deb77f7e..4a3ab96847 100644 --- a/lib/libspl/include/sys/priv.h +++ b/lib/libspl/include/sys/priv.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_PRIV_H -#define _SOL_SYS_PRIV_H +#ifndef _LIBSPL_SYS_PRIV_H +#define _LIBSPL_SYS_PRIV_H #endif diff --git a/lib/libspl/include/sys/processor.h b/lib/libspl/include/sys/processor.h index b00c1eb821..ce80c88dfb 100644 --- a/lib/libspl/include/sys/processor.h +++ b/lib/libspl/include/sys/processor.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_PROCESSOR_H -#define _SOL_SYS_PROCESSOR_H +#ifndef _LIBSPL_SYS_PROCESSOR_H +#define _LIBSPL_SYS_PROCESSOR_H #define getcpuid() (-1) diff --git a/lib/libspl/include/sys/sdt.h b/lib/libspl/include/sys/sdt.h index e194402a27..0c9a22cdf2 100644 --- a/lib/libspl/include/sys/sdt.h +++ b/lib/libspl/include/sys/sdt.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_SDT_H -#define _SOL_SYS_SDT_H +#ifndef _LIBSPL_SYS_SDT_H +#define _LIBSPL_SYS_SDT_H #define DTRACE_PROBE1(a,b,c) ((void) 0) #define DTRACE_PROBE2(a,b,c,d,e) ((void) 0) diff --git a/lib/libspl/include/sys/sysevent.h b/lib/libspl/include/sys/sysevent.h index c28ee1b0a5..980d145417 100644 --- a/lib/libspl/include/sys/sysevent.h +++ b/lib/libspl/include/sys/sysevent.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_SYSEVENT_H -#define _SOL_SYS_SYSEVENT_H +#ifndef _LIBSPL_SYS_SYSEVENT_H +#define _LIBSPL_SYS_SYSEVENT_H #endif diff --git a/lib/libspl/include/sys/sysmacros.h b/lib/libspl/include/sys/sysmacros.h index a6c00c88d8..02eea9e9a9 100644 --- a/lib/libspl/include/sys/sysmacros.h +++ b/lib/libspl/include/sys/sysmacros.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_SYSMACROS_H -#define _SOL_SYS_SYSMACROS_H +#ifndef _LIBSPL_SYS_SYSMACROS_H +#define _LIBSPL_SYS_SYSMACROS_H #include_next @@ -93,4 +93,4 @@ #define offsetof(s, m) ((size_t)(&(((s *)0)->m))) #endif -#endif /* _SOL_SYS_SYSMACROS_H */ +#endif /* _LIBSPL_SYS_SYSMACROS_H */ diff --git a/lib/libspl/include/sys/systeminfo.h b/lib/libspl/include/sys/systeminfo.h index dccafbfe97..5d7e41c435 100644 --- a/lib/libspl/include/sys/systeminfo.h +++ b/lib/libspl/include/sys/systeminfo.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_SYSTEMINFO_H -#define _SOL_SYS_SYSTEMINFO_H +#ifndef _LIBSPL_SYS_SYSTEMINFO_H +#define _LIBSPL_SYS_SYSTEMINFO_H #define sysinfo(cmd,buf,cnt) (-1) diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h index a61dbd14ba..bb5af8c8b4 100644 --- a/lib/libspl/include/sys/time.h +++ b/lib/libspl/include/sys/time.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_TIME_H -#define _SOL_SYS_TIME_H +#ifndef _LIBSPL_SYS_TIME_H +#define _LIBSPL_SYS_TIME_H #include_next #include diff --git a/lib/libspl/include/sys/types.h b/lib/libspl/include/sys/types.h index e59a3befd8..b166812925 100644 --- a/lib/libspl/include/sys/types.h +++ b/lib/libspl/include/sys/types.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _PORT_SYS_TYPES_H -#define _PORT_SYS_TYPES_H +#ifndef _LIBSPL_SYS_TYPES_H +#define _LIBSPL_SYS_TYPES_H #include #include diff --git a/lib/libspl/include/sys/uio.h b/lib/libspl/include/sys/uio.h index ccfc8b7776..0aed91357f 100644 --- a/lib/libspl/include/sys/uio.h +++ b/lib/libspl/include/sys/uio.h @@ -37,8 +37,8 @@ * contributors. */ -#ifndef _SOL_SYS_UIO_H -#define _SOL_SYS_UIO_H +#ifndef _LIBSPL_SYS_UIO_H +#define _LIBSPL_SYS_UIO_H /* struct iovec is defined in glibc's sys/uio.h */ #include_next diff --git a/lib/libspl/include/sys/varargs.h b/lib/libspl/include/sys/varargs.h index 19b81c0855..b8a63d8d77 100644 --- a/lib/libspl/include/sys/varargs.h +++ b/lib/libspl/include/sys/varargs.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_VARARGS_H -#define _SOL_SYS_VARARGS_H +#ifndef _LIBSPL_SYS_VARARGS_H +#define _LIBSPL_SYS_VARARGS_H #endif diff --git a/lib/libspl/include/sys/zone.h b/lib/libspl/include/sys/zone.h index 85b0150bd9..ea7c8bde38 100644 --- a/lib/libspl/include/sys/zone.h +++ b/lib/libspl/include/sys/zone.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYS_ZONE_H -#define _SOL_SYS_ZONE_H +#ifndef _LIBSPL_SYS_ZONE_H +#define _LIBSPL_SYS_ZONE_H #endif From 6d524f29064641b4801103be273f47b0c6f308a6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 17 Dec 2008 10:06:55 -0800 Subject: [PATCH 2/3] Cleanup some of the #ifndef/#defines --- lib/libspl/include/assert.h | 6 +++--- lib/libspl/include/stdlib.h | 4 ++-- lib/libspl/include/string.h | 4 ++-- lib/libspl/include/strings.h | 4 ++-- lib/libspl/include/synch.h | 4 ++-- lib/libspl/include/ucred.h | 4 ++-- lib/libspl/include/umem.h | 4 ++-- lib/libspl/include/unistd.h | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h index a87d70792a..049d467a6b 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h @@ -26,8 +26,8 @@ #include_next -#ifndef _SOL_ASSERT_H -#define _SOL_ASSERT_H +#ifndef _LIBSPL_ASSERT_H +#define _LIBSPL_ASSERT_H #include #include @@ -91,4 +91,4 @@ _NOTE(CONSTCOND) } while (0) #define ASSERT3P(x, y, z) VERIFY3P(x, y, z) #endif /* NDEBUG */ -#endif /* _SOL_ASSERT_H */ +#endif /* _LIBSPL_ASSERT_H */ diff --git a/lib/libspl/include/stdlib.h b/lib/libspl/include/stdlib.h index 67dcb587e0..67d6e96e00 100644 --- a/lib/libspl/include/stdlib.h +++ b/lib/libspl/include/stdlib.h @@ -26,8 +26,8 @@ #include_next -#ifndef _SOL_STDLIB_H -#define _SOL_STDLIB_H +#ifndef _LIBSPL_STDLIB_H +#define _LIBSPL_STDLIB_H extern const char *getexecname(void); diff --git a/lib/libspl/include/string.h b/lib/libspl/include/string.h index 6927d4a6fc..213977d0e9 100644 --- a/lib/libspl/include/string.h +++ b/lib/libspl/include/string.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_STRING_H -#define _SOL_STRING_H +#ifndef _LIBSPL_STRING_H +#define _LIBSPL_STRING_H #include_next diff --git a/lib/libspl/include/strings.h b/lib/libspl/include/strings.h index a6d5ffa95a..48944e1428 100644 --- a/lib/libspl/include/strings.h +++ b/lib/libspl/include/strings.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_STRINGS_H -#define _SOL_STRINGS_H +#ifndef _LIBSPL_STRINGS_H +#define _LIBSPL_STRINGS_H #include #include_next diff --git a/lib/libspl/include/synch.h b/lib/libspl/include/synch.h index afddcfd2ba..2da270a428 100644 --- a/lib/libspl/include/synch.h +++ b/lib/libspl/include/synch.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _SOL_SYNCH_H -#define _SOL_SYNCH_H +#ifndef _LIBSPL_SYNCH_H +#define _LIBSPL_SYNCH_H #endif diff --git a/lib/libspl/include/ucred.h b/lib/libspl/include/ucred.h index e1c3342fbd..4ca424ed38 100644 --- a/lib/libspl/include/ucred.h +++ b/lib/libspl/include/ucred.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_UCRED_H -#define _SOL_UCRED_H +#ifndef _LIBSPL_UCRED_H +#define _LIBSPL_UCRED_H typedef int ucred_t; diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h index 334b342ae7..3e19aff9ec 100644 --- a/lib/libspl/include/umem.h +++ b/lib/libspl/include/umem.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SOL_UMEM_H -#define _SOL_UMEM_H +#ifndef _LIBSPL_UMEM_H +#define _LIBSPL_UMEM_H /* XXX: We should use the real portable umem library if it is detected * at configure time. However, if the library is not available we can diff --git a/lib/libspl/include/unistd.h b/lib/libspl/include/unistd.h index 92c01aad79..493efa81be 100644 --- a/lib/libspl/include/unistd.h +++ b/lib/libspl/include/unistd.h @@ -26,8 +26,8 @@ #include_next -#ifndef _SYS_UNISTD_H -#define _SYS_UNISTD_H +#ifndef _LIBSPL_UNISTD_H +#define _LIBSPL_UNISTD_H #include @@ -56,4 +56,4 @@ static inline long fake_gethostid(void) #define gethostid() fake_gethostid() #endif -#endif /* _SYS_UNISTD_H */ +#endif /* _LIBSPL_UNISTD_H */ From e23605530abecc966ac6a79839c07c7a930fa17a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 17 Dec 2008 10:10:32 -0800 Subject: [PATCH 3/3] Update #ifndef/#defines --- lib/libspl/include/atomic.h | 6 +++--- lib/libspl/include/devid.h | 4 ++-- lib/libspl/include/libdevinfo.h | 6 +++--- lib/libspl/include/libshare.h | 6 +++--- lib/libspl/include/priv.h | 4 ++-- lib/libspl/include/zone.h | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/libspl/include/atomic.h b/lib/libspl/include/atomic.h index 8ce8f592dc..7173579497 100644 --- a/lib/libspl/include/atomic.h +++ b/lib/libspl/include/atomic.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _SYS_ATOMIC_H -#define _SYS_ATOMIC_H +#ifndef _LIBSPL_ATOMIC_H +#define _LIBSPL_ATOMIC_H @@ -435,4 +435,4 @@ extern uint32_t swapl(uint32_t *, uint32_t); } #endif -#endif /* _SYS_ATOMIC_H */ +#endif /* _LIBSPL_ATOMIC_H */ diff --git a/lib/libspl/include/devid.h b/lib/libspl/include/devid.h index 4f92fbe8d5..9dfdae84b5 100644 --- a/lib/libspl/include/devid.h +++ b/lib/libspl/include/devid.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _DEVID_H -#define _DEVID_H +#ifndef _LIBSPL_DEVID_H +#define _LIBSPL_DEVID_H #include diff --git a/lib/libspl/include/libdevinfo.h b/lib/libspl/include/libdevinfo.h index 0d58eb793e..f0f9d7e8ea 100644 --- a/lib/libspl/include/libdevinfo.h +++ b/lib/libspl/include/libdevinfo.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#ifndef _LIBDEVINFO_H -#define _LIBDEVINFO_H +#ifndef _LIBSPL_LIBDEVINFO_H +#define _LIBSPL_LIBDEVINFO_H -#endif /* _LIBDEVINFO_H */ +#endif /* _LIBSPL_LIBDEVINFO_H */ diff --git a/lib/libspl/include/libshare.h b/lib/libspl/include/libshare.h index 4976f6f7fe..afbdf5b056 100644 --- a/lib/libspl/include/libshare.h +++ b/lib/libspl/include/libshare.h @@ -28,7 +28,7 @@ * basic API declarations for share management */ -#ifndef _LIBSHARE_H -#define _LIBSHARE_H +#ifndef _LIBSPL_LIBSHARE_H +#define _LIBSPL_LIBSHARE_H -#endif /* _LIBSHARE_H */ +#endif /* _LIBSPL_LIBSHARE_H */ diff --git a/lib/libspl/include/priv.h b/lib/libspl/include/priv.h index 873502b4f7..6c9a2c0e66 100644 --- a/lib/libspl/include/priv.h +++ b/lib/libspl/include/priv.h @@ -24,8 +24,8 @@ * Use is subject to license terms. */ -#ifndef _PRIV_H -#define _PRIV_H +#ifndef _LIBSPL_PRIV_H +#define _LIBSPL_PRIV_H #include diff --git a/lib/libspl/include/zone.h b/lib/libspl/include/zone.h index 3c18b61059..366f95b147 100644 --- a/lib/libspl/include/zone.h +++ b/lib/libspl/include/zone.h @@ -23,8 +23,8 @@ * Use is subject to license terms. */ -#ifndef _ZONE_H -#define _ZONE_H +#ifndef _LIBSPL_ZONE_H +#define _LIBSPL_ZONE_H @@ -83,4 +83,4 @@ extern int zone_list_datalink(zoneid_t, int *, char *); } #endif -#endif /* _ZONE_H */ +#endif /* _LIBSPL_ZONE_H */